Starting linux support

With these changes the --help,  backup, and update commands are working for me on Linux.
We have to use a new way to find the CIRCUITPY and BOOT drives. In my environment these end up at /media/$USER/ so I've used os.listdir and getpass.getusername() to search there for them.
I also had to increase slightly the sleep times during the update process in order for it to complete successfully.

I successfully tested the bootloader command as well.
I'm not sure if I have any devices that still have the bossa bootloader instead of uf2 I'll poke around and see if I can find one to test that part but might need help from someone else with access to linux and a bossa device.


checkov: 3.2.34 -> 3.2.35

Diff: https://github.com/bridgecrewio/checkov/compare/refs/tags/3.2.34...3.2.35
Changelog: https://github.com/bridgecrewio/checkov/releases/tag/3.2.35
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

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

2 packages built:

checkov
checkov.dist


[meshery] Feature/hydra jwt auth

Description

Currently, all authentication in meshery is based on cookies and sessions. This PR implements  JWT based authentication for authentication between meshery server and meshery cloud.
Notes to reviewers:
This is very similar to PR #732, But this one has been developed to work with the new hydra integrated authentication.
This PR needs quite some finetuning, but this is a first attempt and shall be refined based on review and ideas from others.
Checklist

[] DCO signed.
[] Title of the PR starts with area name, e.g. meshery:, mesheryctl:, ui:.

@kanishkarj, I ran this using staging-meshery endpoint, seems like when I login, the following error occurs:-
INFO[0000] Starting Server listening on :9081
ERRO[0112] error in getting the token, http: named cookie not present
ERRO[0112] Error: unable to get session: http: named cookie not present
ERRO[0139] error in getting the token, http: named cookie not present
ERRO[0139] Error: unable to get session: http: named cookie not present

Also the page is stuck on /callback with no results/output... Any ideas how to resolve this?

@nveenjain we just had a call to test this pr and its deployment, worked through a few items and have one final commit left to make. You should be successful with this current set of code, though. Try a private browser session, if not using already. Try logging out of your prior Meshery deployment.

@kanishkarj, I ran this using staging-meshery endpoint, seems like when I login, the following error occurs:-
INFO[0000] Starting Server listening on :9081
ERRO[0112] error in getting the token, http: named cookie not present
ERRO[0112] Error: unable to get session: http: named cookie not present
ERRO[0139] error in getting the token, http: named cookie not present
ERRO[0139] Error: unable to get session: http: named cookie not present

Also the page is stuck on /callback with no results/output... Any ideas how to resolve this?

That is weird.. Try refreshing the page maybe.. or it might be an internet issue.
The logs of meshery is not an issue, it just says that it tried verifying the user if they are logged in or not.

@leecalcote , i tried it in my local profile,then in private browser (screenshot is of private browser)...
okay @kanishkarj , will do that and get back...

@kanishkarj tried reloading too, doesn't work... There are no errors on console (of both browser and meshery-server) when i reload...

Is it just me or the PR was incomplete ?

INFO[0000] Using '/Users/kush/.meshery/config' to store user data
INFO[0000] Using '/Users/kush/.kube' as the folder to look for kubeconfig file
INFO[0000] Log level: debug
INFO[0000] Starting Server listening on :9081
ERRO[0011] error in getting the token, http: named cookie not present
ERRO[0011] Error: unable to get session: http: named cookie not present

@kushthedude 9876 port is of MESHERY_CLOUD_LOCAL, could you please verify that you are running make run-local and not make run-local?

@kushthedude 9876 port is of MESHERY_CLOUD_DEV, could you please verify that you are running make run-local and not make run-local-cloud?

make run-local-cloud

@nveenjain More clear logs
make run-local-cloud
cd cmd; go clean; rm meshery; go mod tidy; go build -tags draft -a -o meshery; \
	SAAS_BASE_URL=http://localhost:9876 \
	PORT=9081 \
	DEBUG=true \
	ADAPTER_URLS="mesherylocal.layer5.io:10000 mesherylocal.layer5.io:10001 mesherylocal.layer5.io:10002 mesherylocal.layer5.io:10003 mesherylocal.layer5.io:10004 mesherylocal.layer5.io:10008" \
	./meshery; \
	cd ..
INFO[0000] Using '/Users/kush/.meshery/config' to store user data
INFO[0000] Using '/Users/kush/.kube' as the folder to look for kubeconfig file
INFO[0000] Log level: debug
INFO[0000] Starting Server listening on :9081
ERRO[0011] error in getting the token, http: named cookie not present
ERRO[0011] Error: unable to get session: http: named cookie not present
ERRO[0168] error in getting the token, http: named cookie not present
ERRO[0168] Error: unable to get session: http: named cookie not present
^CINFO[0343] Shutting down Meshery

@kushthedude please use make run-local instead, make local-cloud requires a local provider server running on your system...

@kushthedude Could you try updating meshery and running it from there, or are you sure your copy of meshery is up to date with this PR. Because we tested it several times on Mine, Lee's and Naveen's systems and it seemed to work.

@kushthedude Could you try updating meshery and running it from there, or are you sure your copy of meshery is up to date with this PR. Because we tested it several times on Mine, Lee's and Naveen's systems and it seemed to work.

My branch is in up-to-date with master

@kushthedude Could you try updating meshery and running it from there, or are you sure your copy of meshery is up to date with this PR. Because we tested it several times on Mine, Lee's and Naveen's systems and it seemed to work.

My branch is in up-to-date with master.

So, could you please describe as to what happens when you run make run-local ?
Like, you might then choose the provider, then next do you get the login page?  Or are you stuck at the provider page?

@kushthedude please use make run-local instead, make local-cloud requires a local copy of meshery provider server running on your system...

Nothing new, same as before!
ERRO[0010] error in getting the token, http: named cookie not present
ERRO[0010] Error: unable to get session: http: named cookie not present
DEBU[0021] token : eyJhY2Nlc3NfdG9rZW4iOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SW5CMVlteHBZenBsT0dWbU5ERmpNeTFpWldWbUxUUmlZakV0T0dVNE1DMHpOakExTVRZeU4yTTJNakVpTENKMGVYQWlPaUpLVjFRaWZRLmV5SmhkV1FpT2x0ZExDSmpiR2xsYm5SZmFXUWlPaUp0WlhOb1pYSjVMV05zYjNWa0lpd2laWGh3SWpveE5UZzNOamMxTnpRMUxDSmxlSFFpT250OUxDSnBZWFFpT2pFMU9EYzJOekl4TkRRc0ltbHpjeUk2SW1oMGRIQnpPaTh2YldWemFHVnllUzVzWVhsbGNqVXVhVzh2YUhsa2NtRXZJaXdpYW5ScElqb2lNREUxWmpZME1tUXRaakpsTnkwME1EQmhMVGswTVRjdFlUQXhaRGxrTVRreE1UQXlJaXdpYm1KbUlqb3hOVGczTmpjeU1UUTBMQ0p6WTNBaU9sc2liM0JsYm1sa0lpd2liMlptYkdsdVpTSmRMQ0p6ZFdJaU9pSmhNMVo2WVVoU2IxcFhVakZhUjFVOU9sb3liREJoU0ZacEluMC5QdUZRVVZsaTAtSGFVbTdjWm5ZQUNKOFV6ZzlSZnlVX3BkMXl4TllNZmJQY2NTQXFSblR0VFVpdUN6UFFxVm9EODJyanJHN2Y2RXhnQ21mZlI5S3JqSWRMaG5vRnprNmR2ZTFONWhyZGpUdjN4aUk2YlZhR3o2Vk16VGM1bmdxQzY3ZzZkb3JrV3ozaU41TmdtWHVxUkhmUmdMOHVwWW1ub1RVaTVZTmpJZkJzM1lJbUJaU2xJd2haVnhHUHFLWGJBUG9LbzlRNHRBRV8xTWdEakU2d3d4YkdFbFBWMGI3bmcxaktXbjYxRGVZUFFfU3BOVk4tUzZoZkJhUUl6VUdydmFrUE14MjY3ei00T1hzaFVQcWdNVzF5aVVidTB1RHBqOHh4cS1taEE3aTFzdGdQV0JBSmJRa0hXSF9KVEl4SFYyb1JLS1FBbGNIWVRGaW16RUVyT2xjY1BxM3FMWVlYY2hTZmVvb1ZjaVlsaDRONXRGWHBCUFBvQTZqeFhxZUVWVDU2X1IyVTJ4cElXZzY2Mndid1JGT2Nhd1RSQXY1UzRCQ3kwdExpUWVFRzgzaXpMWFBMX2VfTXhQdVE5emF4LWl6M1lhU3Ztb0t2eUluLVU1RUtLdmc5ckhVSUR0SnFjMFF4X25Sa2RzeEhJUEpvUHV6QU5FTDFkUV9mX0NWU1RCcS1ySS1BcEdQWmFUUHRCeFlSMEV3cFphalVPNnR6UF85UnpScnQyRDBZQkkyYXlPUV9Zb3BpZWdyd0lGYnVYRm1DV2tkZkxLYWlOVEpfN2ViczRuZ25NV1dPanhSTDc3UWlrd2swU2UxcWNkbTEwSDVfaUVFVjE0NG9FRVQ2SmJ1YkFJM2RhNWR1SkMxSXdMZm1nUEZ1ODVIWUQtbktZS1RGYmFjdmZzayIsInRva2VuX3R5cGUiOiJiZWFyZXIiLCJyZWZyZXNoX3Rva2VuIjoiOXV0YUdLdzFYckJFMkFrNFNZRG51MnBBQTVvSVFPQjVPR2RQOWxseS04Yy5WZHNBWUdHSWFRNnpvSmlKNmpmdl9MMkxGQnpib3M5VVJLX2RqQTVKSW5VIiwiZXhwaXJ5IjoiMjAyMC0wNC0yM1QyMTowMjoyNC4xMTg5MDYxNDJaIn0
INFO[0023] Error: parsing token, trying refreshing the token
ERRO[0023] Error refreshing token, Token is not valid yet
DEBU[0031] token : eyJhY2Nlc3NfdG9rZW4iOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SW5CMVlteHBZenBsT0dWbU5ERmpNeTFpWldWbUxUUmlZakV0T0dVNE1DMHpOakExTVRZeU4yTTJNakVpTENKMGVYQWlPaUpLVjFRaWZRLmV5SmhkV1FpT2x0ZExDSmpiR2xsYm5SZmFXUWlPaUp0WlhOb1pYSjVMV05zYjNWa0lpd2laWGh3SWpveE5UZzNOamMxTnpVMUxDSmxlSFFpT250OUxDSnBZWFFpT2pFMU9EYzJOekl4TlRVc0ltbHpjeUk2SW1oMGRIQnpPaTh2YldWemFHVnllUzVzWVhsbGNqVXVhVzh2YUhsa2NtRXZJaXdpYW5ScElqb2lZVEZrWW1SbE9HTXROR1k1WXkwME0ySmtMVGt4TmpBdE5qZzNNVGMzTVRZek9EZzNJaXdpYm1KbUlqb3hOVGczTmpjeU1UVTFMQ0p6WTNBaU9sc2liM0JsYm1sa0lpd2liMlptYkdsdVpTSmRMQ0p6ZFdJaU9pSmhNMVo2WVVoU2IxcFhVakZhUjFVOU9sb3liREJoU0ZacEluMC5KbmtKNEJKYUtiVlJFRjREd0ZFdnFFT3ZKOUFaVEVmVDNmV0VVUnhSZHZsbjNnaFdjdEJxRzFOSEdoLUN5bXhZM1d0Mzh0R2hRbnZEMEpIalcwdHlvWnYweFUwYVpEYm9USGVpQzNiUGpXWkJWZDMtbk1CcjhPUE1kRC1rcElaa1R3V1I3dzJ1SGJMWmVhNHdrSlFNdU9PSHpkWmh2cVd5MWdOTG8tSXZoOWxVSUF0SXRCR0c3cXZ2VG5YRVBIcWtLeldEVVdZZFZQWGRjcUxrZk1vbXdXTFNxcGp0eWxCcldrTUtWcFluZE5kMTB5S2VFVkdBU0dWaE1IeVNzMnpKUkxsTWRUc3Q3OG1QSHZhY3RHbFlHWUVMNmtVcktkWmJxcWFRTFJqRHUxRWtibDB0aVUxdy1pdkZTM21vVW1Na3I3bWRrRWtTRHh5NEpxVTQ1UzJhZ0oxZ2Y3QVVnMUdudE95bmF6UXpUTFVMbzMxMThZTHpHNW14cHVqRmJ2Z3h3SjhhRWI5V01tRDRsQnlMMHktaEdzOVEzcjNsYlJDRXFUVFNQZ1dWOC1Ra0RQR3lUNHp3UkpHVU5sU1ZyR3ZPcWd6TVV5YUp5aW9HZGNnbzVTUTN2dlpUdEp0OFA4NmNkZ2UxWURPbFYxV0xhRFpkdFlPcEJjS1Z4TGwyVkdpZ3lxY2J5Z3NuSUI5Z2hJZDJoUUVzQXQtRC1nUDRHcG01eG1CcVU1WGpDdXdRSTRGN0xJZUdyU1MxNk0tU3ZKMGxGcTdYY2xtcjZKOHA1WU1fSGlQT0EzUjUwdGtfX2ZzSGMxM2xhMF9KRlpPaGk5ZlhWUkFfeFViREdaY25XRkZETFhIdzdwaWN0M1hTVnl4eTUzSzR4aEtEdFgyYVlldE9VLU5QT2Z6ZzVsQSIsInRva2VuX3R5cGUiOiJiZWFyZXIiLCJyZWZyZXNoX3Rva2VuIjoiZy1LdFBuWXlSQ01MeXVFVkxIWmpqNXFVZ1o2elpzVzFFNGJlbnNIbHlZVS54X3NYMlEyYjdVNXo0blBNbEJfWDROOWxrT2h3QzdoMkRPTzdQWWNweTlnIiwiZXhwaXJ5IjoiMjAyMC0wNC0yM1QyMTowMjozNC41MzA0OTc4MjdaIn0
INFO[0031] Error: parsing token, trying refreshing the token
ERRO[0031] Error refreshing token, Token is not valid yet

