[communication] Precise Typechecking

Packages impacted by this PR

@azure/communication-alpha-ids
@azure/communication-call-automation
@azure/communication-chat
@azure/communication-common
@azure/communication-email
@azure/communication-identity
@azure/communication-job-router
@azure-rest/communication-job-router
@azure-rest/communication-messages
@azure/communication-phone-numbers
@azure/communication-recepient-verification
@azure/communication-rooms
@azure/communication-short-codes
@azure/communication-sms
@azure/communication-tiering
@azure/communication-toll-free-verification

Issues associated with this PR
N/A
Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly. This PR migrates those libraries to precise typechecking setup introduced in https://github.com/Azure/azure-sdk-for-js/pull/31786
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
N/A
Provide a list of related PRs (if any)
https://github.com/Azure/azure-sdk-for-js/pull/31786
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[x] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[ ] Added a changelog (if necessary)

API change check
API changes are not detected in this pull request.


firefox 75.0 -> 76.0

This is the upcoming Firefox 76 update. It is due for tomorrow.
The prelimiary changelog can be seen over at mozillas release notes repo.
Usually these updates also fix a few security issues with varying
severity.
While ofBorg will classify this is a mass-rebuild the Firefox bump
itself isn't. The NSS change included in this PR has been submitted (and
merged) to staging and should be included in the next staging iteration.
I kept the NSS change to make it easier to review this PR and to merge
it into master if the fixed security issues are severe enough to warrant
it.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/firefox-not-up-to-date/5941/11

Built firefox-wayland and it's up and running writing this comment.
Thanks!

It's not surprising that there are multiple "critical" vulnerabilities fixed: https://www.mozilla.org/en-US/security/advisories/mfsa2020-16/

@andir is there a reason you merged #86806 & #86811 before this?

Because of the rebuilds, I suppose.  Even the current staging-next doesn't have that nss version yet.

@andir is there a reason you merged #86806 & #86811 before this?

Yeah, @vcunat is right. The other two have less rebuilds since they are already using dedicated NSS packages. There is no reason to delay the stable branches because of master needing more rebuilds/time.

I think just the firefox attribute needs the updated NSS.  For now I briefly tried the most important ones atop master (-bin and -esr) and pushed them.


Test collection consumes too many resources in large workspaces

Environment data

VS Code version: Version 1.30.2 (1.30.2)
Extension version (available under the Extensions sidebar): 2019.1.0
OS and version: Mac os Mojave
Python version (& distribution if applicable, e.g. Anaconda): 3.7.2
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Relevant/affected Python packages and their versions: XXX

Expected behaviour
Not taking over all my CPUs
Actual behaviour
Large amounts of pytest processes running, grabbing all my CPU cores.
NOTE: Not running actual tests, only gathering test info with --collect-only flag
Steps to reproduce:
Not sure at this point
I do have pytest functionality enabled
Python › Unit Test: Py Test Enabled

Logs

Closing as nothing needs to be done here.
Its up to the user to configure pytest.ini or if they don't have that, configure settings.json (done via extension UI prompts).
Looks like in this case the user had set the root of the tests to be the root directory that caused pytest to recurse through all of the project folders and that's out of our control.
I.e. if user used pytest from the command line the same thing would have happened.

I solved this by adding a pytest.ini, but I do not agree that this is only user problem.
This is why

I enabled pytest functionality globally using Python › Unit Test: Py Test Enabled
I opened a project where we do not even use pytest, but we do have some python files
VS Code becomes unresponsive and locks up huge amounts of resources

Looks like in this case the user had set the root

I had not configured pytest at all. We are not even using pytest in this project, this is why I still think this is an issue
If the conclusion is that this is a user problem, then I think there should be a BIG warning in the global VS code setting for Python › Unit Test: Py Test Enabled to say that it may cause big problems.

I had not configured pytest at all. We are not even using pytest in this project, this is why I still think this is an issue

This is something the user chose to enable , see  below

I enabled pytest functionality globally using Python › Unit Test: Py Test Enabled

I think there should be a BIG warning in the global VS code setting for Python › Unit Test: Py Test Enabled to say that it may cause big problems.

Again, user enabled this, and it is pytest consuming the resources as it had been enabled for this workspace implicitly. Dispelling warnings is wrong. There could be some issues with other things tools...
We can reopen this issue depending on the number of upvotes to this issue. I.e. if others come across similar issues, we will address it,


12 web parser

Motivation
Get backend API call to fetch ingredients and nutritional value of dish provided a web link to an AllRecipes page
Changes
Server side, made route for ingredients gathering calls and post request controller (CTRLR) for the call.
For more info view the comments in code on the index.ts file (there are some prep calls made for app).
Sample curl
PROVIDED LINK: https://www.allrecipes.com/recipe/215044/watermelon-feta-salad/
WITH KEY: webLink
API POST CALL TO: http://localhost:8000/ingredients/web-scraper
ENSURE THAT: Body data on postman is either on "x-www-form-urlencoded" OR "raw"

Response
{
"ingredient_list": [
{
"name": "olive oil",
"quantity": "3",
"unit": "tablespoons"
},
{
"name": "white balsamic vinegar",
"quantity": "2",
"unit": "teaspoons"
},
{
"name": "kosher salt",
"quantity": "½",
"unit": "teaspoon"
},
{
"name": "grape tomatoes",
"quantity": "8",
"unit": "ounces"
},
{
"name": "arugula",
"quantity": "3",
"unit": "cups"
},
{
"name": "sliced red onion",
"quantity": "1",
"unit": "cup"
},
{
"name": "watermelon",
"quantity": "2",
"unit": "pounds"
},
{
"name": "feta cheese",
"quantity": "4",
"unit": "ounces"
}
],
"nutrition_facts": {
"Calories": "131",
"Fat": "8g ",
"Carbs": "12g ",
"Protein": "3g "
}
}

did you pull from main, theres some files that should be already deleted from main e.g. reportWebVitals.js

We should probably add some tests for some of the functions in this PR?

We could. Should I put this in another file? Im not sure where I should add such tests for the main function and the helpers

Ok now I manually removed the client files that didnt follow through.
I am going to add the class style for the function.
And just let me know how you want the testing written because I have no clue where we should put the testing (I did some testing and it all works)


Adds iframed editor example

Summary
Adds an iframed editor example to Draft.js based on @haikyuu's CodeSandbox demo https://codesandbox.io/s/y0q1q281kz
Test Plan
git clone claudiopro/draft-js .
cd draft-js
git checkout iframe-example
python3 -m http.server 8000
open http://localhost:8000/examples/draft-0-10-0/iframe/iframe.html

Yes, it won't work until we ship #1877


Question on usage

Love what you've done here.
Been using nGrok to do TCP tunnelling for a while. With nGrok, I run the app on the remote computer, and locally I only need a url:port to access that computer, no application required locally. (Of course nGrok is the gateway)
Is this functionality possible with your solution, or does it require a client AND server app to be running for it to work?

Hi @MeestorX,
thanks for opening this issue!
TcpTunnel requires all of the three instances (gateway, proxy-server, proxy-client) to be running for it to work, as this is an "on-premises" application that doesn't use any cloud service. (However, for example the gateway and proxy-server instances could also be run on the same machine.)
For example, to allow others to access a web server running on a machine behind a firewall/NAT (which seems to be a common use case for nGrok), you could run both the gateway and proxy-server instances on a public server like a VPS (that is reachable over the internet), and run the proxy-client instance on the remote machine (behind NAT/Firewall) where the web server is running.
For this, you could use a configuration file similar like this on the public server (the passwords in the Session elements must be replaced with secure ones):
<Settings xmlns="https://github.com/kpreisser/TcpTunnel">
  <!-- Set-up the gateway instance. -->
  <Instance type="gateway">
    <!-- Use port 25200 with SSL for the connection from the proxy-client. -->
    <Listener port="25200" certificatePemFilePath="my-cert.pem" certificatePemKeyFilePath="my-private-key.pem" />
    <!-- Additionally, use a non-SSL listener for the local connection from the proxy-server. -->
    <Listener port="25201" />

    <Session id="1" proxyClientPassword="my_secret_password_client" proxyServerPassword="my_secret_password_server" />
  </Instance>

  <!-- Set-up the proxy-server instance that connects to the local gateway.
       This doesn't need to use SSL as it's a local connection, and the gateway listener
       is started before the proxy-server instance is started. -->
  <Instance type="proxy-server" host="localhost" port="25201" useSsl="0">
    <Session id="1" password="my_secret_password_server">

      <!-- Listen on port 8080 and forward it to the proxy-client machine on port 8080.-->
      <Binding listenPort="8080" targetHost="localhost" targetPort="8080" />
    </Session>
  </Instance>
</Settings>

Additionally, you could use a configuration file like this on the remote machine where the web server is running (where my-public-server.example.org represents the domain name where the server is reachable and has a SSL/TLS certificate):
<Settings xmlns="https://github.com/kpreisser/TcpTunnel">
  <Instance type="proxy-client" host="my-public-server.example.org" port="25200" useSsl="1">
    <Session id="1" password="my_secret_password_client" />
  </Instance>
</Settings>

Then, users could open http://my-public-server.example.org:8080 to access the web server running on the remote machine (behind NAT/Firewall).

Thank you for your reply. I'll have to give this a try when I get a chance.
Thanks again for your work on this.


Debug mode?

Is there a debug mode I can enable to log Link presses and push/reset/etc calls? My links are working fine in Next but are not working at all in Expo.

i believe it should be doing that already…but yeah that sounds useful

I wonder if this would help? https://reactnavigation.org/docs/devtools/

I was only getting errors if the link matched a key that does not exist in the navigation stack or if the link did not exist at all, but my problem was that the link existed but navigation to the key failed because I had nested it (I'm using a BottomTabNavigator and did not fully understand how the linking should be configured). Maybe this is an abnormal enough edge-case that it doesn't need special error handling, but it sure would have saved me a day or two of debugging.

It may be a good issue to open on the React Navigation repo. But we could consider overriding the function here to improve the DX.

This code should be throwing an error for you, so it seems like it's able to parse a state from the URL, but it just isn't the desired one?
      const state = options?.getStateFromPath
        ? options.getStateFromPath(to, options.config)
        : getStateFromPath(to, options?.config);

      if (state) {
        const action = getActionFromState(state, options?.config);

        if (action !== undefined) {
          navigation.dispatch(action);
        } else {
          navigation.reset(state);
        }
      } else {
        throw new Error('Failed to parse the path to a navigation state.');
      }

Maybe we can throw an error if there's no action too (assuming that's what happened).

