text:
feat: support npm resolution for file imports

Fixes #4098.
What this PR solves / how to test:
Previously when importing static files (such as wasm) from an npm package, you had to path directly to it, such as :
import wasm from '../../node_modules/svg2png-wasm/svg2png_wasm_bg.wasm'

While this works file, the DX isn't ideal, so this PR adds proper package resolution for these statements, allowing you to do:
import wasm from 'svg2png-wasm/svg2png_wasm_bg.wasm'

This uses resolve.exports to look at and analyse the package's exports field, and resolve to the applicable file. This does add an additional dependency, but this is a very common one used by so much build tooling including vite, jest, svelte, and more.
If for any reason this fails, it falls back to the previous behaviour and will just do a path reference, and then end up throwing an ENOENT as per previous functionality.
Notes:

My detection for "is this possibly an npm package" is very dumb right now, checking for presence of / and not starting with .. It seems to work remarkebly well in practice across the many projects I've tested this against, but I'm happy to improve this if someone has a cleaner idea.
While I've added tests for the npm package name extraction to ensure it handles scoped packages, I've not added any specific tests for handling of the imports. To test that, it'd need a fixture with a real node_modules folder, and dummy package, which I don't think there's any prior art for in the repo today. Happy to add these if someone can guide me on the best way to approach this.

Author has included the following, where applicable:

[x] Tests
[x] Changeset (Changeset guidelines)

Reviewer is to perform the following, as applicable:

Checked for inclusion of relevant tests
Checked for inclusion of a relevant changeset
Checked for creation of associated docs updates
Manually pulled down the changes and spot-tested

Note for PR author:
We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