Here are the logs!
Stuck at social-Oauth page.

When stuck, what URL does rhe browser point to?

meshery.layer5.io social-oauth-page
On Fri, 24 Apr, 2020, 07:21 Kanishkar J<EMAIL_ADDRESS>wrote:

When stuck, what URL does rhe browser point to?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/layer5io/meshery/pull/757#issuecomment-618757411, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AKQMTLRX6LYHVKK22XUAQ6TRODWCBANCNFSM4LS3LGYA
.

Does mesheryctl start work?

I restrict myself using cli while developing.
Or does jwt only works with cli? If later is the case, I will have to check
again.
On Fri, 24 Apr, 2020, 13:09 Kanishkar J<EMAIL_ADDRESS>wrote:

Does mesheryctl start work?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/layer5io/meshery/pull/757#issuecomment-618856693, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AKQMTLUHC6ZNRPWFIDD7UGTROE64ZANCNFSM4LS3LGYA
.

I'm trying to get a better idea of what the issue is. Let me know if mesheryctl start works.
Sent from Outlook Mobilehttps://aka.ms/blhgte

From: Kush Trivedi<EMAIL_ADDRESS>Sent: Friday, April 24, 2020 1:13:18 PM
To: layer5io/meshery<EMAIL_ADDRESS>Cc: Kanishkar J<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [layer5io/meshery] [meshery] Feature/hydra jwt auth (#757)
I restrict myself using cli while developing.
Or does jwt only works with cli? If later is the case, I will have to check
again.
On Fri, 24 Apr, 2020, 13:09 Kanishkar J<EMAIL_ADDRESS>wrote:

Does mesheryctl start work?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/layer5io/meshery/pull/757#issuecomment-618856693, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AKQMTLUHC6ZNRPWFIDD7UGTROE64ZANCNFSM4LS3LGYA
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/layer5io/meshery/pull/757#issuecomment-618858073, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFK7QVJ6DPY6BHKKZVYAR3DROE7JNANCNFSM4LS3LGYA.

No neither mesheryctl nor local server works. But make run-local at least show me logs about invalid token generated by JWT which mesheryctl doesn't even show.


Flaky ES API sort test

Describe the bug
The 0001-sort-elasticapi.yaml test suite fails often
The dataset is
  - {"count": 10, "id": 1}
  - {"count": 10, "id": 2}
  - {"count": 15, "id": 2}
  - {"id": 3}
  - {"count": 10, "id": 0}
  - {"count": -2.5, "id": 4}
  - {"id": 5}

The expected value is
expected:
  hits:
    total:
      value: 4
      relation: "eq"
    hits:
      - _source: { "count": 15, "id": 2 }
      - _source: { "count": -2.5, "id": 4 }
      - _source: { "id": 5 }
      - _source: { "id": 3 }

But the id 3 sometimes appears before the id 5 in the response. I'm not sure why we expect this order in the first place.
Steps to reproduce (if applicable)
See CI runs such as https://github.com/quickwit-oss/quickwit/actions/runs/10628590537/job/29466183519
Expected behavior
Stable test

@PSeitz am I missing something?

sounds like something was done about it https://github.com/quickwit-oss/quickwit/pull/5357/files#diff-b5f50730c0d57b9c1acf12c02cf23c0905540a517c59be9f1fe0f97a63ad18d0

Yes, this should be fixed

Cool! I probably hadn't rebased yet when I got the CI fails. Thanks!


[travis] Record code coverage and display on README

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@2115380). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             master   #703   +/-   ##
=======================================
  Coverage          ?     0%
=======================================
  Files             ?     29
  Lines             ?   2721
  Branches          ?    430
=======================================
  Hits              ?      0
  Misses            ?   2721
  Partials          ?      0

Continue to review full report at Codecov.

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

If/When this PR is merged in, someone will need to add a new config entry to travis.