If you want to reproduce the issue I had you can do so by nesting some valid screens that aren't direct children of the tab navigator in the linking config:
screens: {
  Login: '/login',
  BottomTabs: {
    screens: {
      Main: '/home', // Valid child of bottom tabs
      UserDetails: '/user/:id', // Deeply nested screen, not a direct descendant
     },
   }
 }

Got it. If you're open to adding a PR / testing it, I'm happy to review it! Thanks for reporting this.


Rename APIFY_LOCAL_EMULATION_DIR to APIFY_LOCAL_STORAGE_DIR

Or maybe just APIFY_STORAGE_DIR. The point is that the word "emulation" might be bit confusing to users.

This change will also affect Apify CLI, plus we need to change docs.

Fixed in https://github.com/apifytech/apify-js/pull/161


fix ZKPGenerator.maybeUnblindUtxo function

getUtxo().asset is the prefixed asset buffer (33 bytes). The fix just ensures that we are providing 32 bytes buffer (asset without prefix) as unblindedInput.asset.

related to https://github.com/ionio-lang/ionio/pull/29
@tiero @altafan please review

Does not fix the problem! Please add a test case that mized conf & unconf inputs. In Ionio test I use WithOwnedInputs


QA: test operator installation via marketplace

Well, I did some manual tests and I was able to install dev operator from the marketplace but it needs some tweaks before:

Download the dev operator helm chart
Tweak it a bit to remove these annotations
catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.9.0-0' and catalog.cattle.io/auto-install: elemental-crd=match => will be fixed by https://github.com/rancher/elemental-operator/pull/563
Install chartmuseum to create a helm repo with a correct index.yaml file
Add my custom repo to Rancher:

5. Install the dev operator (1.4.0) through the marketplace


Vulnerability roundup 101: privoxy-3.0.28: 9 advisories [7.5]

search, files

[ ] CVE-2020-35502 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20210 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20211 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20212 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20213 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20214 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20215 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20216 CVSSv3=7.5 (nixos-20.09)
[ ] CVE-2021-20217 CVSSv3=7.5 (nixos-20.09)

Scanned versions: nixos-20.09: c7e905b6a97.
Cc @phreedom

See also: #116916, #90972

Upgrading to privoxy 3.0.32 addresses all of the CVEs (including those in the two linked issues) except for CVE-2019-3699, which seems to be specific to OpenSUSE.
3.0.32 is already in master.

@Phreedom would a backport of privoxy 3.0.32 to 20.09 be feasible?

The update was done in #128919.


Enable introspection of feature parsing/rendering info

We currently support the return of some feature information via our interactive draw parameter and feature picking events (and getFeatureAtPixel() method).
For a design environment like Tangram Play, it would be very useful to have more such info available. For example, this could enable the user to click any feature/pixel, and get info not just on the feature itself, but also the Tangram layer names it matched, and specific draw parameters that were used to build and render it.
Here's a list of information to consider. Because of added overhead for some of these (especially those that require copying or storing additional styling data that is currently discarded), we may want to put some of this functionality behind an explicit "introspection" mode that can be enabled by the client (e.g. Tangram Play).

[ ] Enable feature picking/selection for all objects (not just those marked as interactive)
[x] Feature properties
[x] Data source name and layer the feature originated from
[x] Scene layers the feature matched (e.g. [roads.bridges, roads.paths])
[ ] Computed draw block for matching scene layers (result of draw block merging)
[ ] Computed draw parameters for specific feature (e.g. after JS function-based parameters are evaluated)

Data source name and layer added in be3640a7e554182e2b1e4bce9aefc817867dc785 & 2b47f8ee895f11b9f7a0e785f0440ebd6c8cdf5b.

Matching scene layer names added in #274.

"Introspection mode" WIP (currently enables interactivity for all features) in https://github.com/tangrams/tangram/compare/introspection.

+1

Ability to turn introspection on/off for all features at run-time included in #303, will be in 0.8. Remaining items such as computed draw parameters remain to be done.


validation errors are swallowed

if I call initializeMiddelware with a bad spec, I just get an ugly traceback, e.g.:
Error: Swagger document(s) failed validation so the server cannot start
    at /tmp/my-project/node_modules/swagger-tools/index.js:74:13
    at /tmp/my-project/node_modules/swagger-tools/lib/specs.js:1231:7
    at /tmp/my-project/node_modules/swagger-tools/lib/specs.js:1073:29
    at validateAgainstSchema (/tmp/my-project/node_modules/swagger-tools/lib/specs.js:712:14)
    at validateStructurally (/tmp/my-project/node_modules/swagger-tools/lib/specs.js:1045:3)
    at Specification.validate (/tmp/my-project/node_modules/swagger-tools/lib/specs.js:1229:3)
    at Object.initializeMiddleware (/tmp/my-project/node_modules/swagger-tools/index.js:133:17)
    at /tmp/my-project/middleware/api-specs.js:47:22
    at /tmp/my-project/node_modules/lodash/index.js:3073:15
    at baseForOwn (/tmp/my-project/node_modules/lodash/index.js:2046:14)
    at /tmp/my-project/node_modules/lodash/index.js:3043:18
    at Function.<anonymous> (/tmp/my-project/node_modules/lodash/index.js:3346:13)
    at init (/tmp/my-project/middleware/api-specs.js:44:7)
    at initConsumer (/tmp/my-project/node_modules/blueoak-server/lib/loader.js:262:37)
    at /tmp/my-project/node_modules/blueoak-server/node_modules/async/lib/async.js:181:20
    at iterate (/tmp/my-project/node_modules/blueoak-server/node_modules/async/lib/async.js:262:13)

But, if I add err.failedValidation = true; to the error condition in index.js (I can create a pull request if necessary, but I'll comment with the code snippet), I get some useful output:
API Errors:

  #/responses/NotFound: Missing required property: description
  #/responses/NotFound: Additional properties not allowed: $ref
  #/responses/InvalidRequestData: Missing required property: description
  #/responses/InvalidRequestData: Additional properties not allowed: $ref
  #/responses/InvalidApiKey: Missing required property: description
  #/responses/InvalidApiKey: Additional properties not allowed: $ref
  #/responses/CreatedClaim: Missing required property: description
  #/responses/CreatedClaim: Additional properties not allowed: $ref
  #/parameters/QueryInsuredName: Not a valid parameter definition
    #/parameters/QueryInsuredName: Missing required property: schema
    #/parameters/QueryInsuredName: Missing required property: type
  #/parameters/QueryDate: Not a valid parameter definition
    #/parameters/QueryDate: Missing required property: schema
    #/parameters/QueryDate: Missing required property: type
  #/parameters/QueryById: Not a valid parameter definition
    #/parameters/QueryById: Missing required property: schema
    #/parameters/QueryById: Missing required property: type
  #/parameters/QueryAddress: Not a valid parameter definition
    #/parameters/QueryAddress: Missing required property: schema
    #/parameters/QueryAddress: Missing required property: type
  #/parameters/PathId: Not a valid parameter definition
    #/parameters/PathId: Missing required property: schema
    #/parameters/PathId: Missing required property: type

13 errors and 0 warnings

I assume the nice output is the desired behavior ... will you publish a fix?

fix in index.js
//...
  args.push(function (err, results) {
    if (results && results.errors.length + _.reduce(results.apiDeclarations || [], function (count, apiDeclaration) {
      return count += (apiDeclaration ? apiDeclaration.errors.length : 0);
    }, 0) > 0) {
      err = new Error('Swagger document(s) failed validation so the server cannot start');
      err.failedValidation = true; // <--- this is the addition
      err.results = results;
    }

    debug('  Validation: %s', err ? 'failed' : 'succeeded');
//...

I think this is a duplicate of #327.  If you agree, do you mind closing this?

@whitlockjc - thanks for the quick reply!
I had looked at #327 before, but I think there is a difference:
While it would be great to recover from a validation error programmatically (#327), it is OK for my case to ask the swagger developers to manually recover from the error by fixing their spec and restarting the server (the validation failure happens at server startup anyway).
All that I'm looking for is the validation errors to be printed to the console instead of the obtuse traceback.
As far as I can tell (and definitely for my case), adding the one line referenced in my previous comment does the trick.
i.e.:
err.failedValidation = true;

Let's keep it open then.  I realize that err.failedValidation dictates some things and maybe I neglected to set it in some place.

ok, yeah ... in this case, a new Error is created with the message Swagger document(s) failed validation so the server cannot start, so .failedValidation needs to be added to that error before control continues to the rest of the code

Do you want to create a PR?  I could help you out if need be.  If not, I can whip this up pretty quickly.

<EMAIL_ADDRESS>is out with this fix in it.  Thanks for your help.

awesome - thanks for yours


Expose Jupyter Notebook default port in container

It's nice to run a jupyter notebook in docker to have access to pg, dockerized python deps, and gdal, etc.

question for @fvankrieken and @damonmcc - Are you using Jupyter Notebookes, and if so how are you running them? Wondering if this change is necessary.

I am - I just have a folder in my repo/devcontainer where I keep them and run them in vscode (basically just open it like any other file and run it right there)

TBH I have not looked into the details, but from interacting with it basically seems that it starts its own server in the background, in whatever environment your in. You also can add external/existing servers but I haven't done that. Don't think it's horribly hard - at first glance I think roughly what you've done here would cover the changes to the container needed, if you had a server running locally outside of the dev container


Having trouble running the test server locally with yarn: lit-html

When I run yarn serve the server runs but displays this error throughout the screen when loaded with temp.yaml:
(part) => { if (!(part instanceof lit_html_js__WEBPACK_IMPORTED_MODULE_1_["NodePart"])) { throw new Error('unsafeHTML can only be used in text bindings'); } const previousValue = previousValues.get(part); if (previousValue !== undefined && Object(lib_parts_js__WEBPACK_IMPORTED_MODULE_0_["isPrimitive"])(value) && value === previousValue.value && part.value === previousValue.fragment) { return; } const template = document.createElement('template'); template.innerHTML = value; // innerHTML casts to string internally const fragment = document.importNode(template.content, true); part.setValue(fragment); previousValues.set(part, { value, fragment }); }
Seems like its caused by a duplicate of lit-html since it is included on its own, but also is included with lit-element.

Seems like its caused by a duplicate of lit-html since it is included on its own, but also is included with lit-element.

a separate lit-html package is needed as we use unsafeHTML directive which is not included with lit-element package
import { unsafeHTML } from 'lit-html/directives/unsafe-html';

however we are care full to use litHtml from lit-element package


https://putyourlightson.com/plugins/sprig#sprig.pushurlurl - multiple parametners

Question
A question about the plugin or how it works. We are diligent about documentation so please check the plugin docs before submitting your question.
I have a component working where I can switch the view between a list and grid view - this works perfectly. I furthermore want to have each view have pagination. Currently pagination only works on the grid view as it's the default option. {% set gridListView = gridListView ?? "grid" %}
When paginating from the list view the page refreshes and returns to the grid view. Am using the pagination code from the cookbook.
have added this code {% do sprig.pushUrl('?page=' ~ page ~ 'gridListView=' ~ gridListView) %} to my template but the urls don't update correctly, there is no & between the variables page and gridListView. If I add the ampersand like this &gridListview= I get a PHP notice

A non well formed numeric value encountered

Additional context
Add any other context or screenshots about the support request here.

I would expect {% do sprig.pushUrl('?page=' ~ page ~ '&gridListView=' ~ gridListView) %} to work.
In this video I use the url_encode filter to do it as follows.
{% do sprig.pushUrl('?' ~ {page: page, gridListView: gridListView}|url_encode) %}

A non well formed numeric value encountered

This error might be indicating that you might be using page as a number when it is not one. Be sure to set it to 1 by default.
{% set page = page ?? 1 %}

Ben,
Now I'm not getting the non well formed numeric error but when on the list view and paginating it still switches back to the grid view.
If I manually update the url to page 2 and list view it works as expected. However when clicking the pagination links it switches back to grid. If I copy the generated page 2 link for listview I see this:
https://local.test/exhibits/sustaining-memories/survivor-stories/?page=1&gridListView=list# and after clicking the resulting url is https://local.test/exhibits/sustaining-memories/survivor-stories/?page=2&gridListView=grid
But manually entering this url https://local.test/exhibits/sustaining-memories/survivor-stories/?page=2&gridListView=list works and is on page 2 with the list view
Am using your code above
{% do sprig.pushUrl('?' ~ {page: page, gridListView: gridListView}|url_encode) %}

Right, because you are not storing the state of the gridListView. State can be persisted using input fields, so this should work:
{% set page = page ?? 1 %}
{% set gridListView = gridListView ?? 'grid' %}

{{ hiddenInput('page', page }}
{{ hiddenInput('gridListView', gridListView }}

@bencroker Thank you, I didn't know about persistent state with input fields. Now works perfectly.


Fetch partitions in parallel

When the processing of one partition is slow, all partitions are affected.
It's because the "fetch" for other partitions only is performed after the process completion for all partitions.
The "fetch" for all topics and partitions are synchronous.
So, it's not possible to use the partitions as a unit of parallelism.
Can we deal with this using some setting or using any different strategy?
Test with a slow process (exaggerated) on partition 0:
https://github.com/hmagarotto/kafkajs-test-partition-parallelism

This sounds a bit related to #370 (#570) to me. If so, maybe you could try the beta releases with the test?

Hi, thanks for your response.
What I understood about this refactoring is that:
The consumer will process batches immediately after a response for each fetch request.
But, a new fetch for this consumer group will only be started after all batches has already been processed. For a new fetch start, we need to wait for "enqueuedTasks" on "Runner::fetch".
So, if I have understood correctly, a slow task for some partition will block new fetches for all other partitions.
I tried the test with the new beta version and all partitions stay blocked by slower partition task.
Test code updated with beta KafkaJS: https://github.com/hmagarotto/kafkajs-test-partition-parallelism
Similar needs for another library/language: https://github.com/akka/alpakka-kafka/issues/110

Your understanding is correct, @hmagarotto. Currently the fetch loop will wait until all partitions have been processed before issuing new fetch requests. I've been having the same discussion on our Slack today, and I think it makes a lot of sense to start the next fetch for a broker as soon as we have processed the last response from it, to avoid having to wait for the slowest one.

@Nevon, we recently tried a BETA version of KafkaJS and noticed that another fetch started before the current processing fetch completed.  The problem we encountered was that the second fetch received the same message/offset from the same topic/partition that was currently being processed in the yet to finish fetch.  This resulted in the same message being processed twice "concurrently" within <50 ms of each other.  This seems like a bug, should I raise a bug report against the BETA version?
I think starting the next fetch before the previous finishes, but only if there are guarantees that prevent what I described above (duplicate concurrent processing of the same messages).

we recently tried a BETA version of KafkaJS and noticed that another fetch started before the current processing fetch completed. The problem we encountered was that the second fetch received the same message/offset from the same topic/partition that was currently being processed in the yet to finish fetch. This resulted in the same message being processed twice "concurrently" within <50 ms of each other. This seems like a bug, should I raise a bug report against the BETA version?

Please do. Especially if you can produce a failing test or at least a repro case for this.
To be clear, we would never start a fetch for a partition for which we haven't processed all messages in the current batch yet, as partitions are the unit of concurrency in Kafka. However, there's nothing stopping us from issuing a new fetch request for partition 1 just because we haven't finished processing the messages for partition 2 yet.

Hi all - are there any plans to work on this?
Regarding workarounds:

Lower maxWaitTimeInMs.
Create slow consumers on separate clients (would that work?  or do they end up being pooled?)
Any more?

Hi all - are there any plans to work on this?
Regarding workarounds:

Lower maxWaitTimeInMs.
Create slow consumers on separate clients (would that work?  or do they end up being pooled?)
Any more?

workaround 2 gives me No active topic partitions, sleeping for 5000ms - I can't make sense of that...
If I put each consumer in it's own consumer group then it works (although I prefer workaround 1)

workaround 2 gives me No active topic partitions, sleeping for 5000ms - I can't make sense of that...
If I put each consumer in it's own consumer group then it works (although I prefer workaround 1)

workaround 2 gives me No active topic partitions, sleeping for 5000ms - I can't make sense of that...

The 5000 is simply the maxWaitTime you configured, and the message is logged when the consumer is not subscribed to any topics, or didn't get any partitions to fetch assigned to it. In that case KafkaJS just waits that time before issuing another fetch attempt, in the hope that until then maybe the assignment has changed.
Check whether you subscribed to the correct topics in all your consumers.

workaround 2 gives me No active topic partitions, sleeping for 5000ms - I can't make sense of that...

The 5000 is simply the maxWaitTime you configured, and the message is logged when the consumer is not subscribed to any topics, or didn't get any partitions to fetch assigned to it. In that case KafkaJS just waits that time before issuing another fetch attempt, in the hope that until then maybe the assignment has changed.
Check whether you subscribed to the correct topics in all your consumers.

I ran into this bug, with 1 kafka instance I get messages pretty much instantly (minBytes is 1), with 2 it hits the maxWaitTimeInMs

I'm also hitting this bug. Does this need repro steps, or anything else I can do to prioritize fixing this?

Steps to reproduce would be usefull.
I'm especially interested as to how the messages get produced to the
topic.  E.g. are there multiple producers?  How many messages are produced
at a time?
On Mon, 30 Aug 2021, 16:35 Milan B, @.***> wrote:

I'm also hitting this bug. Does this need repro steps, or anything else I
can do to prioritize fixing this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tulios/kafkajs/issues/683#issuecomment-908154912, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABDLW5VOK3WZ2OLUWQNQOSDT7M7GVANCNFSM4LXBQJZQ
.

I'll try to work on a demo video and source code, but just to confirm - in my case, there is one producer (one Kafka Connect task/job) that sends to any number of partitions. The problem only happens if there are 2+ Kafka brokers and works correctly with 1 Kafka broker.

Maybe the example added on issue opening is still valid. I've added a repository with a simple example to reproduce the issue (with docker-compose).
https://github.com/hmagarotto/kafkajs-test-partition-parallelism
This example shows that the fetch of the partitions is synchronous. So, when the processing of some partition is slow, it impacts the consumption of all other partitions. It happens even on a single broker.

Actually, now testing with 1.15.0 and 1.16.0-beta.21 and I can reproduce the bug (or maybe a different bug?) with a single-node Kafka cluster.
The code is pretty much the same as the one in the OP's repro repo - for clarity, pasting here. I will upload videos shortly.
// last tested on 2021-09-01 with<EMAIL_ADDRESS>const { Kafka } = require("kafkajs");
const { delay } = require("bluebird");
const { toPath } = require("lodash");

const topic = 'TEST_bug_683_repro_single_node_beta_test2';
const numPartitions = 4;
const groupId = 'test_bug_683_repro_cg_single_node_beta_test2';
let startShuttingDown = false;
let totalProduced = 0;
let totalConsumed = 0;

let client = new Kafka({
  brokers: [
      'kafka00.default.svc.cluster.local:9092',
    ],
});

async function createTopic() {
  const admin = client.admin();
  await admin.connect();
  await admin.createTopics({
    topics: [{
      topic,
      numPartitions,
    }],
  });
  await admin.disconnect();
}

async function produce() {
  const producer = client.producer();
  await producer.connect();
  for (let id = 0; id < numPartitions*10; id++) {
    const message = { id, created_timestamp: Date.now() };
    const messageStr = JSON.stringify(message);
    const partition = id % numPartitions;
    const envelope = {
        topic,
        messages: [{
          key: JSON.stringify({id}),
          value: messageStr,
          partition,
        }],
      };
    // console.dir(envelope);
    await producer.send(envelope);
    totalProduced++;
  }
  await producer.disconnect();
  if (!startShuttingDown) {
    console.log(`Produced ${totalProduced} messages total.`);
    setTimeout(produce, 1500);
  }
}

async function consume() {
  const consumer = client.consumer({
    groupId,
    maxBytesPerPartition: 1024,
    readUncommitted: false,
  });
  await consumer.connect();
  await consumer.subscribe({ topic });
  await consumer.run({
    autoCommitInterval: 500,
    partitionsConsumedConcurrently: 4,
    eachMessage: async ({ topic, partition, message }) => {
      const msg = JSON.parse(message.value.toString());
      if (partition === 0) {
        console.log(`Consuming a message id ${msg.id} on the delayed partition 0`)
        // 8 seconds delay on partition 0 to demonstrate the delay is not related to the 5s maxWaitTimeInMs
        await delay(8 * 1000);
      }
      console.log(`Message processed from [${topic}:${partition}] with id [${msg.id}] - total consumed: ${++totalConsumed}`);
    },
  });
}

async function main() {
  await createTopic();
  await consume();
  produce();
  setTimeout(() => { startShuttingDown = true; }, 40_000);
}

main();

Uploaded a repro video, in case there's any issue with getting the same results elsewhere: https://www.youtube.com/watch?v=4qr64l3Fg-8 (Please note it might take a few hours until youtube processes the higher resolution versions, until then it's in unreadable 360p.)
To sum up the video:

using the code above
first run with stable kafkajs, 4 partitions, 2 partitionsConsumedConcurrently
another test run without the sleep to demo the code/cluster works correctly
beta version run with more logging to clearly show when the "poison" consumer starts, and that it blocks any parallel consumers from any partition - now running partitionsConsumedConcurrently = 4 just to be clear
another beta version run with kafka-console-consumer running in parallel to demo the cluster works correctly

This isn't a bug - it is the expected behaviour with the current implementation.
The partitionsConsumedConcurrently feature does concurrent partition processing for the batches that are retrieved in each fetch loop.  All processing still needs to complete before the next fetch request is issued.
A feature request for a 'more concurrent' consumer makes complete sense.  But it's a fairly substantial piece of work.

Per https://github.com/tulios/kafkajs/pull/1258#issuecomment-997877468, is this resolved?

There's always more that could be done, but I would consider it resolved by #1258.
The current state is that essentially each broker gets its own fetch loop, so now there's no dependency between the processing of partitions fetched from different brokers, but if you are fetching partition 1 and 2 from the same broker, you'll still be waiting for all both partitions to finish processing before fetching the next batch for those partitions, but it won't prevent fetching new data from other partitions.
Increasing parallelism further would increase the chattiness towards the brokers. For example, say you finished processing partition 1 but are still working on partition 2, then you could make a new fetch request for just partition 1. But that would mean multiplying the number of fetch requests by the number of subscribed partitions, which is not how the API is meant to be used. It might be possible to come up with a design where you use some kind of buffer of fetched-but-unprocessed batches and try to cleverly refill the buffers in a way that doesn't require making 1 fetch request per partition, but it seems wildly complex and I'm not sure it would actually yield that much better results in the real world.


A color picker get incorrect color on the dimming picture

Description
In "choose primary color", the color picker get incorrect color on the dimming picture
To Reproduce

Fulfill picture with "#00FF00"(green) color
Double Click to select primary color in the bottom left palette.
Under Custom click the "+" button
Now click "pick a color from the screen", try to pick green color from your picture, you will get the wrong  "#00B100"(dark green) color

Version
Ubuntu 24.04
Pinta "2.2+ba63d8807b2512911c7e5453312b317dddc4da84"

Is this Pick a color from the screen option in the color chooser dialog? It must be a Linux-specific thing that GTK enables, since it isn't appearing for me on macOS.
Using the Color Picker tool from Pinta's side toolbar is probably the better way to do this though, if you're wanting to pick a color from the image?

Is this Pick a color from the screen option in the color chooser dialog? It must be a Linux-specific thing that GTK enables, since it isn't appearing for me on macOS.
Using the Color Picker tool from Pinta's side toolbar is probably the better way to do this though, if you're wanting to pick a color from the image?

Thanks, yeah I think that is something that GTK's color chooser dialog is only enabling on certain platforms, so it's not something Pinta is directly responsible for. If it's directly sampling from what the screen is displaying, and the window manager is dimming the parent window, then that would explain why a different color is being picked
I'd suggest using the color picker tool that's built into Pinta for choosing colours from an image you have open (see attached screenshots). You can then click on a pixel to change Pinta's primary color


Support for WezTerm

It would be really cool if this program supported the WezTerm terminal emulator.
WezTerm supports the Kitty image protocol out of the box (and the Kitty keyboard protocol with a config option set), so this shouldn't be difficult. In fact, I'm surprised it doesn't work already, but in my testing it seems that keyboard input is not working at the moment.

Which commit are you checked out at? I've tried using the newest commit and commit @cbb19e0 with the suggested modified changes, but then, the preview stops showing. I'm wondering if there was a change that was introduced recently that causes the code changes to not work, although it's not likely looking at the commit log.

My current working code (against master) is produces the following diff:
diff --git a/termpdf.py b/termpdf.py
index 96ee9e0..d33556b 100755
--- a/termpdf.py
+++ b/termpdf.py
@@ -1088,7 +1088,7 @@ def write_gr_cmd_with_response(cmd, payload=None):
     # rewrite using swallow keys to be nonblocking
     write_gr_cmd(cmd, payload)
     resp = b''
-    while resp[-2:] != b'\033\\':
+    while resp[-2:] != b'':
         resp += sys.stdin.buffer.read(1)
     if b'OK' in resp:
         return True
@@ -1495,10 +1495,6 @@ def view(file_change,doc):
     scr.get_size()
     scr.init_curses()

-    if not detect_support():
-        raise SystemExit(
-            'Terminal does not support kitty graphics protocol'
-            )
     scr.swallow_keys()

     bar = status_bar()
@@ -1522,7 +1518,9 @@ def view(file_change,doc):

         scr.stdscr.nodelay(True)
         key = scr.stdscr.getch()
+        key = scr.stdscr.getch()
         while key == -1 and not file_change.is_set():
+            sleep(1)
             key = scr.stdscr.getch()
         scr.stdscr.nodelay(False)

although i haven't touched it in a while, and can't say what exactly is necessary or not anymore 😬.
With this, on macos + a month-or-so old wezterm nightly, it appears to continuously update without issue.

This works for me! I am observing a warning that says that it failed to load the page, but the functionality does not seem to be impacted. I will see if I can find a way to resolve this warning over the weekend.
I think the sleep(1) can be removed. I noticed moving between pages was slow, so after removing that line, moving between pages became instantaneous.

Hi!
I found this issue yesterday, as I was stumbling into it trying termpdf.py master with wezterm 20231017-091526-fec90ae0.
My interpretation of the problem is the following:
According to the kitty graphics protocol documentation, the terminal emulator is supposed to answer a "display graphics command" with a byte sequence of the form <ESC>_Gi=<id>;OK<ESC>\.
And the termpdf.py code tries to read an answer:
def write_gr_cmd_with_response(cmd, payload=None):
    # rewrite using swallow keys to be nonblocking
    write_gr_cmd(cmd, payload)
    resp = b''
    while resp[-2:] != b'\033\\':
        resp += sys.stdin.buffer.read(1)
    if b'OK' in resp:
        return True
    else:
        return False

but never returns from read(1). It just hangs there.
So my suspicion is, that maybe wezterm does not answer with this byte sequence. I'll dig deeper into that.
For me, the current work around is the following diff:
@@ -1087,6 +1095,7 @@ def write_gr_cmd(cmd, payload=None):
 def write_gr_cmd_with_response(cmd, payload=None):
     # rewrite using swallow keys to be nonblocking
     write_gr_cmd(cmd, payload)
+    return True
     resp = b''
     while resp[-2:] != b'\033\\':
         resp += sys.stdin.buffer.read(1)

But that is not optimal, as it removes error checking, as the terminal emulator might signal, that it was unable to display the image.

After reading the kitty graphics protocol more closely, I am no longer sure, that a repsonse is even mandatory. So, I've change my "fix" to be:
@@ -681,7 +681,7 @@ class Document(fitz.Document):
             self.clear_page(self.prevpage)
             # display the image
             cmd = {'a': 'p', 'i': p + 1, 'z': -1}
-            success = write_gr_cmd_with_response(cmd)
+            success = write_gr_cmd(cmd)
             if not success:
                 self.page_states[p].stale = True
                 bar.message = 'failed to load page ' + str(p+1)

I've created a pull request (#44) for this.
I did not do a lot of testing yet, so please, let me know, if you see any regressions with this.


Sunstone change password disabled for oneadmin and serveradmin

Description
Changing the password for oneadmin and serveradmin entails more than just a DB change. Carelessly changing it through Sunstone leads to trouble.

oneadmin: http://docs.opennebula.org/5.10/operation/users_groups_management/manage_users.html#change-credentials-for-oneadmin-or-serveradmin

serveradmin: http://docs.opennebula.org/5.10/deployment/sunstone_setup/suns_auth.html#serveradmin-credentials

Sunstone should not allow this, but rather point to the relevant documentation.
Use case
Cloud admins wanting to change default password for oneadmin and serveradmin
Interface Changes
Sunstone change password dialog

Progress Status

[ ] Branch created
[ ] Code committed to development branch
[ ] Testing - QA
[ ] Documentation
[ ] Release notes - resolved issues, compatibility, known issues
[ ] Code committed to upstream release/hotfix branches
[ ] Documentation committed to upstream release/hotfix branches

@tinova PR to be approved:

One: https://github.com/OpenNebula/one/pull/4571
Docs: https://github.com/OpenNebula/docs/pull/1071


Not a real issue: unique callback function

One annoying thing is having to define different callback functions for each device. If we could also pass the name of the device in the function,we  can have only one function and it will be up to the programmer to search for the device to be controlled based on the past name. Each device can direct to the same routine.
for example only for brightness devices:
In espalexadevice.h>
typedef std :: function <void (uint8_t b, String dName)> BrightnessCallbackFunction;
in espalexadecive.cpp>
void EspalexaDevice :: doCallback ()
{
if (_callback! = nullptr) {_callback (_val, _deviceName); return;}

Hey, this should already be possible. Just pass the same callback function when initializing each device, e.g.
espalexa.addDevice("Alpha", alphaChanged, EspalexaDeviceType::onoff);
espalexa.addDevice("Beta", alphaChanged, EspalexaDeviceType::dimmable, 127);

Callback functions have EspalexaDevice* as a parameter, that pointer refers to the device that caused the callback. You can then identify the device via d->getName() or d->getId()

Yup!


swift: 5.5.3 -> 5.6.2

Description of changes

Several new upstream releases
Unbreak build

Things done

Built on platform(s)

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

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

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

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Thanks for taking the time to do this!
I'm testing these changes out locally.
It appears that the SHA for swift-format needs an update.

Thanks for taking the time to do this!
It appears that the SHA for swift-format needs an update.

Welcome! This PR took me quite a while and I changed from 5.6.1 to 5.6.2 at some point, so it's possible that some other SHAs need updates as well. Meanwhile, I updated the one for swift-format.

+1
Verified build on my Ubuntu setup. All validation tests pass. Simple programs compile and function as expected.

Great work! I recommend adding yourself as a maintainer @Trundle!

Result of nixpkgs-review pr 186476 1

1 package built:

swift

How is x86_64-linux failing but aarch64-linux succeeding?

How is x86_64-linux failing but aarch64-linux succeeding?

I haven't seen this before and the previous runs were all successful. Possibly a flaky test or some issue with the runner (e.g. out of memory)

Maybe we should disable the test(s) that are flaky.

the failing test is AutoDiff/compiler_crashers_fixed/sr14290-missing-debug-scopes-in-pullback-trampoline.swift. Pretty random since this type of regression tests don't regress much. Nevertheless we may want to disable it.

I personally think it's a bit hasty to call a test flaky if it only failed once for not-so-clear reasons, but if that is what is needed to move this PR forward, I'm happy to disable it.

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

1 package built:

swift

Hi @Trundle , I am getting following error. Is there any plan to support this in future ?
error: Package ‘swift-5.6.2’ in /nix/store/1is4128ymlh2pd0amyq5hw8d1gm6im4h-source/pkgs/development/compilers/swift/default.nix:464 is not supported on ‘x86_64-darwin’, refusing to evaluate.

We never had Darwin support here. It would be a separate, none trivial support to enable it.

@ofborg eval

Darwin support is tracked in #37473.


[ml] fix pylint to unblock core

API change check
API changes are not detected in this pull request.

fixing here: https://github.com/Azure/azure-sdk-for-python/pull/37878


Mandatory FilePath parameter is against PowerShell philosophy

Currently the FilePath parameter is mandatory which does not really follow the PowerShell way of doing things.
I want to update the file paths with urls but the way the CommandLet works right now is making it very clumsy.
How it works now which is ugly.
function Set-SARIFCodePath {
    param(
        [string] $SarifFile,
        [string] $GitRoot,
        [string] $GitRemote
    )
    $content = Get-Content -Path $SarifFile
    $updatedContent = $content -replace "file:///$GitRoot", "$GitRemote`?path="
    $updatedContent | Set-Content -Path $SarifFile
}

$gitRoot = git rev-parse --show-toplevel
$gitRemote = git config --get remote.origin.url

Invoke-ScriptAnalyzer -Path $Path -Recurse -ReportSummary | ConvertTo-SARIF -FilePath $ResultsFilepath
Set-SARIFCodePath -SarifFile $ResultsFilepath -GitRoot $gitRoot -GitRemote $gitRemote

How it should work:
function Set-SARIFCodePath {
    param(
        [Parameter(ValueFromPipeline = $true)]
        [string] $SarifContent,
        [string] $GitRoot,
        [string] $GitRemote
    )
    $SarifContent -replace "file:///$GitRoot", "$GitRemote`?path="
}

$gitRoot = git rev-parse --show-toplevel
$gitRemote = git config --get remote.origin.url

Invoke-ScriptAnalyzer -Path $Path -Recurse -ReportSummary | `
     ConvertTo-SARIF | `
     Set-SARIFCodePath -GitRoot $gitRoot -GitRemote $gitRemote | `
     Out-File -FilePath analysisfindings.sarif

I can make the change, but I want confirmation that this is a good approach first.

I agree that it should support an implicit -PassThru (-FilePath not set) in case a cmdlet can directly consume it.

@fflaten, nah, as @FilipDeVos says, -FilePath should not be mandatory and instead, the function should simply emit an object. Then, the consumer can do anything they want with it: post-process it, combine it with other SARIF runs from other tools, convert it to YAML, to JSON, to whatever, etc.

@fourpastmidnight that's what I said. Implicit -PassThru-like behavior. 🙂

@fflaten Oh, sorry! I misunderstood!

No, but it could be optional with -PassThru in a different default parameter set. Up to implementer 🙂


Ensure vagrant uses flannel

The Vagrantfile is setup to use flannel.  The default network
was changed to Calico (#1031).  However, the Vagrantfile was
not updated to reflect this.  Ensuring the Vagrantfile remains
functional on master, until someone decides to make it work
with Calico.

Thanks,
In which context are you using kargo vagrant? Would you be interested to have it in the CI ?


Consolidate otel and otelcollector package

Checklist

[ ] Tested in playground or other setup
[ ] Documentation is changed or added
[ ] Tests and/or benchmarks are included
[ ] Breaking changes

Description of change

This change is

cmd/aperture-agent/agent.go line 39 at r2 (raw file):
Previously, kwapik (Krzysztof Kwapisiewicz) wrote…
This should be renamed to AgentOTELModule or sth like this and contain agent.AgentOTELComponents inside. No need to call those separately,
In such a case, AgentOTELComponents might be not-exported.

For this case, I am having separate calls to avoid another import cycle that will cause - agent.AgentOTELComponents cause circular dependency

cmd/aperture-agent/agent.go line 39 at r2 (raw file):
Previously, seunghyupoh3517 (Seunghyup Alex Oh) wrote…
For this case, I am having separate calls to avoid another import cycle that will cause - agent.AgentOTELComponents cause circular dependency

Would it be unsafe to keep it separate call and explicitly have AgentOTELComponents exported as it is?

cmd/aperture-controller/controller.go line 28 at r2 (raw file):
Previously, kwapik (Krzysztof Kwapisiewicz) wrote…
The same for controller. Rename this and put ControllOTELComponents inside.

The same response for the agent regarding putting ControllOTELComponents inside -- renamed them to ModuleForAgentOTEL, ModuleForControllerOTEL

cmd/aperture-agent/agent.go line 39 at r2 (raw file):
Previously, seunghyupoh3517 (Seunghyup Alex Oh) wrote…
Would it be unsafe to keep it separate call and explicitly have AgentOTELComponents exported as it is?

My bad -- made OTEL Components module into one single call :) THANKS!

pkg/otelcollector/metricsprocessor/config.go line 4 at r2 (raw file):
Previously, kwapik (Krzysztof Kwapisiewicz) wrote…
Functionally it is exactly the same. It is only about following a convention:
import (
    // Standard libraries

    // 3rd party non-standard libraries

    // local imports
)

Ahhh Got it! Thanks! It would be convenient if you have linter for this


Added Quine README.md

Added Quine to the Competitive Programming List. (https://quine.sh/ if yall want to try it out)

@AnishYakk Thanks for sharing.


Add classes to the API client

Closes #
📑 Description
This pull request implements a PHP library to consume the IpQuery API. The following features have been added:

A client class to handle API requests using cURL.
Support for all endpoints provided by the API:

GET /: Fetches the user's public IP data.
GET /[IPv4 address]: Retrieves data for a single IP address.
GET /[IPv4 addresses]: Fetches data for multiple IP addresses.

Query parameters for response format (e.g., JSON, XML, YAML, plain text).
JSON response mapping to strongly-typed PHP classes (IpResponse, Isp, Location, Risk).
Examples and usage documentation in the README.md.

✅ Checks

[x] My pull request adheres to the code style of this project
[x] My code requires changes to the documentation
[x] I have updated the documentation as required
[x] All the tests have passed

☢ Does this introduce a breaking change?

[ ] Yes
[x] No

ℹ Additional Information

Added a README.md with detailed usage examples.
Included response mapping classes for JSON format.
Dependencies: The library requires the PHP cURL extension.
Tests: Initial tests for the client class have been added and passed successfully.

Summary by Sourcery
Implement a PHP client library for the IpQuery API to enable querying IP data, including geolocation, ISP details, and risk analysis.
New Features:

Provide a PHP client class with support for all IpQuery API endpoints, including fetching user IP data, single IP data, and multiple IP data queries.
Support various response formats (JSON, XML, YAML, plain text) and map JSON responses to strongly-typed PHP classes.
Include usage examples and documentation in the README.

Tests:

Add initial tests for the client class.

Description by Korbit AI
What change is being made?
Add classes to the API client library to facilitate querying IP data from the IpQuery API, including the implementation of a client class, response parsing, usage examples, and tests.
Why are these changes being made?
These changes are introduced to create a PHP library for interacting with the IpQuery API, allowing users to retrieve public IP information, detailed data for specific IPs, and batch data queries in various formats. This functionality is important for applications that require IP-related data for features like geolocation and risk analysis. The changes also aim to provide a simple and efficient integration process for developers using PHP, enhancing the overall usability and documentation of the library.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@gstraccini create labels


Purge script for Linux agent is not a valid .sh file

Hi,  I attempted to carry out the instructions published at https://docs.microsoft.com/en-us/azure/azure-monitor/platform/agent-linux-troubleshoot#purge-and-re-install-the-linux-agent.  The purge_omsagent.sh file contains html rather than shell script.
Mike

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8de16fd2-54aa-1f46-0a42-d1540d937d03
Version Independent ID: 7a4964d7-8dc9-e838-4d81-914e9c31645b
Content: Troubleshoot Azure Log Analytics Linux Agent - Azure Monitor
Content Source: articles/azure-monitor/platform/agent-linux-troubleshoot.md
Service: azure-monitor
Sub-service: logs
GitHub Login: @bwren
Microsoft Alias: bwren

**update.
The wget command seems to be pulling down the actual github web page itself rather than the bash script.  Am I doing something wrong?

@mikeelliottuk Thank you for reaching out to us , we will review your query and get back to you at the earliest.

Looks like the published URL in the page is incorrect.  If I try to access the raw URL using https://raw.githubusercontent.com/microsoft/OMS-Agent-for-Linux/master/tools/purge_omsagent.sh then the file downloads successfully.

@mikeelliottuk I have executed the wget command in Azure CLI and in Linux environment and I was able to download without any issues. Kindly let me know in which tool were you facing this issue.
Reference snapshots
Linux:

Azure CLI

@mikeelliottuk Thanks for your feedback. I have updated the documentation and the changes will be live soon. We will close the issue for now. If there are further questions , please revert and we will be glad to assist you.


Bump stellar sdk

Preview is available here:http://laboratory-3337814.previews.kube001.services.stellar-ops.com/

Preview is available here:http://laboratory-d18e018.previews.kube001.services.stellar-ops.com/

Preview is available here:http://laboratory-b988eb6.previews.kube001.services.stellar-ops.com/

Preview is available here:http://laboratory-ef868bd.previews.kube001.services.stellar-ops.com/

Something went wrong with PR preview build please check

Preview is available here:http://laboratory-b5222da.previews.kube001.services.stellar-ops.com/

Preview is available here:http://laboratory-7ab1f4e.previews.kube001.services.stellar-ops.com/

Preview is available here:http://laboratory-b8caf3f.previews.kube001.services.stellar-ops.com/

I do not have a nano ledger. Can you test that one? @vcarl

Ah yeah I can, but I'll have to grab one out of the office.

@vcarl no rush -- I also did some tests with a nano (see results in the description of the PR) -- but I'd like an extra pair of eyes


Wrote a parsing method for LLH CSV

Hi,
I have written a method that will take a lat, long, height csv and generate the file. It is based on NEMA method but designed for the following CSV:
0.1,41.259519,174.813354,100
0.2,41.259519,174.813354,100
0.3,41.259519,174.813354,100
0.4,41.259519,174.813354,100
0.5,41.259519,174.813354,100
0.6,41.259519,174.813354,100
0.7,41.259519,174.813354,100
0.8,41.259519,174.813354,100
0.9,41.259519,174.813354,100
1,41.259519,174.813354,100

Time, Latitude, Longitude, Height
It would be great if you could include the following in the application:
int readLLH(double xyz[USER_MOTION_SIZE][3], const char *filename)
{

	FILE *fp;
	int numd = 0;
	char str[MAX_CHAR];
	char *token;
	double llh[3],pos[3];
	char tmp[8];

	if (NULL==(fp=fopen(filename,"rt")))
		return(-1);

	while (1)
	{
		if (fgets(str, MAX_CHAR, fp)==NULL)
			break;

		token = strtok(str, ","); //Take out leading time

		token = strtok(NULL, ","); // Latitude
		strncpy(tmp, token, 2);
		tmp[2] = 0;

		llh[0] = atof(tmp) + atof(token+2)/60.0;

		llh[0] /= R2D; // in radian

		token = strtok(NULL, ","); // Longitude
		strncpy(tmp, token, 3);
		tmp[3] = 0;

		llh[1] = atof(tmp) + atof(token+3)/60.0;

		llh[1] /= R2D; // in radian

		token = strtok(NULL, ","); // Altitude above mean sea level

		llh[2] = atof(token);

		// Convert geodetic position into ECEF coordinates
		llh2xyz(llh, pos);

		xyz[numd][0] = pos[0];
		xyz[numd][1] = pos[1];
		xyz[numd][2] = pos[2];

		// Update the number of track points
		numd++;

		if (numd>=USER_MOTION_SIZE)
			break;

	}

	fclose(fp);

	return (numd);
}

One thing I have noticed with a Lat of "41.259519" comes up correctly yet "-41.259519" is coming up a 3 deg North. Not sure where that is happening? Maybe the llh2xyz method?

Could you give me a bit more details on your "3 deg North" issue? When you convert the negative latitude into XYZ and then covert back to the geodetic coordinate, is the resulting latitude 3-deg higher than the original one? Or does your GPS receiver give you a wrong location (3-deg is a huge error!) when applying a negative latitude to gps-sdr-sim?

My GPS receiver is showing 3 deg north (i.e. north of the equator) when provide it with -41.259519.
I am not doing the converting, I am using the existing llh2xyz method which is in the code.

In your code, you only copy the first two characters from the latitude token. If you apply -41.259519 for the latitude, the temp string can contain only "-4", not "-41". By the way, you don't need to divide the fractional part of the latitude and longitude by 60.0 since they are already given in degree.

Thanks that will be it cheers. My C is a tad rusty.

I've had some trouble on getting a fix on some GPS receivers using LLH format in a CSV file.
When I put a value for height to 3 meter or 8 meter, one of the devices would not get a fix.
It would sometimes get a fix, but then lose it directly or no fix at all.
The height represents meter, but what's the reference or zero point? Is there a minimum height value for it work?


Restart Daemon Screen Hangs On Daemon Crashes During Bootup

@sproxet can you provide more details? I presume you mean the Connect to other nodes via Tor option?

@riordant This issue is related to the client failing to handle a daemon crash if it occurs during startup. The specific zcoind crash that was causing me issues here was already fixed, but the issue that the client can't gracefully handle a zcoind segfault during that period (as it can during others) remains.

related to #51  #52

@sproxet is this still an issue?


cross builds

https://github.com/lucor/fyne-cross
Will allow using docker for all desktop builds, including windows.

Good stuff!
Please post this in #128
Closing since it's a duplicated.


High CPU usage

Hello.
I was using go-langserver for a long time with Atom IDE. It was working fine.
Then one time I've upgraded to Go 1.10 (and now 1.10.1) and latest Atom/go-langserver and started to get system overloads, caused by go-langserver.
go-langserver: latest
OS: Ubuntu 16.04
Go:
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/elgatito/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/elgatito/go"
GORACE=""
GOROOT="/snap/go/1880"
GOTMPDIR=""
GOTOOLDIR="/snap/go/1880/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build879049061=/tmp/go-build -gno-record-gcc-switches"

Example when issue is starting:
15254 elgatito  20   0 2734880 2,145g   3868 S 151,9 37,5   3:07.01 /home/elgatito/go/bin/go-langserver -gocodecompletion
Usually it looks like this (when working fine):
19406 elgatito  20   0  204964  11712   9348 S   1,0  0,2   0:01.33 /home/elgatito/go/bin/go-langserver -gocodecompletion
It can happen any time, sometimes every few minutes, sometimes not seeing for an hour.
I have tried to run profile, but I don't see go-langserver listening the port.

Github misses OnHold state.
I've just updated to Go 1.10.2 and rebuilding all the packages I have in $GOPATH.
I have seen go-langserver from that time in process list, consuming CPU, but not 100% and without memory usage, will keep testing.

My happiness was too early.
Now again getting CPU issues.
I have completed $ go get -u -x ./.. in my project directory, to recompile for newer Go, and after that - i'm getting CPU issues.
How can I help to investigate it?

If I am not mistaken this will be solved by https://github.com/sourcegraph/go-langserver/issues/268 So will mark as duplicate
Duplicate of https://github.com/sourcegraph/go-langserver/issues/268

Have moved to a new device, new Ubuntu 18.04, clean system, clean Golang installation (still snap's one), 1.10.2. Same project and having CPU hangs again...
Maybe it's related to my project of something?


Update experimental test code one_sp_queue_traffic_test.go

I made some cosmetic changes

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 57.219%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1181

Relevant Lines:
2064

💛  - Coveralls


Modify getting next recurring event

Codecov Report

Merging #193 (e8673cb) into master (202a745) will increase coverage by 0.49%.
The diff coverage is 58.92%.

@@             Coverage Diff              @@
##             master     #193      +/-   ##
============================================
+ Coverage     65.68%   66.18%   +0.49%
- Complexity      667      673       +6
============================================
  Files           107      107
  Lines          2407     2410       +3
  Branches        325      325
============================================
+ Hits           1581     1595      +14
+ Misses          699      684      -15
- Partials        127      131       +4

Impacted Files
Coverage Δ

.../main/java/seedu/address/model/schedule/Event.java
50.71% <58.18%> (+9.10%)
:arrow_up:

...n/java/seedu/address/storage/JsonAdaptedEvent.java
96.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

LGTM!


Update Dockerfile

maven:latest now bases on OL7. changed to debian based base image.
removed java 8 installation - base image contains openjdk 11
removed JAVA_HOME env - this ENV is set up in base image
added mvn clean package command to build downloaded sources

+1 @arfunk
I wonder if you could insert some content to the README to detail usage with Docker?
@tteofili wdyt?

+1 @arfunk
I wonder if you could insert some content to the README to detail usage with Docker?
@tteofili wdyt?

So what kind of details?
Documentation about running Apache Joshua with Docker is here
If you need more information I can write a detailed tutorial how to build a working environment with docker and downloaded language pack.

thanks @arfunk , and +1 if you have time to write a full fledged tutorial that'd be great!


Imagemin-SVGO is throwing error in Gulp

What is the current behavior?
Imagemin-SVGO has been updated to 5.2.1 and now throws error breaking Gulp. More at https://github.com/imagemin/imagemin/issues/237
What is the expected or desired behavior?
Gulp commands previously were working fine.

Bug report

Please provide steps to reproduce, including full log output:
Install new Sage 8.x theme. Run npm install, bower install, then run any gulp command.
Please describe your local environment:
WordPress version: latest
OS: 10.11.6
NPM/Node version: 3.10.8
Where did the bug happen? Development or remote servers?
Dev
Is there a related Discourse thread or were any utilized (please link them)?
No

I couldn't upgrade Node so I edited package.json in the theme folder:
"gulp-imagemin": "^2.4.0",


UI: small bug with search button in Firefox

Name        : Portus
Version     :<PHONE_NUMBER>0209
Release     : 1.1
Architecture: x86_64
This package has been built with commit bf76034e1bcc13bcf3f6e1b38b0ab9da8b76f0a2 from branch master on date Tue, 27 Oct 2015 09:02:09 +0000
Distribution: Virtualization:containers:Portus / openSUSE_13.2
P.S.
No problems in other browsers (opera, google chrome)

I cannot reproduce this with firefox 41.0.1. So I guess that this only affects to Firefox 40 :/

Closing this. I cannot reproduce it, and we've also made some changes on this regard. If you have more problems on this, feel free to re-open.


Fixed #23759 -- Preserved all file extensions in Storage.get_available_name

https://code.djangoproject.com/ticket/23759

Hello! Thanks for your contribution. Please remember that when this work is ready for review, you need to adjust the ticket flags in the Trac system so this PR gets added to the "branches needing review" section of the Django Developer Dahsboard. More information in these docs.

@nessita Done, thanks!

@adamzap Thanks :+1:


Automate building steps with a PowerShellCore script

Since we moved to CMake Build System,  this requires typing a command line with a bunch of parameters to drive Debug or Release  builds.
Having a build script that can automate this process and provide a flexible way to extend and mix parameters would be useful.
One point that should be TBD is, in the post-build step we must copy/move some files and directories in Debug or Release dirs, the question is  :

Do we achieve that step in CMake-ish way or in PowerShell Core -ish way ??

Regarding the point of post-build operation, I've solved it in PR #95 #91 .


Fix Managed Upgrade Operator reconciler

Which issue this PR addresses:
Fixes TODO
What this PR does / why we need it:
On OCP 4.15, the MUO reconciler is running into an endless loop, constantly updating the trusted-ca-bundle ConfigMap.
Reason is that since OCP 4.15 the controller, which inserts the certificates into that ConfigMap, is also adding a new annotation: "openshift.io/owning-component": "Networking / cluster-network-operator".
So we need to copy that over to the new ConfigMap in case of updates.
Test plan for issue:
The issue was discovered by very flake MUO deletion test on OCP 4.15. With this change, the test succeeds.
Also the corresponding unit test was extended for the new annotation.
Is there any documentation that needs to be updated for this PR?
No, this just is a not user facing implementation detail.
How do you know this will function as expected in production?
Trusting the e2e test.

@microsoft-github-policy-service agree [company="Red Hat"]

@microsoft-github-policy-service agree company="Red Hat"

Manual CI run: https://msazure.visualstudio.com/AzureRedHatOpenShift/_build/results?buildId=98412498&view=results
Manual E2E run: https://msazure.visualstudio.com/AzureRedHatOpenShift/_build/results?buildId=98412429&view=results

I approve the change, but I wanted to figure out other way because dynamic helper is used in some functions, and would rather not add adhoc change in the function.


chore(SNP-1234): Rebranding

Changes:

add themed logo
remove surf gear
correct build badge url

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 44.00%. Comparing base (bd996fd) to head (ef8c6b1).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage   44.00%   44.00%
=======================================
  Files           4        4
  Lines          25       25
=======================================
  Hits           11       11
  Misses         14       14

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Hotfix for state overrides serialization

Signed-off-by: Sally MacFarlane<EMAIL_ADDRESS>PR description
Hotfix commit for #8024
Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

[ ] Checked out our contribution guidelines?
[ ] Considered documentation and added the doc-change-required label to this PR if updates are required.
[ ] Considered the changelog and included an update if required.
[ ] For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

[ ] unit tests: ./gradlew build
[ ] acceptance tests: ./gradlew acceptanceTest
[ ] integration tests: ./gradlew integrationTest
[ ] reference tests: ./gradlew ethereum:referenceTests:referenceTests

release is done, this merge is not needed


Add base testcase class

Test cases are a pain to debug in an interactive console, so this change will make it easier to deal with them in an interactive setting.

Can you explain the problem you're trying to solve with these changes?

@bboe debugging the test classes to find where specific error occurs. When an assertion fails it could be an error in the testcase, or an error in a helper function for a method, which was an error when trying to test #1144. This also makes it so you can run tests without the full suite, if you want to test just a specific component.

How are you running the tests? Pytest can run specific tests by filename, or even by test name.
Could you perhaps give me an example of what sort of output hides where the failure occurs? Perhaps there's a better way to address the issue you are experiencing.

@bboe let's say with #1144 I had a bunch of assert checks, where one assert was calling a function, and all i got was output saying "assertion failed, assert false" but it resolved to bound methods and not actual text

I think pytest would show you more information about the failure, but I could be wrong. Let's sit on this one for a bit.

I guess this isn't needed anymore.


dep ensure fails when working directory includes a symlink

When running dep ensure for the first time in the root of a project cloned from git, I get a cryptic response:
ensure Prepare: at least one package must be present in the PackageTree
This is with a fresh installation of Go (1.7.5) and dep. The project is in my GOPATH.
My manifest.json file is:
{
    "dependencies": {
        "github.com/golang/protobuf": {
            "branch": "master"
        },
        "golang.org/x/net": {
            "branch": "master"
        },
        "google.golang.org/grpc": {
            "branch": "master"
        }
    }
}

My lock.json file is:
{
    "memo": "76828034af0593d3bf68294321e87a2cb63417777e7693726d55d58c1a5ffe61",
    "projects": [
        {
            "name": "github.com/golang/protobuf",
            "branch": "master",
            "revision": "8ee79997227bf9b34611aee7946ae64735e6fd93",
            "packages": [
                "proto"
            ]
        },
        {
            "name": "golang.org/x/net",
            "branch": "master",
            "revision": "9773060888fba93b172cedcd70127db1ab739bd1",
            "packages": [
                "context",
                "http2",
                "http2/hpack",
                "trace"
            ]
        },
        {
            "name": "google.golang.org/grpc",
            "branch": "master",
            "revision": "708a7f9f3283aa2d4f6132d287d78683babe55c8",
            "packages": [
                "."
            ]
        }
    ]
}

Odd. Obvious question, but there's at least one directory with *.go files in it in that repo, right?
Is the project you're cloning public, so that I can attempt to replicate?

There's a couple of subdirectories that have *.go files within them. Unfortunately the repo isn't public, but it's also not especially sensitive. I've attached an archive of the repo that reproduces the bug.
dep-bug-208.tar.gz

Seems to work fine for me when I place it at $GOPATH/src/GoogleCloudPlatform/k8s-render-demo (which I inferred was the expected spot, based on the internal imports) and run dep ensure. Not sure what's going on.

Out of interest, what version of Go were you testing with?

That vm had 1.7.3, looks like

Curiously, removing the manifest.json and lock.json files and running
$ dep init
$ dep ensure -update

yields the same error

And the dir root is at $GOPATH/src/github.com/GoogleCloudPlatform/k8s-render-demo, right?

Yes
On Thu, Feb 9, 2017 at 5:46 AM sam boyer<EMAIL_ADDRESS>wrote:

And the dir root is at $GOPATH/src/
github.com/GoogleCloudPlatform/k8s-render-demo, right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/golang/dep/issues/218#issuecomment-278644363, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARzY3F3TzsF6koLO6BGVnVHBm4A_6yLks5raxiegaJpZM4L1YNe
.

Well, this is really odd. There's gotta be some bit of context/environment that I'm missing here, but I'm not sure what it is.
While I'm waiting for an idea to come to me, all I can really think to do is ask you to instrument the code a bit and report what you see. So, if you could insert a fmt.Println(p, params) (or, better, a pretty.Println(p, params), using github.com/kr/pretty) right before this line, then paste the output into here, that'd be helpful.

My working directory is $GOPATH/src/foo.com/bar/baz, where baz is a symlink pointing outside of the GOPATH, and I received this error. Swapping the symlink for an actual copy of the code made the error go away. I'm not sure if Go generally supports this symlinky setup, but I believe this is the first time I've run into problems with it.

Ah, it turns out I had the same issue, and avoiding the symlink fixed the problem.

If the case here is supporting the project root being a symlink to elsewhere, then I believe #247 should fix that.

fwiw, #247 doesn't support my situation where the symlink points outside $GOPATH

ughhh symlinks. Yeah, and #247 is stalled a bit right now.
We need a clear, comprehensive plan for this :/ While I've experienced versions of this pain myself plenty of times, I'm really wary about introducing too much symlink magickery without an understanding of the consequences.

I wrote up a first stab at a detailed plan for handling symlinks in #247. Should cover this case, I think, though I'm also pretty sure it's got some weak spots as-written.

@ajessup Now that we've merged in #247, I'm curious if your original setup works.
@viridicist did the place that #247 ended up cover your case? It should work if your cwd is within the GOPATH, even if the symlink points outside of it (as long as it doesn't point into a different GOPATH).

@sdboyer With cwd = <my gopath>/src/<my package path>, dep status says
resolve project root: '<my gopath>/src/<my package path>' is linked to another path within a GOPATH (<my gopath>)

So I suppose it resolves the symlink, decides I am not in my gopath, and then complains about my code being in my gopath.

@viridicist Hmm...that message should only be given if the root directory of the project is a symlink pointing either to another directory within the current GOPATH, OR a directory within a different GOPATH.
So it doesn't think you're outside your GOPATH - it's saying it won't work because both the tail and head of the symlink are inside a GOPATH.
Looking at my last reply, I think I wasn't clear about the intra-GOPATH links also being excluded. The fuller writeup of the mechanics we planned for is here: https://github.com/golang/dep/pull/247#issuecomment-284181879

@sdboyer It's not clear to me how it is coming to that conclusion. Either I really confused dep, or the other way around. 😉
Here is my attempt at reproducing this message:
export GOPATH=$PWD/mygopath
mkdir -p $GOPATH/src
mkdir mypkg
ln -s $PWD/mypkg $GOPATH/src
cd $GOPATH/src/mypkg
dep init
dep status

I believe that is almost verbatim the case 2 in the detailed writeup, but it fails with:
resolve project root: '<$PWD>/mygopath/src/mypkg' is linked to another path within a GOPATH (<$PWD>/mygopath)

Looking closer, I have a dep from over a week ago installed, let me revisit with current master.

@viridicist yeah, i thought you were describing case 2. maybe we have a bug 😄

So I believe the following should work from any starting point but it fails at dep init with "prepare solver: at least one package must be present in the PackageTree", which I guess is how I got here in the first place. Now I'm not sure if I'm running into what I was trying to reproduce or just using dep wrong, after all, sorry for the confusion.
export GOPATH=$PWD/mygopath
export PATH=$GOPATH/bin:$PATH

go get -u github.com/golang/dep/...

mkdir -p $GOPATH/src/github.com/viridicist
mkdir mypkg
cat > mypkg/foo.go <<END
package foo

import (
  _ "github.com/pkg/errors"
)

func main() {}
END
ln -s $PWD/mypkg $GOPATH/src/github.com/viridicist
cd $GOPATH/src/github.com/viridicist/mypkg
dep init
dep status

@viridicist unless i'm missing something, that really does seem like it's the case we intend to cover. do you maybe have time to review our tests for this, see what we're missing, and maybe put up a PR with a fix+improved tests? 🙏 😄

Just finally got around to re-testing (sorry for the delay). Unfortunately I'm also still seeing the same error prepare solver: at least one package must be present in the PackageTree

@ajessup no worries, good to get confirmation, thank you!

prepare solver: at least one package must be present in the PackageTree

It's super the wrong place to be getting the error, but this does suggest to me that what's probably happening is ListPackages() is being fed the symlink path, which ends up not being walked at all (because filepath.Walk()), so you end up with an empty package tree.
Forget what I was saying earlier about the test - it's likely right (I'd context switched out, and when I came back to this I forgot about the new error). The correct fix here is probably to transform the root symlink into the referent dir (assuming it passes our validation checks), while still preserving the inferred ProjectRoot.


add setting to open folders in a new window, fixes #371

I used the same logic used for the window.openFilesInNewWindow setting

This doesn't work correctly yet and unfortunately I run out of time to investigate. When I was running it
const windowConfig = this.configurationService.getConfiguration<IWindowSettings>('window');
was always null. I'm probably doing something wrong. If no one steps up I will at this again next weekend.

@elemongw added some feedback, I think your code is never really executed because openConfig.preferNewWindow is never true for folders. Please revisit your logic there.
Nevertheless, calling this.configurationService.getConfiguration<IWindowSettings>('window') returns something for me IF the setting is defined in settings.json. Otherwise you will get undefined because there are no settings. In that case you just have to pick a default (in this case the default is also a falsify value because by default folders open in the same window. So you will have to check for window being undefined and window.openFoldersInNewWindow be undefined or false.

@elemongw ping

Sorry I've been very busy, I'll try to work on this over the weekend.

No worries, was just wondering if you got my notifications 👍

I updated the patch. One question, is the intended behaviour for this.configurationService.getConfiguration('window') to only contain options explicitly set by the user in the configuration file or should it also contain the default values?

@bpasero ping

Thanks for the reminder, I am planning to do a full review of how windows open and when across all OS but I did not have time to do it yet. When I do I will also revisit this PR 👍

This landed in a slightly different form, please see https://github.com/Microsoft/vscode/issues/371
Thanks for this PR though, it made me rethink the whole way how files and folders open in VS Code 👍


Fixing the default height problem

What I am changing
Fixing the default height problem
How I did it
Main factor here is setting the map's parent's div's display to flex.
The default display:block  of the parent set's it values to based on children but since at initializing there is no contents/canvas/children for the parent this would be 0px when at 100%. While display:flex bypasses this.
Another common solution for web app is to set the height and width to 100vh and 100vw but this assumes that the map will cover the entire viewport/iframe/window which might not work for jupyter widgets.
How you can test it
Export a map using the following code:
import geopandas as gpd
from lonboard import viz
gdf = gpd.read_parquet(...) # any file would do
map = viz(gdf)
map.to_html("test.html")

Before:

After:

Let me know if you have other suggestions on how to test this!
Related Issues
Related to #247

Hmm I went to your branch and tried this...

But it still doesn't appear to fill the height

Sorry, I think I screwed up and made a mistake with my assumption and tests. Closing for now until I can figure out how to address it!


License checker

As a developer or one who deploys bp-agent I want  to know what licenses are included its dependencies.

A tool that could be easily added to our maven build seems to be
https://github.com/aposin/LicenseScout
It scans maven and npm dependencies
BTW, @domwoe and @etschelp, tomorrow I"m not in the office in the morning, here you after lunch


x/build: build sub-repos on darwin buildlets

I think this might just be a flag flip in the dashboard config package.
cc @bradfitz

Yes, perhaps.
But in general I don't touch the OS X stuff because I don't have access to the buildlets, so I'm always afraid of breaking them. @crawshaw, can you email me details? I also hear the OS X machines might be spinning right now, causing tests to fail and timeout.

@bradfitz details emailed
I believe the recent report of OS X spinning is the old darwin-amd64 and darwin-386 builders, which are not on the mac minis in ATL. Only darwin-amd64_10_10 is, and it looks fine.

Any progress here?

Confirmed that @adg is on it.


Support multiple property names in discriminator keyword

What version of Ajv you are you using?
8.6
What problem do you want to solve?
My schema depends on value of two fields, so I wanted to implement something like this:
{
    type: 'object',
    discriminator: { propertyName: ['a', 'b'] }
    required: ['a', 'b'],
    oneOf: [
       {
          properties: {
            a: { const: true }
            b: { const: 'b' }
            c: { type: 'string' }
          }
       },
       {
          properties: {
            a: { const: false }
            b: { const: 'bb' }
            c: { type: 'number' }
          }
       }
       ...
    ]
}

What do you think is the correct solution to problem?
Add ability to define multiple properties in discriminator
Will you be able to implement it?
I am not sure...

You can achieve it by nesting discriminators, or you can define a custom macro keyword to do it for you. discriminator is half-standard so changing it is probably wrong.

I tried nesting discriminator in the following schema:
{
    type: 'object',
    discriminator: { propertyName: 'a' },
    properties: { b: { type: 'string' } },
    required: ['a', 'b'],
    oneOf: [
       {
          properties: {
            a: { const: true }
            c: { type: 'string' }
          }
       }
       {
          properties: {
            a: { const: false }
            c: { type: 'nuber' }
          },
          discriminator: { propertyName: 'b' },
          oneOf: [
            {
              properties: {
                b: { const: 'b1' }
                d: { type: 'string' }
            },
            {
              properties: {
                b: { const: 'b2' }
                d: { type: 'number' }
            },
          ]
       }
    ]
}

but I am getting the error Error: discriminator: "a" values must be unique string. Seems that discriminator does not really work with boolean? Is this intended?

Yes, it only supports strings

Would you be open for a PR to support other values like numbers and boolean?

Yes - that should be doable I think - thank you!

So effectively any scalar value can be matched with discriminator and you can use the same approach as in select keyword to make them object keys, so true as string is not the same as true as Boolean. Also worth supporting null in this case.

(Select is defined in ajv-keywords for the reference)

I have seen select, but it's deprecated in favor of discriminator. So I will give it a shot next week to extend to other scalar values...

I only meant to use it to support discriminator improvement - not suggesting to use it instead. Let me know if you have any questions.

I am working on extending discriminator with other values then string. Can I use Map object or would it create compatibility issue with older browsers?

Here you go @epoberezkin https://github.com/ajv-validator/ajv/pull/1729. Let me know what do you think?


feat: deprecate div_le_div_of_le_of_nonneg

This was noticed in the discussion around #9393.

bors d=yaeldillies

Actually, @newell has a refactor touching these files. Are you happy with this PR going through, Newell?

Sorry about closing the PR and reopening it, my mouse had other ideas!

Okay, let's merge this for now.
maintainer merge

Sorry, meant
bors merge


Preserving/overlaying the original material on hover/selection

Hi there!
I'm using bevy_mod_picking to select entities within my tool; however, I'd like to preserve the existing material when an entity is hovered/selecting, and show a modified version of the material (for now, a coloured overlay over the original material would be sufficient - like selecting a word in text)
My understanding is that the highlight materials are global, which would make this somewhat difficult. Is there a way to do this / are there any plans to make this easier?
I'm working with textured plane meshes, so changing the material results in them losing their visual identity. Any suggestions would be appreciated!

The plugin stores a handle to the original material, and swaps in a modified version depending on the current hover/selection state. If I'm understanding your request, it sounds like the plugin is already doing what you want (preserving the original material).
Highlighting settings are global per asset type, but can be overridden per-entity.

Sorry, I realise that my initial issue was a little unclear! I have a plane with a texture, and when I hover over it, its material is entirely replaced with the highlight (which appears to be black - not sure what's going on there, but probably unrelated):

and if I select it, it's dark blue:

What I'd like is for the highlight material to be a variant of the initial material, so that you can still see it. In this case, I've just recoloured it blue, but I could see other overlays being viable (especially for the other states)

(apologies for the very haphazard edit)
The dream would be to have a outline, like Blender, but this will probably require a shader (perhaps https://github.com/YoshieraHuang/bevy_outline could work for this?)

If highlighting settings can be overridden per-entity, I should be able to generate recoloured variants of my materials and load them in for hover/selected/selected hover (a little wasteful, but totally fine for my application). Is that correct, and if so, how does the override work? I saw #103, but I wasn't sure if replicating that system was still the best way to do it today.

For your use case, the supplied highlighting system isn't going to work without some elbow grease. I'd recommend you roll your own, it's pretty straightforward. You can use the Highlight and Selection components to decide what to switch your material to, or use that information to toggle something like bevy_outline.


Change DocSysColumns.forTable signature

To avoid list & tuple allocations

Current coverage is 81.53% (diff: 100%)

Merging #4754 into master will decrease coverage by 0.03%

@@             master      #4754   diff @@
==========================================
  Files          1314       1314
  Lines         45081      45079     -2
  Methods           0          0
  Messages          0          0
  Branches       7062       7061     -1
==========================================
- Hits          36771      36755    -16
- Misses         5635       5637     +2
- Partials       2675       2687    +12

Powered by Codecov. Last update e02883a...73938f8


#34552 [CUBRID] Create and edit Serial using UI

Allow an alternative option for user to create and edit Serial (aka. Sequence) using UI.
Noted: Serial is supported from version 11.2 up.

We passed your PR to our QA team for testing

Hello @longhaseng52
I can see in the interface parameter called Last Value
I suppose it should be called START WITH according to the documentation https://www.cubrid.org/manual/en/10.0/sql/schema/serial_stmt.html

Hello @MashaKorax,
I have fixed an interface parameter called Last Value to Start With according to the documentation. Thank you.

verified


The 1.3.2 release does not have LICENSE file packaged

This affects bioconda package build process at https://github.com/bioconda/bioconda-recipes/pull/26729.
the 1.3.2 doe snot have it https://github.com/compomics/ThermoRawFileParser/releases/download/v1.3.2/ThermoRawFileParser.zip
the 1.2.3 has the LICENSE file https://github.com/compomics/ThermoRawFileParser/releases/download/v1.2.3/ThermoRawFileParser.zip

Hi @martenson, I will make a note to add it during the build. Not sure how and why it get lost. The next release should include the LICENSE.


Remove unnecessary "Failed parsing HTTP2" detail

"Failed parsing HTTP2" appears in some error messages unnecessarily. This PR removes such unnecessary details.
Original PR: #7318
Related issue: #7302

LGTM (content already reviewed)


Return Future::error rather than abandoning

See amphp/websocket#7

Whoops, thanks! Could you add psalm suppressions to get the build green?

Thanks!


Label doesn't go up on input focus

Description
Label doesn't go up on input focus
Repro Steps
http://codepen.io/ldesanto/pen/XRxLqM
Screenshots / Codepen

Please test the change of https://github.com/Dogfalo/materialize/pull/4709

@DanielRuf it works now, thanks!


Add parameter for the random number seed to the conlang command

A parameter was added to the namegen command for specifying the random number seed.
This should be added to the conlang command as well.

Can I try this one? Or someone is already doing?

@rbo13 go for it.


FindNameScope() returns null in Window.OnInitialized() override

If you override OnInitialized in a Window (and possibly other IControls) and call this.FindControl<T>(name) you will get an InvalidOperationException because there FindNameScope() returns null. Calling this.Find<T>(name) will just return null. Shouldn't everything be ready at this point?

It should be ready when InitializeComponent is called

@Kermalis I have the same problem,what can i do to fix it?

@Kermalis I have the same problem,what can i do to fix it?

I had use 'TemplateApplied' resolve this problem.

I'm seeing that this source generated line
UiHost = this.FindNameScope()?.Findglobal::Avalonia.ReactiveUI.RoutedViewHost("UiHost");
returns null in V11 rc1


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-27-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 4186

Questions ?
Please refer to the Backport tool documentation


Deprecation: played field

played is now hardcoded to 0, since we have the new played_casual, aral, etc. fields.
Everyone has a month now to use the new fields, and so in 2.9 we should remove this one.

This is awesome, I love that we are improving the API. But maybe in future cases to do this a little differently might be better.
For example, we could have left played as the sum of all games for this update and this way for any projects that are using played which is probably most that use player profiles. This gives projects the ability to have time to prepare to move with advance notice so that by 2.9 every project stays working and on 2.9 the played is removed and there was a 4-week advance notice to every team so there was enough time.
I woke up to a bunch of DMs asking why EZLBot was reporting total matches played as 0. I won't be able to access the server to fix this for a while, unfortunately, due to a family vacation.

Yeah, going forward it will work version by version.  So players that have patchVersion 2.9 (or whatever) would have the update, but older ones wont.