Can this be done more simply using the node.js require.resolve() function? For example something like:
let filePath = path.join(args.resolveDir, args.path);
if (!path.isAbsolute(args.path) && !args.path.startsWith(".")) {
	try {
	filePath = require.resolve(args.path)
} catch {
	// Do nothing
}

Note that your current checks for package like paths would break on Windows.

Can this be done more simply using the node.js require.resolve() function?

Unfoortunately not from my testing. Running require.resolve with args.path as svg2png-wasm/svg2png_wasm_bg.wasm results in Error: Cannot find module 'svg2png-wasm/svg2png_wasm_bg.wasm' with code MODULE_NOT_FOUND . I don't know exactly why this is, but I'd suspect it's something to do with CJS vs ESM interop, and newer exports mapping.

Note that your current checks for package like paths would break on Windows.

Can you expand here? My checks are purely checking for an included /, and not starting with ..
If I try and import like svg2png-wasm\\svg2png_wasm_bg.wasm, this plugin doesn't even run, and I get a generic esbuild error: No loader is configured for ".wasm" files: ../../../../example-wasm/node_modules/svg2png-wasm/svg2png_wasm_bg.wasm. I suspect this is because this plugin only runs on the specified filter, which looks something like this:
globs: ["**/*.wasm", "**/*.wasm?module"]

Supporting more windows orientated backslashes seems like a general issue here, and not really in the scope of this PR if I'm understanding correctly. It's also extremely uncommon, even on Windows from my experience, to import using backslashes in the path, especially with npm modules. This would also explain why no one has reported it as a bug.

Supporting more windows orientated backslashes seems like a general issue here, and not really in the scope of this PR if I'm understanding correctly. It's also extremely uncommon, even on Windows from my experience, to import using backslashes in the path, especially with npm modules. This would also explain why no one has reported it as a bug.

Yeah that is a good spot. The rules themselves wouldn't match in the first place.

All of the E2E test failures look unrelated, failing due to AssertionError: Please provide a CLOUDFLARE_ACCOUNT_ID as an environment variable

Thanks! I've added two test fixtures now - one just exporting a simple multiply.wasm file (stolen from another fixture), and then the other importing it. In doing so, I found some small issues with how I was using resolveDir vs process.cwd() so got that all fixed up.
Let me know if there's any further changes needed here.

The failing tests seem to be in external-service-bindings-app:test:ci, and unrelated to this PR.

Nevermind, something in service-bindings-app is still flaking and throwing a v8 error. Completely unrelated to this PR, but preventing it from going green.

authors: Cherry petebacondarwin


text:
Problem accessing data

Hi,
I'm getting partial data in most of the tabs. Sometimes im getting the data after refresh and sometimes its missing.
Im getting following error for events tab:
This page requires data from services that are currently unavailable
Please find my logs:
D, [2019-08-26T11:17:04.870829 #16] DEBUG -- : [ -- ] : [ -- ] : Select for key space_quota_definitions, table space_quota_definitions: SELECT `app_instance_limit`, `app_task_limit`, `created_at`, `guid`, `id`, `instance_memory_limit`, `memory_limit`, `name`, `non_basic_services_allowed`, `organization_id`, `total_reserved_route_ports`, `total_routes`, `total_services`, `total_service_keys`, `updated_at` FROM `space_quota_definitions`
D, [2019-08-26T11:17:04.871373 #16] DEBUG -- : [ -- ] : [ -- ] : Columns removed for key space_quota_definitions, table space_quota_definitions: []
D, [2019-08-26T11:17:04.871929 #16] DEBUG -- : [ -- ] : [ -- ] : Columns available, but not consumed for key space_quota_definitions, table space_quota_definitions: []
D, [2019-08-26T11:17:04.874783 #16] DEBUG -- : [ -- ] : [ -- ] : Caching CC space_quota_definitions data. Count: 2. Retrieval time: 1.085035405 seconds
D, [2019-08-26T11:17:04.874963 #16] DEBUG -- : [ -- ] : [ -- ] : [300 second interval] Starting CC spaces discovery...
D, [2019-08-26T11:17:04.882892 #16] DEBUG -- : [ -- ] : [ -- ] : Caching view model service_brokers data. Compilation time: 6.642494777 seconds
D, [2019-08-26T11:17:04.883510 #16] DEBUG -- : [ -- ] : [ -- ] : [150 second interval] Starting view model service_instances discovery...
D, [2019-08-26T11:17:04.997304 #16] DEBUG -- : [ -- ] : [ -- ] : Select for key spaces, table spaces: SELECT `allow_ssh`, `created_at`, `guid`, `id`, `isolation_segment_guid`, `name`, `organization_id`, `space_quota_definition_id`, `updated_at` FROM `spaces`
D, [2019-08-26T11:17:04.997743 #16] DEBUG -- : [ -- ] : [ -- ] : Columns removed for key spaces, table spaces: []
D, [2019-08-26T11:17:04.997792 #16] DEBUG -- : [ -- ] : [ -- ] : Columns available, but not consumed for key spaces, table spaces: []
I, [2019-08-26T11:17:05.563012 #16]  INFO -- : [ admin ] : [ get ] : /logs_view_model
D, [2019-08-26T11:17:05.597970 #16] DEBUG -- : [ -- ] : [ -- ] : Caching CC spaces data. Count: 421. Retrieval time: 0.722906135 seconds
D, [2019-08-26T11:17:05.608240 #16] DEBUG -- : [ -- ] : [ -- ] : [300 second interval] Starting CC spaces_auditors discovery...
D, [2019-08-26T11:17:05.627998 #16] DEBUG -- : [ -- ] : [ -- ] : Select for key spaces_auditors, table spaces_auditors: SELECT `spaces_auditors_pk`, `space_id`, `user_id` FROM `spaces_auditors`
D, [2019-08-26T11:17:05.628552 #16] DEBUG -- : [ -- ] : [ -- ] : Columns removed for key spaces_auditors, table spaces_auditors: []
D, [2019-08-26T11:17:05.628596 #16] DEBUG -- : [ -- ] : [ -- ] : Columns available, but not consumed for key spaces_auditors, table spaces_auditors: []

W, [2019-08-26T11:18:54.128271 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:d0b0390c-9e9f-4599-89e6-344e1cc79f55:10.xx.xxx.136 is not responding, its status will be checked again next refresh
W, [2019-08-26T11:18:54.129630 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:dc4353f2-2086-489e-bd6d-126de32cb0d4:10.xx.xxx.18 is not responding, its status will be checked again next refresh
W, [2019-08-26T11:18:54.130577 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:8a567467-ebdf-4e88-b423-f2a6ba9c6263:10.xx.xxx.30 is not responding, its status will be checked again next refresh
W, [2019-08-26T11:18:54.130691 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:80c785c9-ff8a-41ea-be4c-619864ee4a87:10.xx.xxx.43 is not responding, its status will be checked again next refresh
W, [2019-08-26T11:18:54.130767 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:2d9cff1d-5381-4d7f-825b-04c7eede6846:10.xx.xxx.45 is not responding, its status will be checked again next refresh
W, [2019-08-26T11:18:54.130834 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:1d4148d7-fd72-408c-bdee-79166b43d6bc:10.xx.xxx.85 is not responding, its status will be checked again next refresh

I have provided proper credentials of NATS, UAADB and CCDB. But not sure why im still getting issues. Could you please help me on this.
Thanks,
Akhilesh Appana

Hi,
I tried increasing the value of doppler_rollup_interval. But it didnt help me.
After repushing the application, im not able to get the data in other tabs as wells. Im getting data only under App Instances, Quotas, Buildpacks, domains.

Getting partial data under organizations tab:

Log:
W, [2019-08-27T05:32:31.614854 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:e926d44c-97c2-4763-9bbc-525c1765aa47:10.xx.xxx.62 is still not responding
W, [2019-08-27T05:32:31.614978 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:4979e185-2464-4f9a-8b2b-fbdc6d026fcc:10.xx.xxx.156 has been recognized as disconnected
W, [2019-08-27T05:32:31.615047 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:16f919bd-29a8-412a-99df-38821d3f49aa:10.xx.xxx.119 has been recognized as disconnected
W, [2019-08-27T05:32:31.615408 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:b0a83248-b821-4785-bd4a-c30cd1034420:10.xx.xxx.68 has been recognized as disconnected
W, [2019-08-27T05:32:31.615883 #16]  WARN -- : [ -- ] : [ -- ] : The grootfs component grootfs:c424d550-cf61-4ae3-8213-de6ffaae2df9:10.xx.xxx.41 is not responding, its status will be checked again next refresh

Hi,
Please find the version below:

After accessing the application, i dont see data in almost tabs and partial data in few tabs.
But if i leave the application open for 1 or 2 hours, i see complete data is available in all the tabs.
When i refresh the application again, all the data is missing.
Please check the screenshot below. I was getting partial data before for organizations tab. Now when i open the application for 1 or 2 hours i can see the data as shown below.

NOTE: Whenever im refreshing the application, my data is missing. its taking a lot of time to fetch the data.
Please let me know if there is something i can do to solve this issue.

Hi,
I used the default configuration and pushed it.
I mean refreshing the application in chrome not by repushing it.  Ideally it takes time to retrieve the data for the first time when we push it and after that it should provide us the results.
But in my case without repushing it, when i just refresh the application in chrome, my data is missing in few tabs. When i left opening that application in chrome for 1 hour, im getting all the data. Ideally it shouldn't happen but this is what happening to me.
Latest Screenshot:
I can see that doppler things are in offline state.

Thanks,
Akhilesh Appana

@Akhilesh-Anb
For the offline doppler items, you might increase the doppler_rollup_interval. If the admin ui is not re-notified of the component in doppler_rollup_interval*4 seconds, then the component is considered as offline. Default is 30 seconds. In my bosh-lite test environment, I changed the doppler_rollup_interval to 60 seconds. I also changed it to a larger value in a production environment.
Regarding the others empty tabs, all I can suggest is to look for errors in the admin-ui.log or in the web browser itself. If the CCDB/UAADB access is slow or limited, then that could cause the problems in the other tabs.
There are also a bunch of tabs that likely won't have any records unless you use some of their resources in your CF environment.

@Akhilesh-Anb
If you are running this as a CF app, you also might increase your memory allocation for the admin-ui app.

Hi,
I tried increasing the memory. I'm getting the data now except in Events Tab. I dont see any error in log related to EVENTS tab.

@Akhilesh-Anb There are so many events in a CF system of any significant size. The default admin configuration limits these to the last 7 days: https://github.com/cloudfoundry-incubator/admin-ui/blob/master/config/default.yml#L14.
Try fewer than 7 days and see if this solves your problem. It is also possible that the events retrieval is just taking longer due to the magnitude of the records.

I am closing this due to the memory increase largely solving your problem.

source: gharchive/issue

authors: Akhilesh-Anb rboykin

repo: cloudfoundry-incubator/admin-ui

license_type: permissive

license_source: bigquery


text:
Update README.md

teeny tiny typo

@mbildner - did you by chance take care of the CLA? Per instructions, if you have, then we can close/reopen and merge.

ping @mbildner

source: gharchive/pull-request

authors: erjohnso johnsonj mbildner


text:
Garden-linux to understand poxy

Hi All
I'm trying to setup lattice at my work environment.  I'm behind a corporate proxy so garden-linux is unable to download docker images.
[logs] 24 Mar 02:10 [garden-linux|lattice-cell-01] {"timestamp":"1427177426.772569895","source":"garden-linux","message":"garden-linux.pool.j88ebebafn8.create-rootfs.failed-to-fetch","log_level":2,"data":{"attempt":2,"error":"Get https://index.docker.io/v1/repositories/cloudfoundry/lattice-app/images: dial tcp 162.242.195.84:443: connection timed out","of":3,"session":"2.226.1"}}

The proxy settings works from within that Vagrant box (VM).
$time curl https://index.docker.io/v1/repositories/cloudfoundry/lattice-app/images
[{"checksum": "", "id": "d7b54f2e72f1f93c7362a984458ff007906c704c522f20cb980318d2648cece4"}, {"checksum": "", "id": "b27d3cc7b2c55295051a992b0da815af8eae1e8f1045ed9871389df34cd77432"}, {"checksum": "", "id": "29d531509fb1a8c6592643d2ed20882ea77ff04a9f3691b5eb5e91ec4468c50d"}, {"checksum": "", "id": "ab18e115d7440026f4ac4081d89f1325a7408460db512ca48c6de6cecc744ef9"}, {"checksum": "", "id": "5df4437d2e8c2ce957958dc2704784a9bb65b78c9f51c70b6ef7c6d688cecd9a"}, {"checksum": "", "id": "398081adea6bc20de2000eebaf4c858a653dae94fa1b0905dfbca6080378f1d7"}, {"checksum": "", "id": "f836b582908834f53e3c06b1bb4e7757ddcd09119ac3a32666d14e73f0645e46"}, {"checksum": "", "id": "23b6fd800750cd75309ce463f23b033e073cf6a8bbd663c665f06ca0ea3ecdf3"}, {"checksum": "", "id": "894fd61c3e126b7266bd79a33d2ec9eb51d5b5fc255d27c2a0bcaa64495e1e3d"}, {"checksum": "", "id": "765b72bbb48506cc0e963d972b2ad1f5203df7cd0577f192d804cafb5000b7b8"}, {"checksum": "", "id": "e9707edecc492141d0f382278d651976ba07cb29eedae8a9d41f693e979b73dd"}, {"checksum": "", "id": "4a138b3e236e63b77b41f46f655f5927822a508da384f40aecd3825f2917b5ea"}, {"checksum": "", "id": "d940f6fef5912748063c2de1b8b4c39d7276ae15f4b7bd22018b6e5d7ea8a711"}, {"checksum": "", "id": "25fb2184d4afbb495e9ae02a677831345b0803ba92e4d88a5f50aab60a85d27e"}, {"checksum": "", "id": "df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b"}, {"checksum": "", "id": "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"}]
real    0m1.527s
user    0m0.012s
sys     0m0.012s

Is there a way we can configure garden-linux pick up these http & https proxy settings ?

Hello Team,
Have a quick question.  Garden linux picks up environment variables set in
$cat /var/lattice/setup/lattice-environment
CONSUL_SERVER_IP=192.168.11.11
SYSTEM_DOMAIN=192.168.11.11.xip.io
LATTICE_CELL_ID=lattice-cell-01
GARDEN_EXTERNAL_IP=192.168.11.11
CONSUL_SERVER_IP=192.168.11.11
SYSTEM_DOMAIN=192.168.11.11.xip.io
LATTICE_CELL_ID=lattice-cell-01
GARDEN_EXTERNAL_IP=192.168.11.11
HTTPS_PROXY=https://porxy_host:port
https_proxy=https://porxy_host:port
HTTP_PROXY=http://porxy_host:port
http_proxy=http://porxy_host:port

which helps me move on from "dial timeout" error but fails here.
02 Apr 03:19 [garden-linux|lattice-cell-01] {"timestamp":"1427959183.051491737","source":"garden-linux","message":"garden-linux.pool.k910h5co905.create-rootfs.fetch.using-cached","log_level":1,"data":{"layer":"29d531509fb1a8c6592643d2ed20882ea77ff04a9f3691b5eb5e91ec4468c50d","repo":{"Scheme":"docker","Opaque":"","User":null,"Host":"","Path":"/cloudfoundry/lattice-app","RawQuery":"","Fragment":"latest"},"session":"2.9.1.1","tag":"latest"}}
.
.
.
02 Apr 03:19 [garden-linux|lattice-cell-01] time="2015-04-02T07:19:52Z" level="error" msg="[warning]: couldn't run auplink before unmount: exec: \"auplink\": executable file not found in $PATH"
02 Apr 03:19 [garden-linux|lattice-cell-01] {"timestamp":"1427959192.989367485","source":"garden-linux","message":"garden-linux.pool.destroy.destroyed","log_level":1,"data":{"id":"k910h5co905","session":"2.10"}}

but when i simply hardcode using os.Setenv("http://proxyhost:port") my proxy in old/main.go things work perfectly well.  I'm able to download images without any problem.   will it be a good idea to add a command line option to garden-linux that takes proxy variables?
This is really a showstopper for us. :-(  Any help would great.

I may be misreading but that auplink error is just a warning (which
unfortunately there is no way to silence). Is something still not working?
On Apr 1, 2015 8:42 AM, "Dhilip" notifications@github.com wrote:

Hello Team,
Have a quick question. Garden linux picks up environment variables set in
$cat /var/lattice/setup/lattice-environment
CONSUL_SERVER_IP=192.168.11.11
SYSTEM_DOMAIN=192.168.11.11.xip.io
LATTICE_CELL_ID=lattice-cell-01
GARDEN_EXTERNAL_IP=192.168.11.11
CONSUL_SERVER_IP=192.168.11.11
SYSTEM_DOMAIN=192.168.11.11.xip.io
LATTICE_CELL_ID=lattice-cell-01
GARDEN_EXTERNAL_IP=192.168.11.11
HTTPS_PROXY=https://porxy_host:port
https_proxy=https://porxy_host:port
HTTP_PROXY=http://porxy_host:port
http_proxy=http://porxy_host:port
which helps me move on from "dial timeout" error but fails here.
02 Apr 03:19 [garden-linux|lattice-cell-01] {"timestamp":"1427959183.051491737","source":"garden-linux","message":"garden-linux.pool.k910h5co905.create-rootfs.fetch.using-cached","log_level":1,"data":{"layer":"29d531509fb1a8c6592643d2ed20882ea77ff04a9f3691b5eb5e91ec4468c50d","repo":{"Scheme":"docker","Opaque":"","User":null,"Host":"","Path":"/cloudfoundry/lattice-app","RawQuery":"","Fragment":"latest"},"session":"2.9.1.1","tag":"latest"}}
.
.
.
02 Apr 03:19 [garden-linux|lattice-cell-01] time="2015-04-02T07:19:52Z" level="error" msg="[warning]: couldn't run auplink before unmount: exec: "auplink": executable file not found in $PATH"
02 Apr 03:19 [garden-linux|lattice-cell-01] {"timestamp":"1427959192.989367485","source":"garden-linux","message":"garden-linux.pool.destroy.destroyed","log_level":1,"data":{"id":"k910h5co905","session":"2.10"}}
but when i simply hardcode using os.Setenv("http://proxyhost:port") my
proxy in old/main.go things work perfectly well. I'm able to download
images without any problem. will it be a good idea to add a command line
option to garden-linux that takes proxy variables?
This is really a showstopper for us. :-( Any help would great.
—
Reply to this email directly or view it on GitHub
https://github.com/cloudfoundry-incubator/garden-linux/issues/24#issuecomment-88527647
.

@vito Thanks for the response.
When i set up proxy variables via  /var/lattice/setup/lattice-environment and vagrant reload, i do not get
dial tcp 162.242.195.84:443: connection timed out"

the original error, but i get
garden-linux.pool.k910h5co905.create-rootfs.fetch.using-cached" (probably not an error)
.
.
and
.
.
nmount: exec: \"auplink\": executable file not found in $PATH"

and eventually apps dont come up, but when i revert that change in 'lattice-environment', simply (just as a test) hardcode
line 226
if len(*tag) > 2 {
		println("-tag parameter must be less than 3 characters long")
		println()
		flag.Usage()
		return
	}
os.Setenv("http_proxy", "http://myproxyport")

in 'old/main.go' and 'vagrant reload' the apps are downloaded properly and they come up.   I also do not notice any auplink error that time.  Any clues?

@dhilipkumars Did you ever reach any kind of solution on this?
I'm not very familiar with how lattice runs garden-linux, so no idea how the contents of /var/lattice/setup/lattice-environment makes it into the garden-linux env. Could be an issue on the Lattice end.

@goonzoid
Sorry for the delayed response.  I had stopped keeping track of this issue.  The only way i was able to resolve this error is by setting proxy settings inside garden-linux
os.Setenv("http_proxy", "http://myproxy:port")

something like above...in the main function.  rebuild garden-linux and deploy it again inside the vm.
I will close this issue now as i do not have enough evidence that this is a garden-linux related problem.

I Do think there should be a way to tell garde-linux and its containers to set http_proxy and https_proxy. Is there anything in the backlog on this?

@bonzofenix The way to do this is to set HTTP_PROXY or HTTPS_PROXY environment variables. If you're using the BOSH release then there's a pull request to expose these.

authors: bonzofenix dhilipkumars goonzoid vito

repo: cloudfoundry-incubator/garden-linux


text:
Why do all the logs for this show up in the /var/vcap/sys/log/monit/ sub-directory?

The /var/vcap/sys/log/haproxy/ directory exists, but is empty.

Had a bad TLS certificate (malformed PEM) that was causing haproxy to choke, and couldn't find anything useful until we looked in the monit debug log.  Is it possible that start up messages go to stdout/stderr and that's not being handled properly (i.e. >> $LOG_DIR/haproxy.log 2>&)?
I'll try to get the monit debugging log some time later today, for evidence.
Also, it would be nice to print a message that haproxy logs to syslog, to assist operators troubleshooting...

Here's what we found in /var/vcap/sys/log/monit/haproxy.err.log:
ls: cannot access /var/vcap/packages/*/lib: No such file or directory
ls: cannot access /var/vcap/packages/*/*/*.jar: No such file or directory
/var/vcap/jobs/haproxy/config/ssl/cert-0.pem
[ALERT] 271/195804 (2514) : Proxy 'http-routers', server 'node0' [/var/vcap/jobs/haproxy/config/haproxy.config:118] unable to load CA file '/var/vcap/jobs/haproxy/config/backend-ca-certs.pem'.
[ALERT] 271/195804 (2514) : Proxy 'http-routers', server 'node1' [/var/vcap/jobs/haproxy/config/haproxy.config:119] unable to load CA file '/var/vcap/jobs/haproxy/config/backend-ca-certs.pem'.
[ALERT] 271/195804 (2514) : Proxy 'http-routers', server 'node2' [/var/vcap/jobs/haproxy/config/haproxy.config:120] unable to load CA file '/var/vcap/jobs/haproxy/config/backend-ca-certs.pem'.
[WARNING] 271/195804 (2514) : parsing [/var/vcap/jobs/haproxy/config/haproxy.config:26] : 'option httplog' not usable with frontend 'tcp-frontend_diego_brain' (needs 'mode http'). Falling back to 'option tcplog'.
[WARNING] 271/195804 (2514) : config : 'option forwardfor' ignored for frontend 'tcp-frontend_diego_brain' as it requires HTTP mode.
[WARNING] 271/195804 (2514) : config : 'option forwardfor' ignored for backend 'tcp-diego_brain' as it requires HTTP mode.
[ALERT] 271/195804 (2514) : Fatal errors found in configuration.
Fri Sep 29 19:58:04 UTC 2017: Errored starting HAProxy

As a user and an operator, I would like to see this error message in /var/vcap/sys/log/haproxy/haproxy.log, alongside a message like haproxy logs most of its output to syslog; check /var/log/messages for details

Is this fix something that this project is interested in pursuing?

Absolutely

On Oct 13, 2017, at 8:20 AM, James Hunt notifications@github.com wrote:
Is this fix something that this project is interested in pursuing?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/cloudfoundry-incubator/haproxy-boshrelease/issues/81#issuecomment-336437219, or mute the thread https://github.com/notifications/unsubscribe-auth/AG2SUv4NtySHkpzroyVBpygr58N1Z0wPks5sr1WUgaJpZM4PpHzk.

Converted haproxy to start via BPM, which moves its startup logs into /var/vcap/sys/log/haproxy, and should resolve this. Should be released later this week

authors: geofffranks jhunt

license_source: github-api


text:
Proposal: Create much smaller buildpack container images that never need to be updated

Creating buildpack images
Building the buildpack and their assets
I was temporarily under the impression that the buildpacks themselves (the artifacts referenced from the ZIP files on the individual buildpack repos) were built on top of the stemcells because the buildpack images are updated whenever the stemcell is updated.
This would be wrong, but hard to detect, as our rootfs and stemcells are very close.
I have since learned that the buildpacks are built on OBS "on top of a similar-to-rootfs OS" using Meta Configuration of Cloud:Platform:buildpacks. I'm not really sure what this means, but it sounds correct-ish.
There should never be a reason to rebuild a buildpack on top of a newer rootfs because all buildpack releases have to be backwards compatible to the earliest still supported rootfs. All fixes for CVEs etc. should be in the shared libraries, that are part of the rootfs. Fixes for vulnerabilities in bundled assets are handled by updates to the buildpacks themselves.
Building buildpack images for kubecf
Buildpack releases are converted to container images like any other bosh release, which means they are built on top of the current stemcell.
This is quite wasteful, as the buildpacks themselves will run on top of the stack rootfs and don't need the stemcell at all.
There are only 2 scripts that are executed on these images (inside init containers), the generic spec-copier generated by quarks-operator, and a pre-start script we generate from the helm chart via ops-file.
The spec-copier runs (under time sh -c) both in the ig job and the api pod:
mkdir -p /var/vcap/all-releases/jobs-src/binary-buildpack
cp -ar /var/vcap/jobs-src/* /var/vcap/all-releases/jobs-src/binary-buildpack
chown vcap:vcap /var/vcap/all-releases/jobs-src/binary-buildpack -R

This is completely unneccessary because buildpacks have neither properties nor templates; the cf-operator does not need access to the spec files. For a deployment with both cflinuxfs3 and sle15 stacks these spec-copier scripts add an extra 20 init containers that don't do anything.
The generated pre-start scripts runs in the api pod and looks like this:
mkdir -p "/var/vcap/data/shared-packages/binary-buildpack/"
cp -r /var/vcap/packages "/var/vcap/data/shared-packages/binary-buildpack/"

The buildpack container image is built with whatever stemcell is current when the buildpack is released, leading to a mix of stemcell base images (increasing download time). But there also seems to be a pipeline to periodically rebuild buildpacks on the latest stemcell to bring them all back in sync (but adding to churn in updating kubecf). It is not clear to me why we have both mechanisms.
There is no need to update buildpack container images for security reasons; there simply is no way to exploit any stemcell vulnerability through these hardcoded mkdir, cp, and chown commands.
Build as Data Containers?
Buildpack container images should be built as data containers; they only exist to transport the ZIP file to a shared data volume.
The 2 scripts above could be executed by a minimal alpine image with just busybox, reducing the size of each image by about 1.2GB.
This may not be practical though, e.g. SUSE may not want to ship software based on alpine for support reasons. In that case we could add support for pure data containers build FROM scratch, with a simple standalone copier:
Quarks-Operator support to mark data container
We would require a quarks-operator feature to mark a release (or a job) as a data-only release (or job). Unfortunately bosh/agent/settings are per instance group, so we need a different place to add the information. Technically it belongs on the release, as it describes the release image as not being stemcell based, but putting it on the job would work too (all data containers would only have a single job to copy the data to the shared volume).
The flag would have two effects:

No spec-copier init job will be generated for the job from this release.

Instead of the usual pre-start script check, the init container will just execute the default start command baked into the container. Maybe the release name (or job name) needs to be passed in via an environment variable.

Standalone Copy executable in FROM scratch container
The logic of the data-container pre-start script would be implemented instead in a standalone Go binary. It performs the equivalent of:
mkdir -p "/var/vcap/data/shared-packages/$RELEASE/"
cp -r /var/vcap/packages "/var/vcap/data/shared-packages/$RELEASE/"

The RELEASE is defined by an environment variable, and the binary could be a trivial modification of the example_test.go program from otiai10/copy: Golang copy directory recursively.
kubecf changes
kubecf no longer needs to generate the pre-start scripts for each buildpack, but sets the quarks-operator flag on the release or job to mark it as a data-release.
The pipeline updating buildpack images with new stemcells can be retired.

Independent of this issue/proposal: Why are our stemcells so huge?
docker@minikube:~> docker history registry.suse.com/cap-staging/suse-binary-buildpack:SLE_15_SP1-26.6-7.0.0_374.gb8e8e6af-1.0.36.1
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
85c7c1f86351        12 days ago         /bin/sh -c #(nop) ADD dir:c89cab58cf74c95315…   8.62MB
<missing>           12 days ago         /bin/sh -c #(nop)  ENV RELEASE_VERSION=1.0.3…   0B
<missing>           12 days ago         /bin/sh -c #(nop)  ENV RELEASE_NAME=suse-bin…   0B
<missing>           12 days ago         /bin/sh -c mkdir -p  /var/vcap/data/blobs  /…   0B
<missing>           12 days ago         /bin/sh -c #(nop)  LABEL version.generator.f…   0B
<missing>           12 days ago                                                         1.22GB              Imported from -

Independent of this issue/proposal: Why are our stemcells so huge?
docker@minikube:~> docker history registry.suse.com/cap-staging/suse-binary-buildpack:SLE_15_SP1-26.6-7.0.0_374.gb8e8e6af-1.0.36.1
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
85c7c1f86351        12 days ago         /bin/sh -c #(nop) ADD dir:c89cab58cf74c95315…   8.62MB
<missing>           12 days ago         /bin/sh -c #(nop)  ENV RELEASE_VERSION=1.0.3…   0B
<missing>           12 days ago         /bin/sh -c #(nop)  ENV RELEASE_NAME=suse-bin…   0B
<missing>           12 days ago         /bin/sh -c mkdir -p  /var/vcap/data/blobs  /…   0B
<missing>           12 days ago         /bin/sh -c #(nop)  LABEL version.generator.f…   0B
<missing>           12 days ago                                                         1.22GB              Imported from -

Because we tried to have the same comparable packages that the Ubuntu stemcell has. @manno did already some research what could be saved without obvious issues.

authors: jandubois thardeck

repo: cloudfoundry-incubator/kubecf


text:
Cf commands fails intermittently dial tcp: i/o timeout

Hi,
My CF CLI commands fail intermittently giving TCP timeout error.
I've gone through below issue, it says a retry is introduced in v6.6.2
https://github.com/cloudfoundry/cli/issues/272
I am using version 6.14.1+dc6adf6-2015-12-22 for cli, how can I verify that retry is being called?
As in CF debug logs I see request is being logged only one time, however tcp: i/o timeout is logged twice two time.

Hi @nitinpadalia
The CLI does not expose any logs that would help you to determine if, and how many retries have occurred. CF trace would look no different.
The tcp i/o timeout message comes from your system. I don't know how the message was logged twice (e.g. right after each other, or with CF TRACE message templating around it?).
Two options to try is to either put a proxy between your CLI and API endpoint that logs the requests going through, or compile a special version of the CLI with extra debugging statements to log retries.
Feel free to reach out if you need any help with that.
Regards,
Dies Koper
CF CLI PM

authors: dkoper nitinpadalia

repo: cloudfoundry/cli


text:
HTTP health check call timeout hardcoded to one second

This is a follow up of https://github.com/cloudfoundry/healthcheck/issues/5
Issue
It is not possible to configure the timeout for HTTP health calls; it is hard coded to one second.
When the application takes longer than 1 second to respond to http calls, it is immediately marked as unhealthy and restarted by CF.
Context
In many applications the HTTP health endpoint does more than just return 200, e.g. the spring actuator health endpoint tries to open a database connection (if one is configured). Under load, this easily takes longer than one second to succeed, and thus the application instance is restarted, even though it is perfectly healthy.
Steps to Reproduce
Create an application which takes longer than one second to respond for the http health endpoint. It will never succeed to start up.
Expected result
It should be possible to configure the HTTP health check connection timeout via the manifest and/or a push parameter.

Possible dupe #970

Implemented in this story.  Available in capi-release 1.54.0
Docs here

How to specify this within the deployment manifest.yml file?

authors: keyurpd schulzh zrob


text:
Adds Nodejs-CNB to sidebar under Buildpacks

[#170885522]
Co-authored-by: Ryan Moran rmoran@pivotal.io

Hi @ForestEckhardt and @ryanmoran
I'm going to hold off merging this. It showed a merge conflict. It could be that someone has fixed the issue in the meantime. I see the Deploying Apps with the Node.js Cloud-Native Buildpack in the subnav now.
Please reopen if this needs more attention.
TIA, Jane

authors: ForestEckhardt jncd

repo: cloudfoundry/docs-book-cloudfoundry


text:
Data race running gorouter

Running tests caught the following:
==================
WARNING: DATA RACE
Write by goroutine 15:
github.com/cloudfoundry-incubator/routing-api.(*client).SetToken()
/Users/fraenkel/t/src/github.com/cloudfoundry-incubator/routing-api/client.go:48 +0x33
github.com/cloudfoundry/gorouter/route_fetcher.(*RouteFetcher).FetchRoutes()
/Users/fraenkel/t/src/github.com/cloudfoundry/gorouter/route_fetcher/route_fetcher.go:114 +0x125
github.com/cloudfoundry/gorouter/route_fetcher.(*RouteFetcher).StartFetchCycle.func1()
/Users/fraenkel/t/src/github.com/cloudfoundry/gorouter/route_fetcher/route_fetcher.go:47 +0x8f
Previous write by goroutine 16:
github.com/cloudfoundry-incubator/routing-api.(*client).SetToken()
/Users/fraenkel/t/src/github.com/cloudfoundry-incubator/routing-api/client.go:48 +0x33
github.com/cloudfoundry/gorouter/route_fetcher.(*RouteFetcher).subscribeToEvents()
/Users/fraenkel/t/src/github.com/cloudfoundry/gorouter/route_fetcher/route_fetcher.go:72 +0x18c
github.com/cloudfoundry/gorouter/route_fetcher.(*RouteFetcher).StartEventCycle.func1()
/Users/fraenkel/t/src/github.com/cloudfoundry/gorouter/route_fetcher/route_fetcher.go:60 +0x2e

Hi, @fraenkel could you provide config used to run the tests so we can reproduce? Errand or manual? Manifest or config file snippets would be helpful.
Thank you

just ran scripts/test with go 1.5.1
See https://travis-ci.org/cloudfoundry/gorouter/jobs/92951383

Pulling this in and calling it a chore as there doesn't appear to be any user-facing changes.

Closing as this was fixed.

authors: fraenkel shalako

repo: cloudfoundry/gorouter


text:
loggregator.bosh-lite.com Not Found

I deployed CF 251 and tried to access "wss://loggregator.bosh-lite.com:443"
It says "loggregator.bosh-lite.com Not Found"
Everything worked fine with CF 238.
When I took a look at my 251 yml, the loggregator uri was missing.
How should I change the 251 version of my yml to access loggregator?
Here is my CF 238 yml file.
- instances: 1
  name: loggregator_trafficcontroller_z1
  networks:
  - name: cf1
  properties:
    metron_agent:
      zone: z1
    route_registrar:
      routes:
      - name: doppler
        port: 8081
        registration_interval: 20s
        uris:
        - doppler.bosh-lite.com
      - name: loggregator
        port: 8080
        registration_interval: 20s
        uris:
        - loggregator.bosh-lite.com
    traffic_controller:
      zone: z1
  resource_pool: small_z1

Here is my CF 251 yml file.
- instances: 1
  name: loggregator_trafficcontroller_z1
  networks:
  - name: cf1
  properties:
    prometheus:
      influxdb:
        url: 10.10.18.55:9008
        database: cf_metric_db
        user: admin
        pass: admin
      listen_addr: 127.0.0.1:9999
      service_name: loggregator_trafficcontroller_z1
      agent_type: cf
    node_exporter:
      listen_addr: 127.0.0.1:9100
    consul:
      agent:
        services:
          loggregator_trafficcontroller: {}
    loggregator:
      uaa:
        client_secret: doppler-secret
    metron_agent:
      zone: z1
    route_registrar:
      routes:
      - name: doppler
        port: 8081
        registration_interval: 20s
        uris:
        - doppler.bosh-lite.com
    traffic_controller:
      zone: z1

Sorry for the delayed response: but loggregator.bosh-lite.com should be doppler.bosh-lite.com

repo: cloudfoundry/loggregator


text:
fix sonar finding

first only the found smell
https://sonarcloud.io/project/issues?impactSeverities=HIGH&resolved=false&sinceLeakPeriod=true&types=CODE_SMELL&id=cloudfoundry-identity-parent
later also implemented recommendations from sonar linter

re-scan
https://sonarcloud.io/summary/new_code?id=cloudfoundry-identity-parent&pullRequest=2592

repo: cloudfoundry/uaa


text:
help: select 如何使用

暂时还没有实现嵌套的功能，后续看能不能支持

最新版本看一下能不能解决你的问题，我写了一个在design.ts中，把注释去掉可以查看效果

option传入参数新增children属性，配置和option的一致，但是children不支持rules和children属性

核心逻辑在CForm.vue中，将children中的tagname传入内置组件component中渲染

至于children中是否还有children，此类场景不是很常见就不去支持了，感兴趣的可以自己实现下

ok，我试一下

license: MIT


text:
vaccelrt build on arm 32-bit

It seems that vaccelrt does not build cleanly on 32-bit architectures due to an inconsistency in type definitions.

fixed with #63

repo: cloudkernels/vaccelrt


text:
doc: fix helm chart URL for the install process

Closes #149
Signed-off-by: Jonathan Gonzalez V jonathan.gonzalez@enterprisedb.com

/ok-to-merge

repo: cloudnative-pg/cloudnative-pg


text:
Add Syself to ADOPTERS.md

Adding Syself as adopter. Thanks a lot for the cool project!

@janiskemper can you please rebase your patch?

@sxd just pointed out to me that you have added @batistein as the user requesting this. I am OK to add him, but could you please ensure that at least he adds a comment to this PR saying "I agree" or something? Thanks.

Hi @gbartolini thanks for the verification. Yes I agree!

Thank you. @janiskemper can you please proceed again with the rebase? Thanks!

Too late ... If you can do it now, great. Otherwise, let me ping you after we have released 1.23.2 - this is becoming a never ending story

Thanks! Seems to have worked anyway somehow.

authors: batistein gbartolini janiskemper


text:
CNDS2024の準備

全体

[x] 背景の差し替え

ナビゲーション

[x] Atendee guideの差し替え
[x] public liveの削除（Track switcherの方に移ったので）
[x] 問い合わせフォームの修正

動作確認

[x] 全てのナビゲーション先の確認

[x] 不要なものがあれば消す

[x] 配信
[x] チャット
[x] コミュニティLT

[x] 配信との切り替えの動線（from/to両方）

完了したのでcloseします。

repo: cloudnativedaysjp/dreamkast-ui


text:
zh-translation:docs/root/configuration/http/http_filters/cors_filter.rst

issue: #275

@addozhang 已参考修改。

@addozhang 已参考修改。

@scilla0531 看一下这个 PR 是否还有问题。

@scilla0531 看一下这个 PR 是否还有问题。

repo: cloudnativeto/envoy


text:
Feat(manifests): Generate Typescript types from CRDs

This adds a make target to generate the Typescript types ingested by the uis when recreating the manifests of the greenhouse crontroller.

Noticed that there are changes to schema.d.ts when I run make generate-types. Should we add these changes to the PR?

Noticed that there are changes to schema.d.ts when I run make generate-types. Should we add these changes to the PR?

It's just reorder of the CRDs, right? Yes can always be committed, but make no difference imho.

I would increase the version please :)

Version is updated :)

authors: IvoGoman uwe-mayer

repo: cloudoperators/greenhouse


text:
Add ability to configure instance tenancy

what

Add new variable tenancy that allows user to configure instance tenancy (default (default), dedicated, or host)

why

An organization that I work with has a security policy that requires use of dedicated tenancy. This PR adds the capability to do that when using this module.

references

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#tenancy
Closes #139

/test all

/test all

Looks like the pipeline runs are failing on "Update GitHub Status for pending".
https://github.com/cloudposse/actions/actions/runs/3145776764/jobs/5113473987

/test all

/test all

Will do, thanks 😄

@Nuru done, PTAL

/test all

bump @Nuru PTAL

/test all

authors: Nuru RothAndrew


text:
Made necessary changes for worker node AL2023 in version 1.0.1

what
 Added changes for AL2023 worker node AMI based on version tag v1.0.0.
why
     Currently, there are no changes for AL2023, even in the latest tag 2.12.0. The necessary modifications for AL2023 EKS worker nodes are not present.
The existing EKS nodes running Amazon Linux 2 have multiple vulnerabilities. To remediate these issues, we need to upgrade our EKS worker nodes to AL2023 worker nodes.

references
     We have tested these changes in our infrastructure, and they are working well.
We request that these changes be merged and released as a new tag, 1.0.1, which will include all the updates up to tag 1.0.0, along with the changes for AL2023 worker nodes.

@Darsh8790 Thank you for this PR.
I appreciate how much work you put into this. However, we cannot accept it as-is. If you do not want to work on it further, I understand, and we will use this to guide our future support for AL2023.
The main issue I see right off the bat is that this PR effectively breaks support for any AMI family other than AL2023. We would want to maintain backward compatibility for any AMIs Amazon continues to support.
Also, for this particular module, we are not supporting changes to v1. Although in general we want to allow for modifications for old major versions, this module's v1 was never really solid enough for that. So we would want these modifications to be made to the current version, which as of this writing is v2.12.0. (Note that even if we made the changes to v1, we would want to maintain support for older AMIs.)
Let us know how you'd like to proceed.

Working on https://github.com/cloudposse/terraform-aws-eks-node-group/pull/185 to add support of AL2023 with latest module version :)

authors: Darsh8790 Nuru QuentinBtd

repo: cloudposse/terraform-aws-eks-node-group


text:
create an instance parameter group

create an instance parameter group that is applied to the nodes in the cluster and pass in an instance_parameters list to modify server variables (e.g. max_packet_size, wait_timeout, and interactive_timeout)

@renegaderyu  thanks for the PR!
Looks good.
Please rebuild README (to add the new var) by running these commands from the module directory:
make init
make readme/deps
make readme

thanks @renegaderyu

authors: aknysh renegaderyu

repo: cloudposse/terraform-aws-rds-cluster


text:
add allow_ssl_requests_only flag

what

fix bug from #55

why

There was a missing data "aws_partition"

/test all


text:
Terraform 0.14 upgrade

what

Upgrade to support Terraform 0.14 and bring up to current Cloud Posse standard

why

Support Terraform 0.14

/test all


text:
terraform-provider-aws v4.0 incompatibility

Describe the Bug
Upgrading to the latest hashicorp/aws v4.0.0 (https://registry.terraform.io/providers/hashicorp/aws/latest) breaks terraform-aws-tfstate-backend with the following error:
$ terraform plan
Acquiring state lock. This may take a few moments...
Releasing state lock. This may take a few moments...
╷
│ Error: Unsupported attribute
│
│   on .terraform/modules/terraform_state_backend.log_storage/main.tf line 30, in resource "aws_s3_bucket" "default":
│   30:         for_each = var.enable_glacier_transition ? [1] : []
│
│ This object does not have an attribute named "enable_glacier_transition".
╵
╷
│ Error: Unsupported attribute
│
│   on .terraform/modules/terraform_state_backend.log_storage/main.tf line 44, in resource "aws_s3_bucket" "default":
│   44:         for_each = var.enable_glacier_transition ? [1] : []
│
│ This object does not have an attribute named "enable_glacier_transition".

Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
$ terraform version
Terraform v1.1.5
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.0.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/time v0.7.2

Temporary solution:
Restricting AWS provider to 3.x gets the tfstate-backend plugin working as expected
$ cat versions.tf
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "< 4.0"
    }
...

is there any news with this?

Same issue here. It appears that there's already a PR #113 open. Any chance this can be expedited?

authors: ZIMkaRU rstml sfuerte


text:
fix(data-source.tf): address deprecation warning

what
changes
role_arn -> assume_role.role_arn
why
addresses deprecated parameter warning
Warning: Deprecated Parameters

  with module.xxx.data.terraform_remote_state.data_source[0],
  on ../terraform-yaml-stack-config/modules/remote-state/data-source.tf line 88, in data "terraform_remote_state" "data_source":
  88: data "terraform_remote_state" "data_source" {

The following parameters have been deprecated. Replace them as follows:
  * role_arn -> assume_role.role_arn

(and 3 more similar warnings elsewhere

@mikedizon hey mike, thanks for this, see #93

Also if you're on cloudposse's public slack you can see some discussion here

@kevcube ah thanks, I guess i've been out of the loop on things!

Fixed by #105 released in v1.8.0

authors: Nuru kevcube mikedizon

repo: cloudposse/terraform-yaml-stack-config


text:
fix: foreign key reference case sensitivity

Fixes #99
This PR is fixing the above mentioned issue, and includes following changes:
(1) mysql/toddl.go and postgres/toddl.go: added check for referenced column if column does not exist, checking the possible type mismatched column with lower case column names. added tests for the same.

I just identified that this approach won't work, as there is a possibility that, referenced table is not converted yet. i'll draft new approach for handling this issues.
Here's what i think, we have to check for case sensitivity in a separate function, after all the tables are converted in schemaToDDL function, which will convert refered table name of column name if not found and found as part of lower case check, other wise drop that foreign key with reporting unexpected condition.

Merging this PR as all the comments are resolved.

Merging this PR as all the comments are resolved.

repo: cloudspannerecosystem/harbourbridge


text:
Cognito:RefreshTokenValidity internal failure in CF when float type is used

In last troposphere 2.5.1; the Cognito:RefreshTokenValidity changed from a positive-integer to a float.
While in CF when a float is given the stack failed with the following error :
UPDATE_FAILED | AWS::Cognito::UserPoolClient | Client | Internal Failure
AWS documentation describes this parameters as a "number of days".

Hi Mark,
The above fixe has been successfully apply on my side.
BR

Thanks. Fixed.

Hi,
When is the new tropo release expected with this fix?
I would like to evaluate the corrective plan on my side as many users are stuked with this.
OR an heavy patching plan or temporized until new release.
Thanks in advance.

Should this be validated as a double at all? Since the AWS documentation refers to an integer.
[2019-09-11 09:49:27] - cognito UserPoolClientApp AWS::Cognito::UserPoolClient UPDATE_FAILED Property validation failure: [Value of property {/RefreshTokenValidity} does not match type {Integer}]
Shouldn't the positive_integer validator be used in this case?

authors: arnaudgay-cr mMeijden markpeek

repo: cloudtools/troposphere


text:
Create Documentation To Help Contributors

"Explicit is better than implicit."
I got all of the instructions in this documentation commit by following the bread crumbs for the cloudtools/troposphere GitHub repository. It was not hard, but it wasn't as easy as reading a markdown document. My hope is that this commit will make it easier for more people to contribute quality code to this project.
Since there was no docs directory, I made an aesthetic choice to put the CONTRIBUTE.md file into a sub-directory. I am open to moving it.

👍   This PR helped me figure out how to submit a test-passing PR for an example update.

Thanks!

authors: dpalomin markpeek rcuza


text:
Docker version check failed

Description
Crawler docker version check fails for rc build versions of docker
How to Reproduce
Install any rc build docker version and run crawler with it.
Log Output
Traceback (most recent call last):
 File "crawler.py", line 239, in <module>
   main()
 File "crawler.py", line 233, in main
   worker.run()
 File "/crawler/worker.py", line 83, in run
   self.iterate(time_to_sleep)
 File "/crawler/worker.py", line 46, in iterate
   for frame in self.crawler.crawl():
 File "/crawler/containers_crawler.py", line 85, in crawl
   host_namespace=self.host_namespace)
 File "/crawler/containers.py", line 83, in get_containers
   for _container in containers_list:
 File "/crawler/containers.py", line 26, in list_all_containers
   user_list=user_list):
 File "/crawler/dockercontainer.py", line 59, in get_docker_containers
   host_namespace=host_namespace)
 File "/crawler/dockercontainer.py", line 171, in __init__
   self.root_fs = get_docker_container_rootfs_path(self.long_id)
 File "/crawler/utils/dockerutils.py", line 359, in get_docker_container_rootfs_path
   rootfs_path = _get_container_rootfs_path_aufs(long_id, inspect)
 File "/crawler/utils/dockerutils.py", line 277, in _get_container_rootfs_path_aufs
   if VERSION_SPEC.match(semantic_version.Version(server_version)):
 File "/usr/local/lib/python2.7/site-packages/semantic_version/base.py", line 75, in __init__
   major, minor, patch, prerelease, build = self.parse(version_string, partial)
 File "/usr/local/lib/python2.7/site-packages/semantic_version/base.py", line 208, in parse
   raise ValueError("Invalid leading zero in minor: %r" % version_string)
ValueError: Invalid leading zero in minor: u'17.03.0-ce'

Docker info
sudo docker info
Containers: 13
Running: 7
Paused: 0
Stopped: 6
Images: 7
Server Version: 17.03.0-ce

Solution
Stefan mentioned, with semantic_version=2.2, it work. But we are using sematic_version 2.5.
Fixed this issue and add a new docker version in the travis tests

Docker has decided to have monthly release cycle and follow YY.MM version format.
https://github.com/docker/docker/blob/master/CHANGELOG.md
We need long term fix for this

repo: cloudviz/agentless-system-crawler


text:
PlatformException when trying to invoke createSurfaceTexture.

This is the exception I get when I try to initialize the RTCVideoRenderer. I have followed this article background execution with dart
By now I think you all got where I am coming from. I am trying to run the dart code when I get a update from firebase to initiate the rtc handshake.
Can any one suggest what I should do here. I can sacrifice the support of ios if required.
E/flutter ( 2286): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Attempt to invoke interface method 'io.flutter.view.TextureRegistry$SurfaceTextureEntry io.flutter.view.TextureRegistry.createSurfaceTexture()' on a null object reference, null)
E/flutter ( 2286): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter ( 2286): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)
E/flutter ( 2286): <asynchronous suspension>
E/flutter ( 2286): #2      RTCVideoRenderer.initialize (package:flutter_webrtc/rtc_video_view.dart:29:24)
E/flutter ( 2286): <asynchronous suspension>
E/flutter ( 2286): #3      _MyAppState.initializeSocket (package:background_plugin_example/main.dart:65:28)
E/flutter ( 2286): <asynchronous suspension>
E/flutter ( 2286): #4      _MyAppState.helloWorld (package:background_plugin_example/main.dart:188:11)
E/flutter ( 2286): <asynchronous suspension>
E/flutter ( 2286): #5      callbackDispatcher.<anonymous closure> (package:background_plugin/background_plugin.dart:43:8)
E/flutter ( 2286): <asynchronous suspension>
E/flutter ( 2286): #6      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:383:55)
E/flutter ( 2286): <asynchronous suspension>
E/flutter ( 2286): #7      MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:351:54)
E/flutter ( 2286): #8      BinaryMessages.handlePlatformMessage (package:flutter/src/services/platform_messages.dart:76:33)
E/flutter ( 2286): <asynchronous suspension>
E/flutter ( 2286): #9      _invoke3.<anonymous closure> (dart:ui/hooks.dart:263:15)
E/flutter ( 2286): #10     _rootRun (dart:async/zone.dart:1124:13)
E/flutter ( 2286): #11     _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter ( 2286): #12     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
E/flutter ( 2286): #13     _invoke3 (dart:ui/hooks.dart:262:10)
E/flutter ( 2286): #14     _dispatchPlatformMessage (dart:ui/hooks.dart:136:5)
E/flutter ( 2286):

Complete code that runs from background trigger
  static Map<String, dynamic> configuration = {
    "iceServers": [
      {"url": "stun:stun.l.google.com:19302"},
    ],
    "sdpSemantics": "unified-plan"
  };

  static final Map<String, dynamic> _constraints = {
    'mandatory': {
      'OfferToReceiveAudio': true,
      'OfferToReceiveVideo': true,
    },
    'optional': [],
  };

  static final Map<String, dynamic> _config = {
    'mandatory': {},
    'optional': [
      {'DtlsSrtpKeyAgreement': true},
    ],
  };

  static final Map<String, dynamic> mediaConstraints = {
    "audio": {
      "channelCount": "2",
      "sampleRate": "48000"
    },
    "video": false
  };

  static int a = 420;
  static int b = 401;

  static void initializeSocket(
      RTCVideoRenderer _remoteContainer, RTCVideoRenderer _localContainer,
      RTCPeerConnection _remotePeer, RTCPeerConnection _localPeer, IOWebSocketChannel channel
      ) async {
    assert(_remoteContainer != null, "remote container should not be null");
    assert(_localContainer != null, "remote container should not be null");
    await _remoteContainer.initialize();
    await _localContainer.initialize();
    channel = IOWebSocketChannel.connect('ws://192.168.31.192:8080/echo?id=$a');
    channel.stream.listen((data) async {
      data = json.decode(data);
      switch(data['type']) {
        case "offer": {
          _localPeer = await createPeerConnection(configuration, _config);
          MediaStream m = await navigator.getUserMedia(mediaConstraints);
          _localContainer.srcObject = m;
          _localPeer.addStream(m);
          _localPeer.onIceCandidate = (RTCIceCandidate candidate) {
            channel.sink.add(json.encode({
              "type": "candidate",
              "id": "$b",
              "message": {
                "candidate": {
                  "candidate": candidate.candidate,
                  "sdpMid": candidate.sdpMid,
                  "sdpMlineIndex": candidate.sdpMlineIndex
                }
              }
            }));
          };
          _localPeer.onAddStream = (MediaStream m) {
            _remoteContainer.srcObject = m;
          };

          _localPeer.setRemoteDescription(RTCSessionDescription(data['message']['sdp'], data['message']['type']));
          _localPeer.createAnswer(_constraints).then((RTCSessionDescription desc) {
            _localPeer.setLocalDescription(desc);
            channel.sink.add(json.encode({
              "type": "answer",
              "id": "$b",
              "message": {
                "type": desc.type,
                "sdp": desc.sdp
              }
            }));
          });
          break;
        }
        case "answer": {
          _localPeer.setRemoteDescription(RTCSessionDescription(
              data['message']['sdp'],
              data['message']['type']
          ));
          break;
        }
        case "candidate": {
          if (_localPeer != null) {
            RTCIceCandidate candidate = new RTCIceCandidate(
                data['message']['candidate']['candidate'].toString(),
                data['message']['candidate']['sdpMid'].toString(),
                int.parse(data['message']['candidate']['sdpMLineIndex'] ?? "0"));
            _localPeer?.addCandidate(candidate);
          }
        }
      }
    });
  }

  static initiateCall(RTCVideoRenderer _remoteContainer, RTCVideoRenderer _localContainer,
      RTCPeerConnection _remotePeer, RTCPeerConnection _localPeer, IOWebSocketChannel channel) async {
    _localPeer = await createPeerConnection(configuration, _config);
    MediaStream m = await navigator.getUserMedia(mediaConstraints);
    _localContainer.srcObject = m;
    _localPeer.addStream(m);

    _localPeer.onIceGatheringState = (RTCIceGatheringState ice) {
      if (ice == RTCIceGatheringState.RTCIceGatheringStateComplete) {
        _localPeer.getLocalDescription().then((RTCSessionDescription desc) {
          channel.sink.add(
              json.encode({
                "type": "offer",
                "id": "$b",
                "message": {
                  "type": desc.type,
                  "sdp": desc.sdp,
                }
              })
          );
        });
      }
    };
    _localPeer.onIceCandidate = (RTCIceCandidate candidate) {
        json.encode({
          "type": "candidate",
          "id": "$b",
          "message": {
            "candidate": {
              "candidate": candidate.candidate,
              "sdpMid": candidate.sdpMid,
              "sdpMlineIndex": candidate.sdpMlineIndex
            }
          }
        });
    };
    _localPeer.onAddStream = (MediaStream m) async {
      _remoteContainer.srcObject = m;
    };
    _localPeer.onAddTrack = (MediaStream s, MediaStreamTrack t) {
      print(s);
      print(t);
    };
    _localPeer.createOffer({}).then((RTCSessionDescription desc) {
      _localPeer.setLocalDescription(desc);
    });
  }

  static void helloWorld() async {
    // PeerConnections
    RTCPeerConnection _localPeer;
    RTCPeerConnection _remotePeer;

    // VideoRenderers
    RTCVideoRenderer _remoteContainer = new RTCVideoRenderer();
    RTCVideoRenderer _localContainer = new RTCVideoRenderer();

    //socket
    IOWebSocketChannel channel;

    await initializeSocket(_remoteContainer, _localContainer, _localPeer, _remotePeer, channel);

    await initiateCall(_remoteContainer, _localContainer, _localPeer, _remotePeer, channel);

    await Future.delayed(Duration(days: 1));

  }

@rushib1 I'm not sure if RTCVideoRenderer can be created in background mode, but I can be sure that removing _remoteContainer.srcObject = m; audio works fine, because the only effect here is to render the video.

So we dont need containers to get audio? Just with rtcpeerConnections can we playback audio?

Yes

Thanks for the help.

repo: cloudwebrtc/flutter-webrtc


text:
docs:add klog examples

What type of PR is this?
docs
Check the PR title.
docs:add klog examples
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:dd klog examples
zh(optional): 增加 klog 示例

kitex 的 klog 扩展和 otel 目前是耦合的 @rogerogers 用户直接只用 log 用会有问题嘛

logrus单独用有点问题，用ctxlogf的几个方法会打印出trace信息。zap有做判断。

authors: ViolaPioggia li-jin-gou rogerogers

repo: cloudwego/kitex-examples


text:
getting_started_cn.md文档问题

根据kitex-develop/docs/guide/getting_started_cn.md文档，快速搭建hello例子，按照这个文档步骤，操作
新方法分别定义一个新的请求和响应，AddRequest和AddResponse，并在 service Hello中增加add 方法：
在运行的时候报异常
handler.go:20:2: package kitex-examples/hello/kitex_gen/api is not in GOROOT (/root/go/src/kitex-examples/hello/kitex_gen/api)
经对比初始例子，发现kitex生成的新handler.go中多了一条引入包的import代码，如下图：

需要升级kitex框架，升级完后，重新执行kitex命令导出接口文件，handler.go中不再有
api "kitex-examples/hello/kitex_gen/api"
升级执行以下命令：
$ go get github.com/cloudwego/kitex
$ go mod tidy
需要调整getting_started_cn.md文档里面的步骤，提前执行以上这两条命令

没能复现你提到的情况，有可能是IDE或者编辑器导致的，可以在关闭IDE/编辑器后，在命令行重新走一遍流程，看能否复现。

Problem solved, this issue will be closed.

authors: GuangmingLuo kenyk simon0-o

repo: cloudwego/kitex


text:
save [stack, sp]function _save_stack疑问

_save_stack函数中dummy变量定义在coroutine_yield是不是更好？
static void
_save_stack(struct coroutine *C, char *top, char *bottom) {
       //top:stack bottom:sp
	assert(top - bottom <= STACK_SIZE);
	if (C->cap < top - bottom) {
		free(C->stack);
		C->cap = top-bottom;
		C->stack = malloc(C->cap);
	}
	C->size = top - bottom;
	memcpy(C->stack, bottom, C->size);
}

void
coroutine_yield(struct schedule * S) {
	int id = S->running;
	assert(id >= 0);
	struct coroutine * C = S->co[id];
	assert((char *)&C > S->stack);
	char dummy = 0;
	_save_stack(C,S->stack + STACK_SIZE， &dummy);
	C->status = COROUTINE_SUSPEND;
	S->running = -1;
	swapcontext(&C->ctx , &S->main);
}

这样会多压一个，函数call栈

感觉这里可以适当采用宏函数去展开，抵消掉函数调用压入的返回地址等的空间

authors: Prince-Hervoet Qinch qingdujun

repo: cloudwu/coroutine

license: mit


text:
How to get rectified polygons from polygon points?

In the paper you state
"Moreover, with our polygon representation, the
curved images can be rectified into straight text images,
which are also shown in Fig. 11. We believe this ability for
rectification can further be of use for recognition tasks."
My question is from a set of polygon points, how can I reconstruct the rectified image?
Can you kindly point me towards the correct direction? many thanks in advance

One possible solution is to follow textsnake to find ending points. Then you can warp it into rectangle. However the size of rectangle is not mentioned in the paper.

Hi Godrickly! Thanks for the hint! Any ideas on how to perform such rectification from a polygon? Like which opencv functions would you use? Thanks a ton!

@ziudeso A reference implementation FYI, which I tried before.
TextSnake

@Godricly  Thanks a lot =) Did you also find a way to get the polygonal output rather than the rectangular one? That'd be awesome!

nope. I was still trying to implement weakly learning part.

Sorry for the late reply.
We perform an affine transform on the upper and lower triangles at consecutive control points. At this time, height is fixed and width can be selected in several ways, chosen as the average of the two control points. Finally, since discontinuity can occur in the boundary, we removed the discontinuity through simple masking.
Following is the warping function that we are actually using.
def warpPerspectivePoly(img, poly):
    # Use Affine transform
    n = int(len(poly) / 2) - 1
    width = 0
    height = 0
    for k in range(n):
        box = np.float32([poly[k], poly[k+1], poly[-k-2], poly[-k-1]])
        width += int((np.linalg.norm(box[0] - box[1]) + np.linalg.norm(box[2] - box[3])/2))
        height += np.linalg.norm(box[1] - box[2])
    width = int(width)
    height = int(height / n)

    output_img = np.zeros((height, width, 3), dtype=np.uint8)
    width_step = 0
    for k in range(n):
        box = np.float32([poly[k], poly[k+1], poly[-k-2], poly[-k-1]])
        w = int((np.linalg.norm(box[0] - box[1]) + np.linalg.norm(box[2] - box[3])/2))

        # Top triangle
        pts1 = box[:3]
        pts2 = np.float32([[width_step,0],[width_step + w - 1,0],[width_step + w - 1,height-1]])
        M = cv2.getAffineTransform(pts1, pts2)
        warped_img = cv2.warpAffine(img, M, (width, height), borderMode=cv2.BORDER_REPLICATE)
        warped_mask = np.zeros((height, width, 3), dtype=np.uint8)
        warped_mask = cv2.fillConvexPoly(warped_mask, np.int32(pts2), (1, 1, 1))
        output_img[warped_mask==1] = warped_img[warped_mask==1]

        # Bottom triangle
        pts1 = np.vstack((box[0], box[2:]))
        pts2 = np.float32([[width_step,0],[width_step + w - 1,height-1],[width_step,height-1]])
        M = cv2.getAffineTransform(pts1, pts2)
        warped_img = cv2.warpAffine(img, M, (width, height), borderMode=cv2.BORDER_REPLICATE)
        warped_mask = np.zeros((height, width, 3), dtype=np.uint8)
        warped_mask = cv2.fillConvexPoly(warped_mask, np.int32(pts2), (1, 1, 1))
        cv2.line(warped_mask, (width_step,0), (width_step + w - 1,height-1), (0, 0, 0), 1)
        output_img[warped_mask==1] = warped_img[warped_mask==1]

        width_step += w
    return output_img

hi @YoungminBaek , it seems that the output polygon is not completed.
polygon:

box:

authors: Godricly YoungminBaek xylcbd ziudeso

repo: clovaai/CRAFT-pytorch


text:
model checkpoint did not match

I got error
"Some weights of DonutModel were not initialized from the model checkpoint at naver-clova-ix/donut-base and are newly initialized because the shapes did not match"
when using training code in README.md.
may be some layer's shape does not match.

Is it not a serious problem?

No, it is not a serious problem :) It occurs when the model's input size is adjusted. Although some weights are newly initialized, the model training will be okay.
Hope this helps. Please let me know if you are still confused.

8997ed5 will help to prevent such misunderstanding. Thanks again for the report :)

Thank you for your explanation!

repo: clovaai/donut


text:
🛑 DNS is down

In 09b9923, DNS ($SECRET_SITE) was down:

HTTP code: 400
Response time: 590 ms

Resolved: DNS is back up in a80347c after 5 minutes.

repo: cloverdefa/upptime


text:
Browser in php-fpm Docker times out and never fetches data (default LoopInterface implementation)

Prerequisites:

The script is run in a php-fpm Docker container
The command is wrapped in an instance of Symfony\Component\Console\Command\Command
Host machine MacOS latest

Test:
$loop = React\EventLoop\Factory::create();

$loop->addTimer(11, function()use($loop) {
            echo "Timed out\n";
            $loop->stop();
        });

$browser = new Browser($loop);

            /** @var Promise $promise */
            $promise = $browser->get('http://ukr.net/');
            $promise->done(
                function(Response $data){
                    echo 'Fulfilment code =: ' . $data->getCode();
                },
                function($reason) {
                    echo 'Rejection reason: ' . (string)$reason;
                }
            );

$loop->run();

Please note that requesting the same URL through php curl OR curl in console works just fine.
The result is always a Timed out output.
Am I doing something wrong? If not, where do I start to dig to find out what the issue is?

Are you using the latest version? It looks like your resolver function will not be called due to the unknown Response type hint. The then() method will return a rejected promise in this case, you can chain this with an empty ->done() call to report any issues in your chain.
It also looks like you may want to cancel the timer once the response is done. Currently, it will print the "timed out" message irrespective of whether the response resolved or rejected. See also #1.
I hope this helps :+1:

authors: clue meglio

repo: clue/reactphp-buzz


text:
微信版本3.7.5.23发不了图片文件

可以发下您的代码看看吗

我已经找到原因了 改了一下源码就可以了

是我的源码出问题了吗

微信版本更新到3.7.5.23之后, EditElement里面就多了一个PasteType="0"的属性, 导致原来的 " " 替换不了, 所以就出现发不了图片的问题, 测试过3.7.5.23之前的版本是没有问题的.

好的，非常感谢！

我已经找到原因了

您很好地参考了您的回复后发出的信息查看了测试的文本😂方便分享一下您修改后的py文件吗？

我就只改了这一句,其他都没改过.
copydata = COPYDICT[i].replace(b'<EditElement type="0" pasteType="0"><![CDATA[ ]]>', key.encode()).replace(b'type="0"', b'type="3"')

好的 感谢
1ee @.***>于2022年7月19日 周二17:43写道：

我已经找到原因了
[image: 图片]
https://user-images.githubusercontent.com/34964103/179388355-ea4f0985-b71c-4794-b295-e458b9b3ee2f.png
您很好地参考了您的回复后发出的信息查看了测试的文本😂方便分享一下您修改后的py文件吗？
我就只改了这一句,其他都没改过.
copydata = COPYDICT[i].replace(b' ', key.encode()).replace(b'type="0"',
b'type="3"')
—
Reply to this email directly, view it on GitHub
https://github.com/cluic/wxauto/issues/33#issuecomment-1188837016, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABLH5EU7ROX2QFHFICQY3YLVUZ2FLANCNFSM53ZJE6LA
.
You are receiving this because you commented.Message ID:
@.***>

e="0"> ', key.encode()).replace(b'type="0"', b'type="3"')

已解决，非常感谢！想请教一下，是如何看出这部分属性变化的呢？

e="0">', key.encode()).replace(b'type="0"', b'type="3"')

已解决，非常感谢！想请教一下，是如何看出这部分属性变化的呢？

把 COPYDICT[i] 打印出来, 观察一下就能发现了

问题已修复，适用新版微信的wxauto：
https://github.com/cluic/wxauto/tree/main/codes/v2

repo: cluic/wxauto


text:
Make a SimpleEidos object to configure Eidos

SimpleEidos.newEidosSystem(useGeoNorm: Boolean, useTimeNorm: Boolean): EidosSystem should get an appropriate "simplified" eidos.

I'm not sure who this is for and it doesn't necessitate any changes to Eidos proper, so I'll PR it to master and tag Mihai.  It's only about 25 lines of code without the sample main, and could be packaged in lots of other ways.  This is the gist of it though.

I'm not sure who this is for and it doesn't necessitate any changes to Eidos proper, so I'll PR it to master and tag Mihai.  It's only about 25 lines of code without the sample main, and could be packaged in lots of other ways.  This is the gist of it though.

I would recommend adding an apply method to SimpleEidos to make the construction trivial.
Also, would it be possible to add a simple output format as well? That is, a format that focuses on the triple cause/relation/object, with some provenance as well (sentence and offsets)?

I would recommend adding an apply method to SimpleEidos to make the construction trivial.
Also, would it be possible to add a simple output format as well? That is, a format that focuses on the triple cause/relation/object, with some provenance as well (sentence and offsets)?

The first change was straightforward.  It is a little bit deceptive because one might expect a SimpleEidos to be returned, but one gets a full-fledged EidosSystem instead.  Example output is forthcoming.  That seems like a something that will change often based on refined needs.

The first change was straightforward.  It is a little bit deceptive because one might expect a SimpleEidos to be returned, but one gets a full-fledged EidosSystem instead.  Example output is forthcoming.  That seems like a something that will change often based on refined needs.

I'll add output in a new PR.

I'll add output in a new PR.

authors: MihaiSurdeanu kwalcock

repo: clulab/eidos


text:
URL for sensu_ssl_tool.tar needs update

http://sensuapp.org/docs/0.21/files/sensu_ssl_tool.tar returns 404 file not found. Current version is 0.23

Cheers @jylitalo!

authors: cmacrae jylitalo

repo: cmacrae/ansible-sensu


text:
could not connect to server: No route to host

Hi, when I tried to First time set-up, this error came up everytime. What should I do to fix this problem?

root@ubuntu00:/home/belle/Documents/metadome/metadome# docker-compose run app python install.py
Starting metadome_db_1       ... done
Starting metadome_redis_1    ... done
Starting metadome_rabbitmq_1 ... done
Starting metadome_celery_1   ... done
Creating metadome_app_run    ... done
2021-08-03 08:51:14,163 - WARNING - MAILSERVER is not set in default_settings.py
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 354, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 751, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 483, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 138, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 135, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 299, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 428, in init
self.__connect(first_connect_check=True)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 630, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: No route to host
Is the server running on host "metadome_db_1" (172.18.0.5) and accepting
TCP/IP connections on port 5432?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "install.py", line 6, in
from metadome.application import app
File "/usr/src/app/metadome/application.py", line 3, in
app = create_app()
File "/usr/src/app/metadome/factory.py", line 72, in create_app
db.create_all()
File "/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/init.py", line 963, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/init.py", line 955, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 4287, in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2032, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/local/lib/python3.5/contextlib.py", line 59, in enter
return next(self.gen)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2024, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 354, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 751, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 483, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 138, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 135, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 299, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 428, in init
self.__connect(first_connect_check=True)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 630, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: No route to host
Is the server running on host "metadome_db_1" (172.18.0.5) and accepting
TCP/IP connections on port 5432?
(Background on this error at: http://sqlalche.me/e/e3q8)
ERROR: 1

Hi Gaspardetlisa,
Apologies for not responding sooner, I just transitioned to a new job + location.
I have succesfully recreated this error and am working on this the coming few weeks.
I assume it has to do with the first time server setup of the db instance of the docker-compose file.
Will update when I know more.

authors: Gaspardetlisa laurensvdwiel

repo: cmbi/metadome


text:
feat(access): add access control

We need to re-introduce the original access control package but with emphasis on client as first class citizen and server as rule and access consumer for persistent storage.

[ ] Revive @valkyr/access from a previous commit.
[ ] Make any adjustments required to make it functional.

Should be client focused.
Should be able to be run on any typescript based service with persistent access rules spawned through event projections.

Not needed as we will be using https://casl.js.org/ for access control

repo: cmdo/valkyr


text:
Request for Filter box below the table header

Hi,
Can you please add filter box below the table header? Please find the sample below:
https://raw.githubusercontent.com/rubanraj54/vue-bootstrap4-table/develop/src/assets/img/demo.gif
Thank you!

it's not a basic function in the vue-admin-box, you can fix it by yourself, maybe it can be supported a few months later, but not now, i need to do more things about the develop experience and the performance about the big back-end. You can make a basic component as you want.

the issue will open until i have time to do it. It's a good idea to search.

i think maybe it will be a common component to you and you can fixed it by yourself. As a frame, it should not be a choose for everyone, the frame should keep clean at first.

authors: ITKHMER cmdparkour

repo: cmdparkour/vue-admin-box


text:
Class 'Future' has no instance method show

Hello I have the following problem, in my code I call the flushbar as follows:
onPressed: () => activeNotification ? setLetterGridState(index) : Flushbar(
and if the condition with
setLetterGridState(index)
is active, then the following error is displayed:
Performing hot reload...
Syncing files to device sdk gphone x86 arm...
Reloaded 1 of 1019 libraries in 532ms.

======== Exception caught by gesture ===============================================================
The following NoSuchMethodError was thrown while handling a gesture:
Class 'Future<dynamic>' has no instance method 'show'.
Receiver: Instance of 'Future<dynamic>'
Tried calling: show(Instance of 'SliverMultiBoxAdaptorElement')

When the exception was thrown, this was the stack:
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:63:5)
#1      SettingsPageState.build.<anonymous closure>.<anonymous closure> (package:logo_dash/screens/settings.dart:496:30)
#2      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:989:21)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:193:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:608:11)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#d8ca8
  debugOwner: GestureDetector
  state: ready
  won arena
  finalPosition: Offset(208.8, 592.4)
  finalLocalPosition: Offset(27.2, 19.2)
  button: 1
  sent tap down
====================================================================================================

Despite the error, everything works as it should. How can I solve this so that this error doesn't come back?

this is seems to be happening with your onTap event. and it has nothing to do with flushbar. maybe if you can provide a few lines of code i can help

because of NDA reasons i cant provide no more code
GridView.builder(
                      physics: NeverScrollableScrollPhysics(),
                      scrollDirection: Axis.vertical,
                      shrinkWrap: true,
                      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                        crossAxisCount: 5,
                        crossAxisSpacing: 12,
                        mainAxisSpacing: 12,
                        childAspectRatio: (itemWidth / itemHeight),
                      ),
                      itemCount: letters.length,
                      itemBuilder: (context, index,) {
                        return TextButton(
                          onPressed: () => activeNotification ? setLetterGridState(index) : Flushbar(
                            message: 'settings.section_notifications.deactivated_notification_snackbar_warning',
                            messageText: Text(
                              'settings.section_notifications.deactivated_notification_snackbar_warning',
                              style: TextStyle(
                                color: Colors.white,
                              ),
                            ).tr(),
                            margin: EdgeInsets.all(8),
                            borderRadius: BorderRadius.circular(8),
                            duration: Duration(seconds: 3),
                          )..show(context),
                          style: ButtonStyle(
                            backgroundColor: activeNotification ? _isSelectedLetterButtonGrid[index] ? MaterialStateProperty.all(Color.fromRGBO(19, 255, 128, 1)) : MaterialStateProperty.all(Colors.white) : MaterialStateProperty.all(Color.fromRGBO(126, 126, 126, 0.2)),
                            shape: MaterialStateProperty.all<RoundedRectangleBorder>(
                              RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(8),
                                side: BorderSide(
                                  color: activeNotification ? _isSelectedLetterButtonGrid[index] ? Color.fromRGBO(19, 255, 128, 1) : Color.fromRGBO(151, 151, 151, 1) : Color.fromRGBO(126, 126, 126, 0.2),
                                ),
                              ),
                            ),
                          ),
                          child: Text(
                            letters[index],
                            style: TextStyle(
                              color: activeNotification ? _isSelectedLetterButtonGrid[index] ? Colors.white : Color.fromRGBO(72, 69, 86, 1) : Color.fromRGBO(126, 126, 126, 0.4),
                              fontSize: 16,
                              fontWeight: FontWeight.w500,
                              letterSpacing: -0.3,
                            ),
                          ),
                        );
                      },
                    ),

can you can this:
_showFlush(){
    if(activeNotification){
      setLetterGridState(index);
    } else {
      Flushbar(
        message: 'settings.section_notifications.deactivated_notification_snackbar_warning',
        messageText: Text(
          'settings.section_notifications.deactivated_notification_snackbar_warning',
          style: TextStyle(
            color: Colors.white,
          ),
        ).tr(),
        margin: EdgeInsets.all(8),
        borderRadius: BorderRadius.circular(8),
        duration: Duration(seconds: 3),
      )..show(context);
    }
  }

then replace your onPressed: () =>
with
onPressed: (){
_showFlush();
}

it looks like it is working now. At least I don't get this error anymore. many thanks for the help

authors: MrPresidentWhite cmdrootaccess

repo: cmdrootaccess/another-flushbar


text:
List of operations that produce NaN?

The documentation for dashu_float says that operations that produce NaN will panic. I'd like to be able to check for such conditions before performing those operations, so I can catch them and return Err instead. However, I don't know all possible operations that can panic, and the source code doesn't make it obvious. I'm checking for the obvious right now in my code, checking for any operations that work with infinity, etc.. But I think the documentation should specifically list every operation that can panic.
Additionally, it would be nice if the standard library actually had some kind of would_panic or results_in_nan function to explicitly check that for you, or stuff like try_div or try_mul, etc., but I'm just thinking out loud.

Thanks for raising this up. I will think about adding the NaN cases to the documentation (as I'm writing a guide to be published with the release v0.4). Currently as not many operations are implemented for the FBig type, the potential sources of NaNs are:

DIvision by zero
Logarithm on negative value.
Operations between infinities (such as inf - inf)

Common approach to make user aware of NaNs includes:

Provide fallible API, i.e. return Option or Result. I didn't do this because it will result in extra unwrap in the majority of the callsites.
Provide a global flag to notify the users. That is also not desired in Rust's convention.

I think providing a good documentation and let the user handle corner cases is the way to go.

Another source of panics are overflow/underflow. For example, the following, which underflows instead of rounding down:
FBig::<Down>::try_from(-6871947604880523000.)?.exp()

It's also not possible to anticipate settings where the calculation might overflow. Take for example, the following:
FBig::<Up>::try_from(f64::MAX)? + FBig::<Up>::try_from(f64::MIN_POSITIVE)?

This panics, but the naive check you might run beforehand doesn't anticipate the issue:
assert!((f64::MAX + f64::MIN_POSITIVE).is_finite())

Well the underflowing/overflowing cases are indeed hard to catch them all beforehand, I'm open to provide a fallible API for this case. My main concern is to add unwrap for every operations, even for the built-in ops.
I have several viable options in mind, although none of them is perfect:

Let every operation return a Result: this leads to adding unwrap everywhere
Let every operation return a special struct (e.g. FpResult), this struct should implement the same API as the normal floats, and it should carry all the error information including NaN/underflow/overflow/etc: this leads to a lot of redundant code and extra maintenance cost.
Only let the ops implemented by the Context object return a Result: the ops implemented by Context has some overhead compared to normal float ops, because it has to do the precision check before each operation. However this overhead is pretty small when base 2 (or a power of 2) is used.

Please let me know which approach looks best to you, or if you have better ideas! Thanks! @kameko @Shoeboxam

My favorite over the three is the last one, and when implemented as methods of FBig, the unusual output should be converted to  corresponding value or panic: overflow -> inf, underflow -> 0, nan -> panic

All of these options strike me as viable solutions.

I don't have any issue with handling results, because all my call sites already return results. Just sprinkle in the try operator ?.
I'm using dashu as a replacement for rug/GMP/MPFR, and they carry extra bits around to represent nan and infinities. I think this results in the best user API, although it sounds like it would be a greater burden on you.
Do you think this might result in more work for you, as a maintainer, because it would double the number of public APIs to document/maintain?

I think all three approaches are somewhat similar- instead of pushing infinity/nan into a panic, you are packing it into a struct- either within a Result or in an FpResult.
Which approach is better depends on what you want your library to support: Right now the library doesn't allow nan/inf inputs or outputs. If you want the library to support only nan/inf outputs, then I'd pack those states into a result. If you want the library to support nan/inf inputs and outputs, like MPFR, then those states should not be represented by a result.

Regarding nan/inf, I don't plan to support them as input. In my opinion, they are mostly useless when you want to do arbitrary precision operations. It's better to stick to f32/f64 when you find that you encounter nan/inf pretty often.

Do you think this might result in more work for you, as a maintainer, because it would double the number of public APIs to document/maintain?

Making the ops associated with Context returning different types is okay, because they already differ with operations between FBig instances. It won't require much additional effort.

authors: Shoeboxam cmpute kameko

repo: cmpute/dashu


text:
Issues with ibig! macro

Minimal example:
fn main() {
    let _ = dashu::ibig!(0);
}

fails to build:
error[E0433]: failed to resolve: could not find `dashu_int` in the list of imported crates
 --> src/main.rs:2:13
  |
2 |     let _ = dashu::ibig!(0);
  |             ^^^^^^^^^^^^^^^ could not find `dashu_int` in the list of imported crates
  |
  = note: this error originates in the macro `dashu::ibig` (in Nightly builds, run with -Z macro-backtrace for more info)

Builds fine if I add dashu-int = "0.2.0" to Cargo.toml. However, when I try to cross-compile for i686 from x86_64:
error[E0308]: mismatched types
   --> src/main.rs:2:13
    |
2   |     let _ = dashu::ibig!(0);
    |             ^^^^^^^^^^^^^^^
    |             |
    |             expected `u64`, found `u128`
    |             arguments to this function are incorrect
    |
note: associated function defined here
   --> dashu-int-0.2.0/src/ibig.rs:156:18
    |
156 |     pub const fn from_parts_const(sign: Sign, dword: crate::DoubleWord) -> Self {
    |                  ^^^^^^^^^^^^^^^^
    = note: this error originates in the macro `dashu::ibig` (in Nightly builds, run with -Z macro-backtrace for more info)
help: change the type of the numeric literal from `u128` to `u64`
    |
2   |     let _ = dashu::ibig!(0)u64;
    |                            +++

Sorry, but I can't reproduce the two problems locally, could you share with me your Cargo.toml and how you cross compile for i686?

I can confirm the first issue now, the fix will be pushed in the next release, by then you should be able to use dashu::ibig out of the box. But I still need some details to reproduce the second issue, thanks.

You can cross-compile with
cargo build --target i686-unknown-linux-gnu

You might need to install the target's support for rust. If you use rustup, you can install it with
rustup target add i686-unknown-linux-gnu

I have reproduced the second issue locally, unfortunately the fix requires a break change. The fix to the second issue will be pushed to v0.3. Thanks for reporting this!

The version v0.3 has been released, please have a check to see if the issue has been fixed, thanks!

For large values, it still fails to compile:
error[E0433]: failed to resolve: could not find `int` in `dashu`
 --> src/main.rs:2:13
  |
2 |     let _ = dashu::ibig!(999999999999);
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `dashu::int`

Okay I got the reason, I will release a fix soon.

I just pushed a new version dashu-macros v0.3.1, it should be able to solve the problem if you clean and recompile dashu dependencies again. Please let me know if the problem persists, thanks!

It is fixed now. Thanks you!

authors: cmpute eduardosm


text:
get object size from s3 before querying object data

Per rusqlite's document, we need the size of the blob beforehand to insert a blob into sqlite:
// Insert a blob into the `content` column of `test_table`. Note that the Blob
// I/O API provides no way of inserting or resizing blobs in the DB -- this
// must be done via SQL.
db.execute("INSERT INTO test_table (content) VALUES (ZEROBLOB(10))", [])?;

Closed via #48


text:
Correct the Guide's CI/CD section mention of only 2 CNCF projects

Correcting the Guide's statement that there are ONLY two CNCF projects in the Continuous Integration and Delivery space.  I've added text listing the two incubating and three sandbox projects for tooling, and a mention for the OpenGitOps project which is working on a vendor-neutral definition of GitOps.
Pre-submission checklist:
Please check each of these after submitting your pull request:

[x] Are you only including a repo_url if your project is 100% open source? If so, you need to pick the single best GitHub repository for your project, not a GitHub organization.
[x] Is your project closed source or, if it is open source, does your project have at least 300 GitHub stars?
[x] Have you picked the single best (existing) category for your project?
[x] Does it follow the other guidelines from the new entries section?
[x] Have you added your SVG to hosted_logos and referenced it there?
[x] Does your logo clearly state the name of the project/product and follow the other logo guidelines?
[x] Does your project/product name match the text on the logo?
[x] Have you verified that the Crunchbase data for your organization is correct (including headquarters and LinkedIn)?
[x] ~15 minutes after opening the pull request, the CNCF-Bot will post the URL for your staging server. Have you confirmed that it looks good to you and then added a comment to the PR saying "LGTM"?

This PR is not for submitting a new project, nor does it change the listing information of any existing project.  It's merely correcting an apparent oversight in the Guide.

repo: cncf/landscape


text:
[Action] Make the TAG ENV landing page more appealing and intuitive

The TAG ENV website https://tag-env-sustainability.cncf.io is becoming increasingly important to the TAG and is used across projects to communicate our efforts. I think there is room to improve the landing page and make it more attractive and intuitive for new participants. The landing page right now is shown in the screenshot below.

The contribute.cncf.io website could be a good reference here as it uses the same website structure, but IMO has a great first page leading to areas of interest.
cc @caradelia

@leonardpahlke, I can take on this. Point me in the right direction. Some rough ideas on what you'd like to see?

Thanks @paularah -- take a look at https://contribute.cncf.io for some inspiration (code).

authors: leonardpahlke paularah

repo: cncf/tag-env-sustainability


text:
chore(deps): update deps with npm audit

xml2js updated from 0.4.19 to 0.6.2
yargs updated from 12.0.5 to 17.7.2
gts updated from 0.9.0 to 5.2.0

Broken test. Unable to download Chromium. Ref #115

repo: cnishina/webdriver-manager-replacement


text:
大佬，op的docker更新3.15提示健康检查不通过，能否修复一下呀

如题

用最新spk重新编译一个，就可以升级了


text:
Tried netem ?

Hi.
You can achieve similar results with built in netem on linux. Have you tried it ? Just do a man netem. This may come in handy.

Yep, was originally going down that path but it was much more complicated to set up from what I remember, requiring IP tables, and/or kernel mods.  For this, you just give it two network interface devices and it handles the rest.

authors: cnlohr luqasz

repo: cnlohr/lamenet


text:
Limit pitchfork command to developers

https://github.com/coala/corobo/issues/36 requested "When issued by an authorized person to cobot,.." , however that bit wasnt done.
This needs to be fixed before GCI or there will be mayhem when this easter egg is found.

@jayvdb  How do I check if the person issuing the command is a developer? Do I have to use labhub to do the same?

Also should pitchfork be part of labhub ?? @jayvdb

Yes, the data you need is in labhub, so the pitchfork plugin needs to depend on labhub, and get the data from there.  pitchfork should not be part of labhub

ping @aashraybhandar1 Are you working on this? If not, let us know.

Hey I'm really sorry.I had my end semester exams so wasn't able to continue working on it. I do want to work on this issue and I will try to wrap it up in the and atleast send the first pull request in the next couple of days.

Turns out this is hard due to the problem of testing dependent plugins

This needs to be implemented as a filter to prevent access to any command based on configuration.

repo: coala/corobo


text:
pushed

Reviewers Checklist

[x] Appropriate logging is done.
[x] Appropriate error responses.
[x] Handle every possible exception.
[x] Make sure there is a docstring in the command functions. Hint: Lookout for
botcmd and re_botcmd decorators.
[x] See that 100% coverage is there.
[ ] See to it that mocking is not done where it is not necessary.

Duplicate of https://github.com/coala/corobo/pull/595
Just as bad as https://github.com/coala/corobo/pull/595
Not serious about contributing.


text:
[Docs] MovR Tutorial for GORM

Background: https://airtable.com/tblD3oZPLJgGhCmch/viw1DKmbKhg2MIECH/recVUeq7IYhi4bb48
Description: CockroachDB now provides application code and documentation for using MovR with GORM
Team: Andrew Woods, Rafi Shamim, Eric Harmeling

Dup of https://github.com/cockroachdb/docs/issues/6268.

repo: cockroachdb/docs