Visit https://codecov.io/gh/pytorch/vision
Login and add vision as a repo (you can go directly to https://codecov.io/gh/pytorch/vision)
Copy value of the CODECOV_TOKEN="xxxxxxxx-a3df-45fb-xxxx-114d63b284af" token
Open up https://travis-ci.com/pytorch/vision and go to the settings page and add the token value with the name CODECOV_TOKEN, make sure the option for this to show up in builds is not ticked (this is a secret key)

Et voila, it should all be hunky dory.


Form plugin says "Unable to post login form"

Expected behaviour:
Form plugin executes commands and succeeds
Actual behaviour:
Form plugin says "Unable to post login form"
Steps to reproduce:
Be on flexget 2.8.6.
Use form plugin with below config
Form plugin will say "Unable to post login form"
Note:  I downgraded to flexget 2.6.1 and it works great, so something broke recently.
Config:
templates:

  transmission:
    transmission:
      host: localhost
      port: 9091
      username: ****
      password: ****

tasks:
  tyt_highlight_shows:
    form:
      url: http://tenyardtracker.com/members.php?action=login
      username: ****
      password: ****
    html:
      url: http://tenyardtracker.com/browse.php?page=0  #the browse homepage is listed in order by upload date
      title_from: link
    regexp:
      accept:
        - The.Blitz
        - Football.Night.in.America
        #- College.Football.Final
        #- College.Gameday
        - Inside.the.NFL
        - Monday.QB
        - GameDay.Highlights
      reject:
        - french
    #quality:
    #  - 720p
    urlrewrite:
      sitename:
        regexp: details.php\?id=(?P<id>\d+).*
        format: download.php?torrent=\g<id>
    template:
      - transmission
    transmission:
      path: /Volumes/TV
      ratio: 1.0
      bandwidthpriority: 1

Log:
http://pastebin.com/vsGWG37F

Additional information:

Flexget Version:  2.8.6
Python Version:  2.7.12
Installation method: pip
OS and version: macOS 10.12.2
Link to crash log:  http://pastebin.com/vsGWG37F

Using the latest build (2.8.7.dev), I now get:
2016-12-18 21:37 INFO     ipc.rpyc                      server started on [<IP_ADDRESS>]:61680
2016-12-18 21:37 DEBUG    task          tyt_highlight_shows executing tyt_highlight_shows
2016-12-18 21:37 DEBUG    template      tyt_highlight_shows Merging template transmission into task tyt_highlight_shows
2016-12-18 21:37 INFO     transmission  tyt_highlight_shows Trying to connect to transmission...
2016-12-18 21:37 INFO     transmission  tyt_highlight_shows Successfully connected to transmission.
2016-12-18 21:37 DEBUG    urlrewrite    tyt_highlight_shows Added rewrite sitename
2016-12-18 21:37 DEBUG    formlogin     tyt_highlight_shows Exception posting login form.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/FlexGet-2.8.7.dev0-py2.7.egg/flexget/plugins/operate/formlogin.py", line 66, in on_task_start
    br.open(url)
  File "/usr/local/lib/python2.7/site-packages/mechanize/_mechanize.py", line 203, in open
    return self._mech_open(url, data, timeout=timeout)
  File "/usr/local/lib/python2.7/site-packages/mechanize/_mechanize.py", line 230, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "/usr/local/lib/python2.7/site-packages/mechanize/_opener.py", line 204, in open
    response = meth(req, response)
  File "/usr/local/lib/python2.7/site-packages/FlexGet-2.8.7.dev0-py2.7.egg/flexget/plugins/operate/formlogin.py", line 29, in http_response
    response.set_data(soup.prettify())
  File "/usr/local/lib/python2.7/site-packages/mechanize/_response.py", line 288, in set_data
    cache.write(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xbb' in position 981: ordinal not in range(128)
2016-12-18 21:37 CRITICAL formlogin     tyt_highlight_shows Unable to post login form
2016-12-18 21:37 WARNING  task          tyt_highlight_shows Aborting task (plugin: form)
2016-12-18 21:37 DEBUG    task_queue                    task tyt_highlight_shows aborted: TaskAbort(reason=Unable to post login form, silent=False)
2016-12-18 21:37 DEBUG    task_queue                    task queue shut down
2016-12-18 21:37 INFO     ipc.rpyc                      listener closed


Cant create extension? Command 'Hello World' resulted in an error (command 'demo.helloWorld' not found)

VS Code Version:
OS Version:

Steps to Reproduce:

yo code (Demo,demo, demo, y, y, npm)
cd demo, code .
F5, Command Palette, Hello World.. results:

Command 'Hello World' resulted in an error (command 'demo.helloWorld' not found)

Does this issue occur when all extensions are disabled?: Yes/No

What version of VSCode? What OS?


[FEATURE] Rename bindExtras()/bindArguments() to bind()

Hi!
The title says all. There's no reason IMO to name them differently.

There is too much ambiguity in just using bind(). Since I can add @BindArgument and @BindExtra in the same class, the more explicit method names let me know what is getting bound when.


DISCUSSION: Implement Key.eq and Entity.eq

Currently comparison must be done in an ad-hoc way:
assert dict(arya_entity.items()) == {'name': 'Arya', 'family': 'Stark'})

FWIW __eq__ is not something that should really be needed outside of the Key, and even then not so much.
NOTE: This was a small part of #336

FWIW I have implemented Key.__eq__ in https://github.com/dhermes/gcloud-python/tree/key-comparison but it greatly depends on the conversation in #528

Can we simplify by saying that incomplete keys never compare equal to anything?  We shoudn't expect them to be super long-lived anyway, and the use-cases seem strongly biased toward "real" equivalence.
Note that we need to implement __hash__ as well for many sensible uses of __eq__.

Just had a chat with @dhermes about "what does equality mean?". The current thinking is:

Equal key path
Equal entity data (dictionary equivalence)
Equal dataset_id (if dataset_id.startswith(s~ or e~): dataset_id = dataset_id[2:])

If people just want to compare the entity data, they can do a dict(entity) ==
If people just want to compare the key path, they can do a key.path ==


Promotion Heuristic

Implements heuristic for static promotion. Can pass -x static-promotion:threshold=n to set a "threshold" of n. The threshold is how big the static island needs to be for us to promote it. We calculate the "size" of a potential static island by counting number of groups and the number of if statements/while loops too. To be more precise, the "size" function is calculated as: (# enables) + 2 * (# if ports + while while ports). But I am open to changing it. I think it should try to approximate the complexity of the dynamic FSM that would be produced if we choose not to promote.

Subsumed by #1758


Feature Request: include: compressed.conf files?

I have compiled two separate block-list files from various sources, one 20MB (~400,000 lines), and the other 5MB (~200,000 lines). Trouble is, my openwrt router with 128MB RAM would run out of memory if either of one those lists is included via the "include: " directive. OTOH, my desktop host with 32GB of RAM runs unbound with both of those fine (although it takes 30+ seconds for unbound to finish initializing).
I realize the simpliest solution is to move unbound/DNS-based blocking to a mini-PC with more RAM. However, since modern web browsers could accept HTTP compression such as gzip, I'm wondering if it'd be possible to similarly have unbound's "include: " optionally handle compressed .conf files at runtime on the fly, in order to avoid out of memory issues such as the above (if only loading compressed conf file into the memory and processing it without expanding is possible), or out of flash storage issues on even older routers which I've run into as well.

I am guessing that those block-list files are a stream of local data directives.
In that case the problem is not the size of the files but the resulting size of all those zones that unbound needs to store in memory to be able to block these zones. Only more memory could help you there.
Unless I misread something.

@gthess that makes sense. Thanks. Closing now.


Fixed copy button

PR Fixes:

1 The copy button hide the code.
2 After click on copy the copied take alot of space.

Resolves #425

Checklist before requesting a review

[x] I have performed a self-review of my code
[x] I assure there is no similar/duplicate pull request regarding same issue

This was the old one which hide the code and not look good can you check this sir? @hkirat

/bounty $10


[Task]: Fix runtime crash

Task description
Im getting random runtime crashes that crash both the devmode app and the compiled artifact

Requirements
Fix runtime crashes
Creation checklist

[X] I have assigned this task to the correct people
[X] I have added the most appropriate labels
[X] I have linked the correct milestone and/or project

Cant replicate anymore


fetch is not a function. (In 'fetch', 'fetch' is undefined)

Current Behavior
After running an existing RN project with haul, I get the error visible in screenshot below

Expected Behavior
I expected fetch to be accessible in global like when running with packager:
https://github.com/facebook/react-native/blob/master/packager/defaults.js#L41-L44
https://github.com/facebook/react-native/blob/master/Libraries/Core/InitializeCore.js#L176-L186
Haul Configuration (webpack.haul.js)
The generated haul config:
module.exports = ({ platform }) => ({   entry: ./index.${platform}.js, });
Your Environment

software
version

Haul
^0.1.4

react-native
^0.42.0

node
v7.5.0

npm or yarn
4.1.2

Can you try https://github.com/callstack-io/haul/pull/74 and see if it fixes the issue?

I just tried #74 via npm i --save-dev callstack-io/haul#pull/74/head
And... now it works 👍
Thanks for the quick reply!


Updating segment and container mixins

Changing padding to margin on container so that padding does not subtract from actual width; this allows the the container to reach the max 1290 like it should, rather than 1170 (1290 - 120px padding)
Changing media queries on segment to match those of container; removing 1170px max-width

:+1:


Different Countdown times displayed

When in a remote meeting with a shared screen I was able to see that the countdown times were different for the presenter and my local machine.
Due to restrictions I cannot upload a screenshot of the meeting.

My browser displayed: 4:55
Presenter's browser displayed: 3:44

After getting some feedback: This is due to the local clients calculating the countdowns themselves, so if there are differences in the local time on your machine(s), this can and will happen.


Update populate_fake_preprint_providers for new field share_title

Purpose
Fix failing sudo docker-compose run --rm web python manage.py populate_fake_preprint_providers command
Changes
Update PREPRINT_PROVIDERS in osf/management/commands/populate_fake_preprint_providers.py to include new required field share_title
Side effects
None
Ticket
None

Sorry, I gave bad advice. I was thinking preprint_word.

Coolio, so... share_title should equal name in these 4 cases?
On Wed, Sep 20, 2017 at 11:19 AM, Brian J. Geiger<EMAIL_ADDRESS>wrote:

Sorry, I gave bad advice. I was thinking preprint_word.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CenterForOpenScience/osf.io/pull/7727#issuecomment-330885759,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAY2Z1Foj9sX7PZlUbL40emzqP5lDK58ks5skS0FgaJpZM4PeBpP
.

--
....... ___o
........<,
..... ()/() \o

PR, updated and pushed.
On Wed, Sep 20, 2017 at 11:21 AM, Tom Baxter<EMAIL_ADDRESS>wrote:

Coolio, so... share_title should equal name in these 4 cases?
On Wed, Sep 20, 2017 at 11:19 AM, Brian J. Geiger <
<EMAIL_ADDRESS>wrote:

Sorry, I gave bad advice. I was thinking preprint_word.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CenterForOpenScience/osf.io/pull/7727#issuecomment-330885759,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAY2Z1Foj9sX7PZlUbL40emzqP5lDK58ks5skS0FgaJpZM4PeBpP
.

--
....... ___o
........<,
..... ()/() \o

--
....... ___o
........<,
..... ()/() \o


Unit Tests: Remove dependency on aws credentials

Fixes: #1
Testing Done:

Verified that the unit-tests succeed.

Awesome! Thanks for doing this.


Demand loading on diff mode

Can you make vim dynamically load a plugin on 'diff' mode?
Something like
Plug 'vim-scripts/diffchar.vim' , { 'on' : 'diff' }

Plug 'diffchar.vim', { 'on': [] }
autocmd FileType diff call plug#load('diffchar.vim')

I think this would work as well.

Plug 'diffchar.vim', { 'on': [] }
autocmd FileType diff call plug#load('diffchar.vim')

If you don't specify the user in the user/plugin pattern it will default to vim-script.
I should work more or less but I'm not sure about the diff filetype.

No, there's no native support for that, but you can write an autocmd like follows:
augroup load_plugin_on_diff
  autocmd!
  autocmd FilterWritePost * if &diff
    \| call plug#load('diffchar.vim') | autocmd! load_plugin_on_diff
    \| endif
augroup END

It should work, but that's just too much code for my taste. Ideally, we could tell the author of the plugin to move the most part of the code to autoload directory so that we don't need these tricks in the first place.
@vheon Thanks for the comment, but diff is not a type so the code won't work. And if it's a type, we can use for option, right? :)

@junegunn Oh, right :stuck_out_tongue_winking_eye:


Copy not accepting source end with wildcards * when using -r on v0.6.0

Hi, when I use shelljs V0.6.0,  I get the error:
shelljs.cp('-r', '/Users/chenzs/wksps/work/cybertron/publish-common/workDirectory/output/zip/*', '/Users/chenzs/wksps/work/cybertron/publish-common/workDirectory/');
shell.js: internal error
Error: ENOENT: no such file or directory, stat '/Users/chenzs/wksps/work/cybertron/publish-common/workDirectory/output/zip/*'
    at Error (native)
    at Object.fs.statSync (fs.js:892:18)
    at /Users/chenzs/wksps/work/cybertron/publish-common/node_modules/shelljs/src/cp.js:148:21
    at Array.forEach (native)
    at Object._cp (/Users/chenzs/wksps/work/cybertron/publish-common/node_modules/shelljs/src/cp.js:144:13)
    at Object.cp (/Users/chenzs/wksps/work/cybertron/publish-common/node_modules/shelljs/src/common.js:240:23)
    at repl:1:4
    at REPLServer.defaultEval (repl.js:262:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)

using node v5.7.1 on OSX 10.11.3 (15D21) .
Then I view  cp.js at line 148
  if (options.recursive) {
    // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*"
    // (see Github issue #15)
    sources.forEach(function(src, i) {
      if (src[src.length - 1] === '/') {
        sources[i] += '*';
      // If src is a directory and dest doesn't exist, 'cp -r src dest' should copy src/* into dest

      } else if (fs.statSync(src).isDirectory() && !exists) { // here is the error?
      // but fs.statSync do not support wildcards *

        sources[i] += '/*';
      }
    });
    // Create dest
    try {
      fs.mkdirSync(dest, parseInt('0777', 8));
    } catch (e) {
      // like Unix's cp, keep going even if we can't create dest dir
    }
  }

fs.statSync do not support wildcards but src is a string with wildcards (arguments without any converting).
Is this a bug? Or shelljs.cp do not support wildcards any more since v0.6.0?
But the README says: The wildcard * is accepted.

I believe this is a bug that got fixed recently. The cp function has been refactored. Could you test against master branch?

ok. I test against, it work. shell.cp convert(or expand) the argumnets at common.wrap. Thanks for  the answer and the fixed.

@cdatou thanks for reporting the bug and verifying the fix! Not sure how that bug slipped through, but we'll be more careful next time.


Allow clientMsgId querry

References https://github.com/arcturial/clickatell/issues/15

I suppose the issue will be do you want to add the new fields in the response object. That could be a breaking change.
There's now 2 IDs as opposed to 1.
I'll leave that up to you!


feat: add checkout to addRegionIdToSupportUrl

What does this change?
Adds the URL /checkout to the addRegionIdToSupportUrl.
This needs to be done before we can merge https://github.com/guardian/dotcom-rendering/pull/12403 that is moving from the generic checkout (/contribute/checkout) to the generic checkout (/checkout).
How to test
Tests are provided in the test suite.
This is used here in DCR.
How can we measure success?
We unblock the above mentioned PR.
Have we considered potential risks?
This is additive so should be good to go.
Images
Before code change

After code change

the high severity error

This has been fixed as it's a good thing to have picked up.


Add asyncio example

This PR adds a (Python 3.5 only) asyncio example mainly because I wanted to play around with Python 3.5, hyper-h2 and asyncio :smile:
hyper-h2 works impressively well, great work. This example runs out-of-the-box in Chrome. :relaxed:
(Firefox requires #14 to be implemented)
(The certificate in this PR is a self-signed certificate for localhost)

\o/ Thanks for doing this, it's fantastic!
Let me fix the tests up because they're making me sad, and then I'll go ahead and merge.

Mind rebasing once more? I had to pin a test dependency version.

Done!

Alright, I'm going to merge this!
I'm particularly impressed that you've written an asyncio server that doesn't actually contain the word 'coroutine' or 'yield from'! Very nice. =D


Switch to Ruff for Python linting

Ruff is a new all-in-one Python linter that combines several previous tools and implements them more quickly. This PR switches to Ruff and cleans up various parts of the code that Ruff has flagged.

Thanks. I'll look into it.

Looks pybabel was removed? Was it intentional?
https://github.com/ambuda-org/ambuda/actions/runs/4580826443/jobs/8089886305#step:4:1170


Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.

At a minimum, this requires a CHANGELOG entry. Tests would also be welcome, if they make sense for these options.

Added CHANGELOG and simple tests.

Better. Sadly, there's a merge conflict. You'll have to rebase.

Rebased. Please review.

@asomers It would be great to see this merged. Is anything additional required?

I think it looks good.  Just squash, please!

Squashed.

Somehow you lost the CHANGELOG when you squashed.

Squashed again.


Debug request logging.

I'm trying to debug why Prometheus isn't pulling metrics from my client. Is there some way I can get this library to log each incoming http request, including the IP of the request?
Ideally it would be something like start_http_server(log_level="debug"), and then each request will be printed to stdout.

That is not available today, I am not sure how I feel about the feature as a whole. I guess it would depend on the added complexity as we try to keep start_http_server very minimal. It should be pretty easy to create your own http server that has logging how you want it and use something like make_wsgi_app from this library to serve the results though?
Usually there is information in the Prometheus server for if you are not seeing metrics as well, either looking in Status > Targets, or enabling debug logging on the Prometheus server.

I resorted to debugging by just standing up a simple http server with python.
I guess there are workarounds, and the feature I requested may not be useful to anyone else, so maybe this issue can be closed.


Add warning message to APIs that are in preview

I'll use this issue to track the preview APIs we consume. We will add some sort of warning into the docs regarding this.

@clayreimann Feel free to assign this to me.

Would love to see Topics added as I will have to write this myself using the internal API. I see it's already been tagged in this thread.


Resource Leak found in file src/xxd/xxd.c

Resource leak found in the src/xxd/xxd.c file
The bug can be reproduced using the following -
Detailed steps to reproduce the behavior:

cppcheck --force src/xxd/xxd.c

Found a resource leak in line 683.

Vim version: v8.1.2364
OS: Ubuntu 18.04

Checked the code, a file descriptor fd is not closed in the line 685, which is resulting in the resource leak.

Well, there is a "return" statement there, which means the program exits.  Thus the leak is irrelevant.
The same happens further down, I wonder why there is no warning for those.


[BUG] OpenIM Integration Issue in Existing Flutter App

I'm facing an issue where the OpenIM SDK works perfectly in a standalone Flutter app but fails to function correctly when integrated into my existing Flutter application. I've followed the integration instructions carefully, but I'm still unable to get OpenIM features working within my existing app.
Here's a summary of what I've tried:

Double-checked Initialization: I've ensured that OpenIM is initialized only once in my app.
Verified Dependencies: My existing app has all the required permissions, and I'm using compatible versions of the OpenIM SDK, Flutter, and other dependencies.
Checked Configuration: I've verified that the server information (address, API key, etc.) is correct in the OpenIM configuration.
Ensured Network Connectivity: My app has a stable internet connection.
Tested in Isolation: I've created a minimal Flutter app that only integrates OpenIM, and it works as expected.

Could you please help me with the following questions:
Are there any known compatibility issues between OpenIM and the specific versions of Flutter or other dependencies I'm using in my existing app?
Are there any specific configuration settings or steps that are critical for successful integration within an existing Flutter app?
Could there be any conflicts between the OpenIM SDK and other libraries or components in my existing app?
Are there any debugging techniques or tools you recommend to identify the root cause of this integration problem?
Additional Tips:

Got Listener logs at native side but couldn't get in flutter app.
Got only Initial logs at native side and flutter side.

@akashshrestha123
Hi, please provide the error information.

Hey @std-s  thank you so much for your response. I don't any kinds of error logs. since i have few question .
Urgent: OpenIM Listener Callbacks Not Triggering in Embedded Flutter App
We are encountering a critical issue with the OpenIM Flutter SDK not triggering listener callbacks when integrated into our existing Flutter application.
Key Points:

Environment:

Flutter Version: 3.0.2
OpenIM Flutter SDK: 3.5.1
Additional relevant dependencies: Firebase, go_router, provider, etc.

Successful Connection: We can confirm from native logs that the onConnectSuccess event is successfully triggered on the native side (both Android and iOS).
Listener Not Called: However, the corresponding listener callbacks defined in our Flutter code are not being executed.
Standalone Works: We have tested the OpenIM SDK in a minimal, standalone Flutter app, and the listener callbacks work as expected in that environment.

Steps Taken:

Verified that method channel names match exactly between Flutter and native code.
Ensured listener registration happens before or during initSDK.
Made the listener a class member to avoid garbage collection.
Used scheduleTask for Android to ensure callbacks on the main thread.
Checked for conflicting plugins or dependencies by temporarily disabling them.
Verified the correctness of initSDK parameters.

Request to OpenIM Team:

Are there any known compatibility issues:  Specifically between the OpenIM Flutter SDK v3.5.1 and our Flutter version (3.0.2) or other dependencies we are using?

Specific Configuration for Embedded Apps: Are there any special configuration settings or steps required when embedding the OpenIM SDK within an existing Flutter app (as opposed to a standalone app)?

Possible Conflicts: Could there be potential conflicts between the OpenIM SDK and other libraries or components commonly used in Flutter apps, such as Firebase or go_router?

Debugging Recommendations: Could you provide more guidance on how to further debug this issue? Are there specific logs or areas in the native code that we should focus on to identify the problem?

Alternative Solutions: Are there any alternative approaches or workarounds you recommend for handling listener callbacks when embedding the OpenIM SDK in a complex Flutter app?

Additional Notes:

We are not seeing any error messages in the Flutter console or native logs related to the OpenIM SDK initialization or connection.
We have also tried clearing the Flutter cache, rebuilding the project, and restarting the IDE, but the issue persists.

We would greatly appreciate any assistance you can provide in resolving this issue. Please let us know if you need any further information or code snippets to help you diagnose the problem.

@akashshrestha123 hi, Have you set up a listener? Something like this.

@std-s Yeah exactly i did. when i create simple app doing this all it is working correctly calling every listener method in flutter side but when integrate in my existing e-learning app only "onConnecting" is called in flutter side after that nothing is called in flutter side but when i see logger that is came  from native side every listener method is calling properly.

I have the exact same situation, but my iOS works fine. However, on Android, only onConnecting and onConnectSuccess are triggered, and none of the other event listeners are triggered at all.
We can obtain the following logs, but we are unable to trigger Flutter's listening events.
I/F-OpenIMSDK(flutter call native)(19498): { class:conversationManager,  method:setConversationEx }
I/F-OpenIMSDK(flutter call native)(19498): { class:conversationManager,  method:getConversationListSplit }
I/F-OpenIMSDK(flutter call native)(19498): { class:conversationManager,  method:setConversationEx }

Doctor -v:
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.22.1 on channel stable at /Users/cipchk/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (4 weeks ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/cipchk/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/cipchk/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/cipchk/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (3 available)
    • SM G996U (mobile) • RFCNC0J4X2J • android-arm64  • Android 14 (API 34)
    • macOS (desktop)   • macos       • darwin-x64     • macOS 14.5 23F79 darwin-x64
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 126.0.6478.63
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```[✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.22.1 on channel stable at /Users/cipchk/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (4 weeks ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/cipchk/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/cipchk/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/cipchk/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (3 available)
    • SM G996U (mobile) • RFCNC0J4X2J • android-arm64  • Android 14 (API 34)
    • macOS (desktop)   • macos       • darwin-x64     • macOS 14.5 23F79 darwin-x64
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 126.0.6478.63
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

@akashshrestha123  @cipchk
Hi, the main steps are to initialize the SDK, set the listener, and log in. This file shows the functions of initializing the SDK and setting the listener. You can run our open source Demo first.

@std-s  My test phone is a Samsung. How about you? @akashshrestha123
Other than Samsung (Galaxy S21+ 5G), I have tested brands like Xiaomi and Huawei, and everything works fine.

@cipchk mine also samsung galaxy a50. and are you sure it is working in xiaomi and huawei. are you creating simple or integrating in existing project?

@std-s is it something with flutter version also? since i am at flutter version 3.0.2. When i create simple app or creating new project every single listener and every thing is working correctly. Since i have a little heavy application that is e-learning and has a lot of package used. Did i miss something? Does it also depends on how our flutter project is structured?

@akashshrestha123 Yes, my Samsung device is similar to yours. Since we need to launch on Google Play, the minimum build version required is 30 or above. However, the official version provided is 26, so I feel the issue might be with the build version. I don't have the means to test this on my end; could you possibly conduct some tests on the build level? I believe it is indeed a build issue.

@akashshrestha123 Any progress?

@cipchk Thank you for you reply. I haven't tried yet. I will try and let you know.

@akashshrestha123  Any progress?

@cipchk i tried but still same issue. Any progress from your side?

I can work, but I can't explain to you why because I didn't make any fixes and it suddenly started working again without any warning.
The only thing I can think of that has changed is the User Token, you could try redeploying OPENIM Serve and see if that solves your problem.
It's a very strange phenomenon that I can't explain.

Yeah I do understand. I am also facing strange issue. when i create new project and try to run it is working properly but i am still facing same issue on integrating in existing system. At the moment i am feeling helpless and asking my team should we find other ways. Please give me any other solution if you have.

It hasn't made any sound for a long time, turn it off first.

@akashshrestha123 当我在编写另一个 Flutter 插件时，我无意中在 invokeMethod 监听了调用结果时会抛出 notImplemented 时，我想是不是 open-im-sdk-flutter 也有类似情况 ，的确出乎我的意料，在三星设备中调整生命周期来改变 MethodChannel 实例的顺序时，这个 BUG 意外的解决了，我无法得知为什么会这样，但这的确解决了三星设备无法同步的问题。
你可以尝试一下这个版本：
- # flutter_openim_sdk: ^3.8.1
+ flutter_openim_sdk:
    git:
      url: https://github.com/cipchk/open-im-sdk-flutter.git
      ref: issues-galaxy


safari 10.1 - bad fonts and italics

Link to PDF file (or attach file here):
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3847663/pdf/fnins-07-00231.pdf
Configuration:

Web browser and its version:
Safari 10.1 (126<IP_ADDRESS>.34)

Operating system and its version:
OSX 10.12.4 (16E195)

PDF.js version:
latest demo from github

Is an extension:
no

Steps to reproduce the problem:

open pdf
check font family and style of start of document
the bug is not present on previous versions of Safari

What is the expected behavior? (add screenshot)
Font should load and it's italic style display.

What went wrong? (add screenshot)
Font looks like a fall-back font, anyway no italic variant rendered.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

I get a nice rendering on W7 with FF 52.0.2.

This issue appeared on Safari 10.1, which if I don't go wrong was released end of March 2017

I've just spent a couple of hours trying to understand this - we've been experiencing the same issue with a different PDF.
Safari 10 introduced support for the font loading API, so there have been some changes to the browser in this area.
FontLoader#addNativeFontFace gets called, the font is added, the loaded promise from the FontFace resolves successfully, but the font just doesn't render when drawn on the canvas. This happens reliably. Weirdly it doesn't seem to affect all fonts in the document.
I've also noticed that, sometimes, when the document re-renders it will magically start working. This happens so infrequently that it makes me doubt my sanity. It seems to be more likely to happen if you leave the window for a minute, and then trigger a render by zooming.
Forcing FontLoader.isFontLoadingAPISupported to false doesn't help either - the prepareFontLoadEvent hack also thinks the font is loaded.

Looks like a known issue.
https://github.com/bramstein/fontfaceobserver/pull/86/files
https://bugs.webkit.org/show_bug.cgi?id=165037
https://bugs.webkit.org/show_bug.cgi?id=164902
Unfortunately not easily fixed by swapping loaded with load() in FontLoader.prototype.bind
Thought: if you put a known symbol in the generated font, you could repeatedly draw that to a canvas and measure the pixels to see if the font has been loaded 😬

I experience the same problem in Chrome, when PDF.js is used embedded in Seafile.com

The dropped fonts happen very randomly. If the document was loaded before, it does not happen at all. It seems to happen more with more complex PDFs.
Hope that does help a bit. I hope we can sort this out, it‘s a real problem for us.

Hope that does help a bit. I hope we can sort this out, it‘s a real problem for us.

@Tilmn I don't think it's related to the Safari problem discussed here and it can be moved to the separate issue (but you need to provide all requested details). Also we are not familiar with Seafile.com and screenshot does not show interface of PDF.js. Please contact vendors of web site for support -- you need to provide enough details for us to reproduce the issue.

here is what it looks like on my end http://prntscr.com/ffxtuj when pdf comes from aws but when pdf is on local server, fonts render well.

i solved the problem by converting the pdf to lower version. i've tested the pdf with version 1.7 and the error occurs but when i converted the pdf to version 1.4 with ghostscript the pdf renders well.

If anybody has any other temporary solutions please share. This has become a rather large issue for us.

@wanmigs sorry to ping you, would you mind dropping a few lines on how did you do the version change with ghostscript?
I wonder if this would do the trick as well?
https://www.techwalla.com/articles/how-to-convert-pdf-files-to-an-older-format

@franky-continu  make sure to have ghostscipt installed on your server.
$new_pdf = 'path/new.pdf'; // path where to output the new pdf
$src_pdf  = 'path/src/pdf';
shell_exec( "gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile={$new_pdf} {$src_pdf}");
Hope that does help a bit.

Sorry to spam, but is fixed now? When will we see an update? Just for information and reference for other people experiencing these issues.

It appears they have fixed this issue at Box. Any chance this fix can be pulled into this repo as well?

I'm not sure exactly how https://github.com/box/box-content-preview/pull/332 is relevant here, since that's a downstream consumer of the PDF.js library. (And what they did is simply to apply a work-around, one that could very well end up breaking more things than it fixes.)
There's no currently no solution to this on the PDF.js side. However, the fact that this appears to be limited to a particular version of just one browser, strongly suggests that it's a font handling bug in Safari (rather than in PDF.js).

All right, sorry I'm not familiar with the innards of either library. Was just hopeful. If there is no other fix than waiting for a Safari update, is there at least a workaround other than converting the files? I don't want to be dramatic but we are actually losing customers over this (as our customer base is agencies, who are predominantly on Safari).

Open Journal Systems uses PDF.js library so I have been following this thread. Regarding the statement that this is a Safari bug, I actually know that Apple disagrees.
One journal editor has been in contact with Apple regarding the issue and they think that the issue is with PDF.js. So waiting for a fix in the Safari end could last forever.

I'm not 100% sure if we're talking about the same "Safari bugs" but I've seen a great improvement in Safari's rendering under the Safari Technology Preview, so hoping those fixes get rolled out to general Safari soon:
https://developer.apple.com/safari/technology-preview/

It definitely should be fixable. Just now, I uploaded this file to Dropbox, and previewed it. The first time, everything went perfect, so I assumed they were using a different engine. Then I refreshed, and saw the exact issues I reported today. Now, every time I open the file, there is a flash of it looking perfect while it loads (this might be an image preview but I don't think so, as I was definitely able to interact with it the first time — even select the text), and then when it finishes loading all the text suddenly shifts. You can check it out in Safari to see if you see the same thing happening, here's the link to Dropbox.
So this establishes Safari is capable of displaying it properly. There must be something that's triggered in the library, that makes Safari go bad. If we find out what it is, I bet we can fix it!

There must be something that's triggered in the library, that makes Safari go bad. If we find out what it is, I bet we can fix it!

I can help a bit: modern Safari (as any other modern browsers) use Font Loading API (see https://drafts.csswg.org/css-font-loading/). PDF.js waits on Promise coming from browser to know when fonts are loaded (see code around fontLoadPromises variable).
@rijk can you override my analysis and confirm that PDF.js at fault here and PDF.js is doing something different for Safari or not using the API properly?

@yurydelendik, not sure what you mean with "can you override my analysis", but maybe my screen recording helps? Also, I've noticed the font issues don't seem to happen for fonts that are not installed on the system (so are loaded from the PDF). This would also point to the font loading being the issue.
I cannot tell you if the bug is in Safari or PDF.js. But the combination seems to break it; triggering the font loading just completely breaks the rendered page. And that's exactly what the Box fix seems to consist of as well: disabling the font loading API for Safari.

And that's exactly what the Box fix seems to consist of as well: disabling the font loading API for Safari.

Yes. We can introduce a workaround to disable font loading for some browsers. Using disableFontFace looks too extentsive. I would just suggest to check if it's a Safari at https://github.com/mozilla/pdf.js/blob/master/src/display/font_loader.js#L301 to just disable native font loading or add a flag similar to disableFontFace or disableRange (we blacklist Safari there as well, see https://github.com/mozilla/pdf.js/blob/master/src/shared/compatibility.js#L626).
P.S. can see https://bugs.webkit.org/show_bug.cgi?id=172210 also present in Chrome

Actually, PDFJS.disableFontFace = true seems to work! I don't know what the downsides are (performance I guess?), but at least we have a short-term workaround with this.

Actually, PDFJS.disableFontFace = true seems to work! I don't know what the downsides are (performance I guess?), but at least we have a short-term workaround with this.

PDFJS.disableFontFace = true enabled low quality internal font rendering engine -- no subpixel-AA and increased memory-CPU usage. It's a last resort option when font-faces are disabled by browser. We have intermediate fallback to load font without Font Loading API for legacy browser -- it shall be used here.

Note that this issue appears to be resolved in Safari 11.

Closing since this issue is fixed upstream.


There is error reported during olm installation

follow this document to install the olm - https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md
[root@ocp2-inf operator-lifecycle-manager]# kubectl create -f deploy/upstream/quickstart/olm.yaml --validate=true
namespace/olm created
namespace/operators created
clusterrole.rbac.authorization.k8s.io/system:controller:operator-lifecycle-manager created
serviceaccount/olm-operator-serviceaccount created
clusterrolebinding.rbac.authorization.k8s.io/olm-operator-binding-olm created
deployment.apps/olm-operator created
deployment.apps/catalog-operator created
clusterrole.rbac.authorization.k8s.io/aggregate-olm-edit created
clusterrole.rbac.authorization.k8s.io/aggregate-olm-view created
operatorgroup.operators.coreos.com/global-operators created
operatorgroup.operators.coreos.com/olm-operators created
error: error validating "deploy/upstream/quickstart/olm.yaml": error validating data: [ValidationError(ClusterServiceVersion.spec): unknown field "installModes" in com.coreos.operators.v1alpha1.ClusterServiceVersion.spec, ValidationError(ClusterServiceVersion.spec): unknown field "provider" in com.coreos.operators.v1alpha1.ClusterServiceVersion.spec]; if you choose to ignore these errors, turn validation off with --validate=false

FYI @gyliu513

The issue was not fixed.

@clyang82 The change will not take affect until a new release is made.

Good to know that. Thanks.


translate

Do you agree that I contribute part of the Chinese translation

Hi @Li-saltair thanks for reaching out.  Contributions are always welcome.
Although we already have translations into Chinese: http://expressjs.com/zh-cn/ and traditional Chinese: http://expressjs.com/zh-tw/, some material was added since these translations were done....  What specifically are you proposing to translate?

Closing since no activity for over a year.


Some more protocol handler refactoring. WORK IN PROGRESS

This PR cannot build and should not be merged, as it spans monorepos (in the context of lerna) and versions and it was/will be tested using --symlink:full. It will be split after testing and incorporating feedback.
What this does:

moves audience management into the protocol handler (along with the IAudience interface into protocol definitions)
adds a protocol handler builder type
all public entry points into the container has an optional IProtocolDetails parameter which can be used to inject a custom protocol handler

~The PR is also waiting on some changes from main for the Container class. Until then, they have been brought in manually.~

Hi @vladsud, this has been updated with:

moving container-friendly protocol implementations outside the server monorepo
no more protocol-definitions changes
audience/protocol handler are created at the same time by storing the existing clients and replaying them at audience creation
ILoaderProps has the ability to override the default protocol - need to think of an elegant way to make some tests run with empty quorums and such consistently

Take a look when you have some time

@zagriswo FYI

This needs to go to main now

Moved to https://github.com/microsoft/FluidFramework/pull/11109


List[Union[A,B,C]] types are casted to the wrong type if types are similar

Checks

[x] I added a descriptive title to this issue
[x] I have searched (google, github) for similar issues and couldn't find anything
[x] I have read and followed the docs and still think this is a bug

Bug
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.6.1
            pydantic compiled: True
                 install path: /Users/user/virtualenvs/testp-wbcFebeE-py3.8/lib/python3.8/site-packages/pydantic
               python version: 3.8.5 (default, Aug 10 2020, 10:25:56)  [Clang 11.0.0 (clang-1<IP_ADDRESS>)]
                     platform: macOS-10.14.6-x86_64-i386-64bit
     optional deps. installed: ['email-validator']

Hi, I'm writing a slack application which has multiple types which have the same fields and the only difference is the content of the field: https://api.slack.com/types/user
E.g: Difference between channel ID and user ID(A): CJ03ECZLG X UJ03ECZLG (user starts with U)
And for some reason Pydantic casts Channel (C) to the User (U) based on the order of types inside the annotation.
Am I using pydantic wrong or is the a legitimate bug?
If there is a better approach or workaround it would be much appreciated.
Thank you.
from pydantic import validator, BaseModel
from typing import Optional, Union, List

class U(BaseModel):
    id: str
    mention: Optional[str]

    @validator("mention", pre=True)
    def resolve_mention(cls, _, values):
        if 'id' in values:
            return f"<@{values['id']}>"

class B(BaseModel):
    name: str
    mention: Optional[str]

    @validator("mention", pre=True)
    def resolve_mention(cls, _, values):
        if 'name' in values:
            return f"{values['name']}"

class C(BaseModel):
    id: str
    mention: Optional[str]

    @validator("mention", pre=True)
    def resolve_mention(cls, _, values):
        if 'id' in values:
            return f"<#{values['id']}>"

class Final(BaseModel):
    # This does not work, why?
    entities: List[
        Union[
            U,
            B,
            C,  # C is casted to U
        ]
    ]

print(
    Final(
        entities=[
            U(id='UJ03ECZLG', mention='<@UJ03ECZLG>'),
            B(name='someone else', mention='someone else')
        ]
    )
)

print(
    Final(
        entities=[
            U(id='UJ03ECZLG', mention='<@UJ03ECZLG>'),
            B(name='someone else', mention='someone else'),
            C(id='CJ03ECZLG', mention='<@CJ03ECZLG>'),  # This is casted to U
        ]
    )
)

Actual result
entities=[U(id='UJ03ECZLG', mention='<@UJ03ECZLG>'), B(name='someone else', mention='someone else')]
entities=[U(id='UJ03ECZLG', mention='<@UJ03ECZLG>'), B(name='someone else', mention='someone else'), U(id='CJ03ECZLG', mention='<@CJ03ECZLG>')]

Expected result:
entities=[U(id='UJ03ECZLG', mention='<@UJ03ECZLG>'), B(name='someone else', mention='someone else')]
entities=[U(id='UJ03ECZLG', mention='<@UJ03ECZLG>'), B(name='someone else', mention='someone else'), C(id='CJ03ECZLG', mention='<@CJ03ECZLG>')]

Hello @1oglop1
It's been a know issue for quite a long time now (last issue with same problem: https://github.com/samuelcolvin/pydantic/issues/2079)
pydantic tries to coerce in the order of the union and your C instance can be coerced as U hence the result.
You can add a dump Literal for each model (a bit like you would do with TypeScript to discrimate unions).
You can also have a look at #2092, which solves your problem (just need to replace Union by StrictUnion)
Cheers

Oh, thank you for point me in the right direction. I've been searching for possible duplicates but could not find any.

Though this now gets deprecation warnings due to use of @validator (which should eventually be migrated to @field_validator), it seems to me this example is now working properly in v2, with the last printed line being:
entities=[U(id='UJ03ECZLG', mention='<@UJ03ECZLG>'), B(name='someone else', mention='someone else'), C(id='CJ03ECZLG', mention='<#CJ03ECZLG>')]


activiti-cloud-query to 7.0.26

Promote activiti-cloud-query to version 7.0.26

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@almerico: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

promotion-build
9f5bd945c0086e1989af13df2dd8acfcdd3b09d5
link
/test this

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


DAC: General Proposal

Why this should be merged
Berlin phase should contain the General Proposal.
How this works
GeneralProposal class is used to create a transaction of
type AddProposal  with the
TypeId constant of General Proposal,
with all the fields required and defined by caminogo node. https://github.com/chain4travel/caminogo/blob/dev/vms/platformvm/dac/camino_general_proposal.go
It is important that the fields were put in the correct order when writing and reading from transaction Buffer, serialized and deserialized.
GeneralVoteOption is a supporting class, used for adding options - strings that are limited to 256 characters.
*** AddVote example is missing for BaseFeePorposal and GeneralProposal.***
@evlekht  should I add them now or later?
How this was tested
By issuing a GeneralProposal transaction via camino-cli playground and by issuing a transaction via Caminojs example.
For Webstorm IDE users, 2 files were added that contain scripts to create Run files for platformvm jest and ts-node tests.

@evlekht I noticed that there are no examples for AddVote for BaseFee and GeneralProposal. Should I add those to make sure there's a way to test the functionality within the caminojs itself.

@evlekht I noticed that there are no examples for AddVote for BaseFee and GeneralProposal. Should I add those to make sure there's a way to test the functionality within the caminojs itself.

add them later, I'd suggest to create tech-debt issue for this


How do I send operator ID and token with my link?

I want to send operator ID and Token  Link with "deeplink test". So that if my user is logged in the website they don't have to log in in the app.

You have to extent the URL adding extra info. Until the url limit 255 bytes.
For example:  myapp://data=123
Then you only need to catch the url and split the string to obtain your desired data, in this case "123".


proposal: Go 2: require explicit variable shadowing

Branched from #377.
A backwards-compatible approach to shadowing: let var name prevent shadows of the name within its scope. Although this would not prevent unintended shadows, go vet could catch those.
x, err := Fa()
if err == nil {      // OR: if var err; err == nil
   var err           // override shadowing in if-scope
   y, z, err := Fb() // no need for separate declarations of y & z
   ...
}
if err != nil { ... }

To silence go vet re intended shadows, use var name T or var name = t in the new scope.
x, err := Fa()
if err == nil {
   var err error     // explicit shadowing; not flagged by go vet
   y, z, err := Fb()

Now the scope of err is clear in both cases.

So, If I understand correctly, what you propose is only a change to go vet, then?

The title and contents of this proposal seem to be conflicting. The title says to require declaration using var name in order to take advantage of variable shadowing. The LanguageChange label also seems to suggest this. But the contents seem to suggest that this is a backwards-compatible change that is only enforced by go vet.
Either way, this is a good change and has gotten a +1 from me.

@beoran @deanveloper: see the first sentence, and 3rd line of example.

Call me crazy but neither of those examples seem idiomatic to me.
The following is readable even if you aren't insanely familiar with Go; while your implementation requires either always adding those comments or implying an extra familiarity of (in my opinion counter-intuitive) functionality in the var built-in.
x, err := Fa()
if err == nil {
    var (
        y <type>
        z <type>
    )
    y, z, err = Fb()
}
if err != nil { ... }

It reminds me of ruby variable scoping, which I personally have never been fond of.

@IngCr3at1on, your example doesn't reproduce mine. It should be:
x, err := Fa()
if err == nil {
   var (
      y <type>
      z <type>
   )
    y, z, err = Fb()
}
if err != nil { ... }

@IngCr3at1on, your example doesn't reproduce mine. It should be:
x, err := Fa()
if err == nil {
   var (
      y <type>
      z <type>
   )
    y, z, err = Fb()
}
if err != nil { ... }

@networkimprov funny enough, that's what I had but then I changed it because your example doesn't use y and z and therefore will result in a compile error.

Using the example from the OP to expand on the point I was trying to make.
x, err := Fa()
if err == nil {      // OR: if var err; err == nil
   var err           // override shadowing in if-scope
   y, z, err := Fb() // no need for separate declarations of y & z
   if y && z { ... } // Some random operations on y and z so that we're using these values...
}
// Now we check the error reassigned when Fb ran _after_ performing operations on y and z.
if err != nil { ... }

I'd like to understand what instances you would write something like that myself because again it seems particularly unsafe, allowing the error to be shadowed without at least a warning from vet seems very dangerous here.
I'd almost argue the better solution would be to explicitly disallow shadowing at the compiler, resulting in a build error.

Per the first sentence of the text, "let var name prevent shadows of the name within its scope."

@networkimprov I fail to see how quoting a sentence from your OP addresses my concerns... I'd like to understand (as a Go user and a software programmer) why such a change is actually wanted because so far as I can tell it does not improve on anything?
For my perspective it only makes the functionality of the var built in less obvious and therefore the language less idiomatic.

Whilst I am not convinced the proposed solution is good, because it's not 'unambigious behaviour' of the var keyword. Or in any case, it makes it less obvious as @IngCr3at1on has mentioned.
However, I do think that requiring variable shadowing to be an explicit operation is a good idea. But I'd propose a change that won't break existing codebases that use shadowing consciously by introducing a new keyword.
i := 10
for {
     shadow i := 9
     i -= 1
     fmt.Printf("%v\n", i)
     break
}
fmt.Printf("%v\n",i)

// output:
8
10

This is not actually a real proposal, but I just want to raise the idea of making shadowing more explicit. Perhaps I could turn that into a more thought out proposal :)

FYI, a new keyword breaks any existing code using it as an identifier. That wouldn't rule it out, but it's a harder sell.

It's the "breaks existing code" that is the biggest argument against removing shadowing entirely as well (though personally I'm still in favor of it vs the other options I've seen)...
The main thing in either case would be coming up with a way to keep with the Go promise of having language support for 2 versions back; we don't have to necessarily have to come up with something that avoids breaking all older code but rather something that can be used to migrate towards the 'ideal future' (whatever it's decided that is; be it no shadowing, 'ruby-esque shadowing' (sorry just not sure what else to call it :smile:), shadow shadowing (:joy:) or something else all together).

It seems to me that shadowing is only potentially confusing when using :=.  We already have a keyword that fairly clearly indicates that the variable may be shadowing another variable: var.  I don't see a reason to introduce a new keyword for the same purpose.

How about a new operator, say :== that works exactly like :=, but does not allow any shadowing. That is,  all variables on the left hand side of :== must be new. That seems to  be a backwards compatible solution for the shadowing that := allows.

That wouldn't flag existing unintended shadows; nor enable explicit ones.

I had a similar idea as @beoran, but reversed: add a new operator (I was thinking of ::=, but it really doesn't matter) that would allow variable shadowing, and change the meaning of := to ban variable shadowing.

Yeah, silly me, I didn't think about the fact that the reserved keyword would already exist in the codebase as a name somewhere else. :)
To that end, the new operator might make more sense indeed. I do wonder, are people using shadowing consciously? Maybe it's because of the background of languages that I come from that it just seems like an odd choice to me in terms of readabilty of the code. Shadowing seems to be "wrong" to me.

A new meaning for := would break existing code. This proposal only vet-flags existing implicit shadows.

@networkimprov unless you allow for := to mean "shadow-able" and :== to mean "not-shadow-able". But I admit, since most of the time you wouldn't really think about the shadowing, you'd end up almost never using :==.
Is there a consensus that changes can't be 'break existing code' for Go 2?

Breaking existing code is a very heavy cost, and it requires a corresponding benefit.  It can be done, but it requires a very very good reason.

@ianlancetaylor correct me if I'm wrong but I believe an acceptable solution for a breaking change would be something like what I was talking about above; feature flag the breaking change to be disabled by default in one release, assuming at least some acceptance this would later be switched to enabled in a subsequent release before eventually being removed... I believe this would allow for keeping the '2 version back compat promise' regardless of whether the final change was made in 2.0 or some other release.
Assuming that's the case I feel like the "this breaks existing code" argument might be moot?

@IngCr3at1on For our plan for language changes see https://go.googlesource.com/proposal/+/refs/heads/master/design/28221-go2-transitions.md

Yes, but that stipulates "I think the only feasible safe approach is to not permit language redefinitions."
I agree with that. Redefining := to become non-shadowing would be exactly such a redefinition which cannot be safely permitted. The := operatis is about the most widely used operator in Go language programs everywhere, so we can't redefine it's meaning now. There already is go vet -shadow, that could be enhanced to detect more cases of shadowing. And then a new operator '::=' or ':==' or whatever could be added to make non-shadowing assignments, and we can all gradually  move to using that exclusively.

I think having multiple, similar, non orthogonal assignment operators is a bad idea. It reminds me of JavaScript's multiple comparing operators and it just feels wrong.

True, but I think the reason javascript has those is because the first equality operator turned out to have problems, so a second one was needed. When I think about it now, I would say that allowing := to shadow existing variables is a historic misfeature of Go. If we want to fix this in a backwards compatible way, then I think something like an extra operator will be needed, unless if someone else has a better idea?

The better idea is the original text of this proposal :-p
If you want to discuss new declaration operators, please start a new proposal!

Well this is what the discussion here lead up to.  The general topic seems to be how to solve the shadowing problem in Go. Maybe a new operator isn't a good solution for this problem, but I'm not convinced the original proposal is either, sorry.

Erm, the better idea is the original text of this proposal :-p

whether it's the "better" idea is still absolutely a subject for debate; however I agree that this thread has exploded a little bit.

please start a new proposal!

again, agreed (skipping my opinion about the OP); except that I feel like this "proposal" is incomplete as well (at least in regards to https://github.com/golang/proposal); perhaps another possible idea would be to move this conversation somewhere else (the gopher's slack or forums might be a good place for an informal 'round table') and shelve the proposals until some more formal versions are written (including complete reasoning around said proposals)?

Thanks for the suggestion.  This addresses a problem with variable redeclaration in :=.  It addresses it by adding an additional variable declaration (var err in the original example).  But we can already address the problem by adding additional variable declarations (of y and z in the original example, as discussed above), and using a regular assignment with = rather than a declaration with :=.  So the benefit of this proposal seems too small to be worth the cost of an unusual and new form of variable declaration.

Hm, did you consider the suggested method to prevent accidental shadowing? That is really the soul of the matter.

@networkimprov I'm sorry, I don't know what "method to prevent accidental shadowing" you are referring to.

I suggested that vet flag implicit shadows.
For intended shadows, make them explicit with var name T or var name = t in the new scope.
x, err := Fa()
if err == nil {
   x := 1            // implicit shadowing; flagged by vet
   var err error     // explicit shadowing; not flagged by vet
   y, err := Fb()

The point of this proposal is to fix accidental shadowing, a common source of complaints.

@networkimprov Thanks.  That seems entirely different from the proposal at the top of this issue.
I'm not sure how I feel about that suggestion.  It's fairly routine to write code along the lines of
    f, err := os.Create(...)
    if err != nil {
        if err := os.Mkdir(...); err != nil {
            return err
        }
    }

It seems awkward to have to remember to use = in the inner block, or to have to explicitly declare var err error.

Creating shadows should be "awkward", because you should almost never do that!
Implicit shadows may be routine, but they're often disastrously wrong, hence the constant complaints about shadowing.
Go philosophy has long held that an extra line for the sake of clarity is beneficial ;-)
PS. my previous code example is from the proposal text, with one line added for contrast.

The advantage of shadowing in a block structured language is that blocks can be moved around independently without having to worry about whether shadowing is being introduced or removed.  That is, shadowing was an intentional choice made when the language was designed.  In this, Go of course follows many other languages, notably C.
It may have been the wrong choice, and we can consider changing it, but in my opinion we shouldn't approach from the basis that shadowing should be available but awkward.  Either the language does shadowing or it does not.

You'd have to vet-flag shadows if you conclude they're a misfeature.
Then you'd need a way to denote intentional shadows. I suggested explicit declaration. Others suggested a new operator like ::=. You rejected both; do you have something else in mind?

I don't think you are framing the question in the most useful way.  Either shadowing is fine or it is not.  If it is fine then we don't need to do anything.  If it is not fine then we don't need any special mechanism to denote intentional shadows.

@ianlancetaylor  Sorry to butt in here, but it's not so simple. Go has many features that are useful and "fine", and shadowing is one of those fine features. However, as Go is today, with :=, it is too easy to shadow accidentally. I myself have inadvertently shadowed variables on several occasions and it causes subtle, hard to detect bugs. I think that is what this issue was about in the first place.
Now, there seems to be no consensus over how to solve this problem, and it's true that for my projects, I could adopt a code standard where the use of := is simply banned. However, it would be nicer if there was support either in the language or in the supporting tools to detect and warn me of such such accidental shadowing. Of course, the question is then by what heuristic this could be detected...

I can see a plausible argument for permitting shadowing, as we do today.  I can also see a plausible argument for banning shadowing, though I would worry about how much existing code would break.  But I can't yet see a plausible argument for banning shadowing and then adding a special mechanism to permit shadowing.  Why bother?  It's trivial to just rename the variable.

I don't think you're understanding the pain that implicit shadowing is causing.
Go takes one of eight paths for a, b := f(), as each var is defined, assigned, or shadowed. You cannot tell which without searching prior code, so it's easy to write something that works differently than intended.

Either shadowing is fine or it is not

Shades of gray. Shadows are beneficial in some cases, harmful in others; @beoran said the same. Can we not accommodate both?

Every language decision is shades of gray.  Every language decision is a cost/benefit decision.
Accommodating two different approaches to shadowing means additional language complexity that every Go programmer needs to learn.  What benefit do we get that is worth that cost?

@ianlancetaylor, I have rewritten the proposal in light of the discussion since the issue was closed.
Could we give other members of the Go team a chance to consider this?
Could you re-open the issue pending the outcome of that review?

@networkimprov The original proposal has a lot of comments that seem no longer applicable.  Would you be OK with simply opening a new issue instead?  Thanks.

Surely, I've filed #31064. Thanks for your feedback!


tests: Make sure to delete folders created by root

In our Jenkinsfile we include the wsCleanup() step. This does not fail
the build even though it was not able to successfully clean up the
workspace.
In addition, with this patch we make sure ourself that the workspace is
cleaned up after the test execution.

Needs more investigation. Cleaned up Jenkins for now.


Combining response curves across models

Hi Gufeng, FB team
I have a brand with multiple SKUs, with different sales drivers across SKUs, except media (TV, FB etc). Given difference in drivers, I need to make 1 model for each SKU (total 4 SKUs). However, given media is same, I want to see the response curve across the brand (and not just SKUwise).
Can you please advise if there is a way I can combine the 4 different response curves into one?. I am thinking of just summing up the Sales response across 4 SKUs and i wanted to check if the output present in 'pareto_media_transform_matrix' refers to the media impact that is used to make up 'Y axis' of response curve ? Sorry, I am not sure of this content of this file (couldnt find documentation).
Thanks very much

in pareto_media_transform_matrix, under column "type", you can find "decompMedia" that is the response on the Y-axis and "adstockedMedia" that is the X-axis. Also a fun fact: when you do decompMedia / saturatedMedia, you will get a constant that is the coefficient of this variable;)
Actually very interesting use case. because the media drives all 4 SKUs, when modelling each SKU, the ROIs will be of course too high because the spend is for all 4 SKUs. It does sound reasonable to sum up the contribution of each SKU to get to total. It's quite interesting to think about using this sum for Y axis while using the same x-axis. Because the hill transformation is continuous/differentiable, the sum should also be continuous visually. So it probably will work. However, we don't know the parameters (alpha and gamma) of the "unified response curve", so it can't be used for budget allocation, unless we try to fit this "unified response" with hill function again...I'm not even sure if the new curve can be fitted by Hill. Anyways, hope it helps and happy analysing :)

Thanks so much Gufeng! appreciate your time and advise!


Ensure consistent coloring by gene when ordering changes.

Simplifies gene and reqGene so that they now contain the same value - the latter triggers a fresh request for expression values, the former triggers a recolor of the scatter plot.
Not sure about some of the React-ish parts:

Did I do the right thing in the second argument of useEffect in ScatterPlot.js?
In various parts, I put let tmp = [...selectedClusterSummary]; before assigning setSelectedClusterSummary(tmp);. Can't we just modify selectedClusterSummary in place and then call setSelectedClusterSummary(selectedClusterSummary)?

@LTLA directly modifying state if not recommended because it may not trigger the proper call backs that depend on this object state.

Under that logic, we should do instead:
      const { resp } = payload;
      let tmp = [...selectedClusterSummary];
      let index = selectedClusterIndex[resp.gene];
      tmp[index] = { ...selectedClusterSummary[index] }
      tmp[index].expr = Object.values(resp.expr);
      setSelectedClusterSummary(tmp);

Otherwise directly assigning to .expr would assign to selectedClusterSummary by reference.


Add es.yaml

Adds Spanish translation file es.yaml

I added a few new lines you may want to translate as well.


HDFS-12125. Document the missing EC removePolicy command

Forked Hadoop PR 1258, to trigger precommit.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
67
Docker mode activated.

_ Prechecks _

+1
dupname
0
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 3 new or modified test files.

_ trunk Compile Tests _

+1
mvninstall
1202
trunk passed

+1
compile
63
trunk passed

+1
checkstyle
51
trunk passed

+1
mvnsite
67
trunk passed

+1
shadedclient
774
branch has no errors when building and testing our client artifacts.

+1
javadoc
53
trunk passed

0
spotbugs
179
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
177
trunk passed

_ Patch Compile Tests _

+1
mvninstall
62
the patch passed

+1
compile
57
the patch passed

+1
javac
57
the patch passed

+1
checkstyle
44
hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 604 unchanged - 3 fixed = 604 total (was 607)

+1
mvnsite
69
the patch passed

-1
whitespace
0
The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply

+1
xml
2
The patch has no ill-formed XML file.

+1
shadedclient
742
patch has no errors when building and testing our client artifacts.

+1
javadoc
49
the patch passed

+1
findbugs
182
the patch passed

_ Other Tests _

-1
unit
6953
hadoop-hdfs in the patch failed.

+1
asflicense
33
The patch does not generate ASF License warnings.

10690

Reason
Tests

Failed junit tests
hadoop.hdfs.server.namenode.ha.TestBootstrapAliasmap

hadoop.hdfs.qjournal.client.TestQJMWithFaults

hadoop.hdfs.server.datanode.TestLargeBlockReport

Subsystem
Report/Notes

Docker
Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1264/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/1264

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml

uname
Linux 31d14b00d52e 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / ce3c5a3

Default Java
1.8.0_212

whitespace
https://builds.apache.org/job/hadoop-multibranch/job/PR-1264/1/artifact/out/whitespace-eol.txt

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-1264/1/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-1264/1/testReport/

Max. process+thread count
4094 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-1264/1/console

versions
git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.


Kubernetes topology load attempts to execute on the same pod

I am attempting to deploy GlusterFS over a Kubernetes cluster. The Kubernetes cluster is already deployed using kubespray (aka kargo), with the following configuration:

gluster1 : master
gluster2: node
gluster3: node
gluster4: node

Kubernetes Version: 1.6.6
OS: Ubuntu 16.04 on Vagrant
gluster-kubernetes Version: 1.1
Heketi client Version: 4.0
The 3 Kubernetes nodes are to be the glusterfs nodes as well. I follow the instruction found here: https://github.com/heketi/heketi/wiki/Kubernetes-Integration. The problem also manifests if I use the gk-deploy script.
The commands that I use are the following, within the kube-templates folder:
kubectl create -f heketi-service-account.yaml
kubectl label node gluster{2..4} storagenode=glusterfs
kubectl create -f glusterfs-daemonset.yaml
kubectl create -f deploy-heketi-deployment.yaml
kubectl port-forward deploy-heketi-3389103616-jp15s :8080
export HEKETI_CLI_SERVER=http://localhost:37823

The topology load command fails with the following error:
$ heketi-client/bin/heketi-cli topology load --json=topology.json
Handling connection for 37823
Creating cluster ... ID: 6c2dabb7514bfb6a1c683e89bdec444b
	Creating node gluster2 ... ID: 3049af98f1b18e426e1be9f144020e0f
		Adding device /dev/sdc ... OK
	Creating node gluster3 ... Unable to create node: Unable to execute command on glusterfs-nhk3d:
	Creating node gluster4 ... Unable to create node: Unable to execute command on glusterfs-nhk3d:

The kubernetes executor of heketi attempts to execute the commands on the same pod regardless of the hostname and IPs given in the topology.json file.
For further reference:
The output of kubectl get pod is:
NAME                             READY     STATUS    RESTARTS   AGE       IP               NODE
deploy-heketi-3389103616-jp15s   1/1       Running   0          4m        <IP_ADDRESS>      gluster3
glusterfs-5znsj                  1/1       Running   0          5m        <IP_ADDRESS>   gluster3
glusterfs-nhk3d                  1/1       Running   0          5m        <IP_ADDRESS>   gluster2
glusterfs-qwnzf                  1/1       Running   0          5m        <IP_ADDRESS>   gluster4

The output of kubectl get node is:
NAME       STATUS                     AGE       VERSION                 EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION
gluster1   Ready,SchedulingDisabled   14h       v1.6.6+coreos.0-dirty   <none>        Ubuntu 16.04.2 LTS   4.4.0-79-generic
gluster2   Ready                      14h       v1.6.6+coreos.0-dirty   <none>        Ubuntu 16.04.2 LTS   4.4.0-79-generic
gluster3   Ready                      14h       v1.6.6+coreos.0-dirty   <none>        Ubuntu 16.04.2 LTS   4.4.0-79-generic
gluster4   Ready                      14h       v1.6.6+coreos.0-dirty   <none>        Ubuntu 16.04.2 LTS   4.4.0-79-generic

I also attach my Vagrantfile and topology.json.
Vagrantfile.txt
topology.json.txt

Does gluster on node gluster2 crash after Adding device /dev/sdc ... OK?
I am having the exact same issue.  After the adding device it crashes, the errors in the logs are as follows.
Creating cluster ... ID: 51a2149f6080c232112e98c0f3ebe763 Creating node 872218-knode02 ... ID: 37a2ef29f5acbe801a61a6b6243bc643 Adding device /dev/sdb ... OK Creating node 872220-knode03 ... Unable to create node: Unable to execute command on glusterfs-knp6r: Creating node 874746-knode04 ... Unable to create node: Unable to execute command on glusterfs-knp6r: Error loading the cluster topology. Please check the failed node or device and rerun this script using the --load option.
Gluster log on crashed node
[2017-06-22 16:27:13.309047] E [MSGID: 101032] [store.c:433:gf_store_handle_retrieve] 0-: Path corresponding to /var/lib/glusterd/glusterd.info. [No such file or directory] [2017-06-22 16:27:13.309135] E [MSGID: 101032] [store.c:433:gf_store_handle_retrieve] 0-: Path corresponding to /var/lib/glusterd/glusterd.info. [No such file or directory] [2017-06-22 16:27:13.309159] I [MSGID: 106514] [glusterd-store.c:2219:glusterd_restore_op_version] 0-management: Detected new install. Setting op-version to maximum : 31000 [2017-06-22 16:27:13.310626] I [MSGID: 106498] [glusterd-handler.c:3669:glusterd_friend_add_from_peerinfo] 0-management: connect returned 0 [2017-06-22 16:27:13.310717] W [MSGID: 106062] [glusterd-handler.c:3466:glusterd_transport_inet_options_build] 0-glusterd: Failed to get tcp-user-timeout [2017-06-22 16:27:13.310751] I [rpc-clnt.c:1059:rpc_clnt_connection_init] 0-management: setting frame-timeout to 600 pending frames: patchset: git://git.gluster.org/glusterfs.git signal received: 11
on heketi I get the following
[kubeexec] ERROR 2017/06/22 15:36:48 /src/github.com/heketi/heketi/executors/kubeexec/kubeexec.go:247: Failed to run command [gluster peer probe <IP_ADDRESS>] on glusterfs-19zpf: Err[command terminated with exit code 1]: Stdout [Connection failed. Please check if gluster daemon is operational.
[kubeexec] ERROR 2017/06/22 15:36:49 /src/github.com/heketi/heketi/executors/kubeexec/kubeexec.go:247: Failed to run command [gluster peer probe <IP_ADDRESS>] on glusterfs-19zpf: Err[command terminated with exit code 1]: Stdout [Connection failed. Please check if gluster daemon is operational.

@dcorn yes shortly after, I get an error on the pod where heketi added the device. However, I don't have logs, kubectl logs does not return anything.

Same here.  check /var/log/gluster/glusterd.log on the node. If that does not work you will need to attach to the container.  I have been dealing with this for 2 days now and im clueless to the solution.

@AlterEgo7 By chance did you use kargo/kubespray to deploy your kube stack?

Trying to setup Glusterfs on the nodes outside of Kubernetes yield the same results.   I get segfaults when trying to probe a peer.

@dcorn I use flannel as the network interface. I have also tested with calico and have the same results.

This relates to https://github.com/kubernetes-incubator/kubespray/issues/1196. I will post solution there.

Glad this was properly troubleshot! :) Apologies for the silence, I was just BAFFLED... at least I had the right idea that it was a network-thing.


Correct build status for External Job projects

Hello @jan-molak! Thanks a lot for this great plug-in! The only thing I miss at the moment is that the build monitor shows the build status for external jobs (hudson.model.ExternalJob) correctly. Currently, external jobs are always considered disabled by the build monitor. However, external jobs are by default disabled because external jobs do not have any build logic and, consequently, hudson.model.ExternalJob's superclass hudson.model.ViewJob always returns false for isBuildable().
Maybe extending isDisabled() in JobView by something like the following
return ! (job.isBuildable() || job instanceof hudson.model.ViewJob);

could do the trick? What do you think?
Thanks a lot for your help!

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39107499-correct-build-status-for-external-job-projects?utm_campaign=plugin&utm_content=tracker%2F580790&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F580790&utm_medium=issues&utm_source=github).

Hello @hschink! Thanks, I'm glad that you're finding it useful 👍
Sure, I don't really use external jobs, but if you'd like to propose a PR I'd be happy to merge it in? (It's a one-liner plus tests, and you'd be listed as a contributor ;-) )
Maybe something along those lines, so that we remember that ViewJob represents an external job:
return ! isEnabled(job) || isExternal(job));

(some private helper methods to encapsulate the logic and make it a bit more obvious).
Looking forward to hearing from you!
Jan

Hello @jan-molak! Ok, let me try to get into it. However, don't expect an proposal by next week. :wink:

Hello @jan-molak! I prepared PR #266 for this issue. May you have time to look into it?
Looking forward to your comments!
Hagen

Hello @hschink, sure, apologies, I was off the grid for two weeks. I'll check it out now.
Best,
Jan

Thanks for your contribution, @hschink. The PR looks good to me, merged!
I've also added acceptance tests to demonstrate the usage of this new feature.
Best,
Jan

Your welcome, @jan-molak! And thanks a lot for the acceptance tests. :+1:
Hagen

No problem, if you'd like to try out the latest build before it hits the Jenkins Update Centre you can download it here.


[Feature Request]: Added support for publicNetworkAccess parameter in Microsoft.RecoveryServices/vaults module

Description
Added support for publicNetworkAccess parameter.
Enable or disable inbound network traffic from public clients using API 2022-09-30-preview.
https://github.com/Azure/ResourceModules/pull/2494

@juanandmsft - I see you also have PR in for this. Due to the requirement to fix static validation I have added this as part of a PR that is currently open as it is required for the new API Version. please see #2488


Allow disabling fingerprinting

Add an option to disable the fingerprint field. papertrail will avoid calculating the fingerprint when this field is missing which is desired when attaching large files. e.g. x00MB csv files.

:+1: