Filter enrollments/courses by organization code

Description
MA-OSPR-1499
Added ORGANIZATION_CODE flag in custom config files and logic to filter displayed courses and enrollments respectively.
This is the pull request for the Android version
Notes

The app is not dependant on this flag.
When trying to make rebase to make a single commit the pull request closed, making a new pull request with previous comments about nullable organizationCode, change queryDict to query and remove singleton from api calls and instead add organizationCode as param.

Reviewers
If you've been tagged for review, please check your corresponding box once you've given the 👍

[ ] Code review: @saeedbashir
[ ] Code review: @danialzahid94
[ ] Code review: @BenjiLee

Thanks for the pull request, @jagonzalr! I've created OSPR-1499 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.
Feel free to add as much of the following information to the ticket:

supporting documentation
edx-code email threads
timeline information ("this must be merged by XX date", and why that is)
partner information ("this is a course on edx.org")
any other information that can help Product understand the context for the PR

All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here.
If you like, you can add yourself to the AUTHORS      file for this repo, though that isn't required.     Please see the CONTRIBUTING     file for more information.

Current coverage is 23.10% (diff: 66.66%)

Merging #819 into master will increase coverage by <.01%

@@             master       #819   diff @@
==========================================
  Files           677        677
  Lines         56370      56378     +8
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits          13023      13025     +2
- Misses        43347      43353     +6
  Partials          0          0

Powered by Codecov. Last update a874624...9105f00

Hello @jagonzalr: We are unable to continue with review of your submission at this time. Please see the associated JIRA ticket for more explanation.

@saeedbashir made another pull request


[Discussion] equivalence of example .vimrc in Lua?

This is not a bug report.
I just want to discuss a bit about using dein in init.lua.
Problems summary
I could not find any instructions from the internet on how to use dein in init.lua.
Though, I found people asking for Lua apis.
I suppose posting my solution on dein's issue might help some people find theirs.
My solution
This is done by calling Vim functions from Lua.
In lua/dein.lua:
local set = vim.opt
local fn = vim.fn
local call = fn.call
local add = function(target) call(fn['dein#add'], { target }) end
local begin = function(target) call(fn['dein#begin'], { target }) end
local check_install = function() call(fn['dein#check_install'], {}) end
local install = function() call(fn['dein#install'], {}) end
local end_ = function() call(fn['dein#end'], {}) end

-- `path` would be `init.lua`'s parent directory.
-- That is, `~/.config/nvim`.
function activate_dein(path)
    -- Neovim is always "nocompatible".

    -- Required:
    -- Add the dein installation directory into runtimepath
    local dein_path = string.format("%s/dein", path) -- Replace with yours.
    set.runtimepath:append(dein_path)

    -- Required:
    local cache_path = string.format("%s/../../.local/share/dein", path) -- Replace with yours.
    begin(cache_path)

    -- Let dein manage dein
    add(dein_path)

    -- Add or remove your plugins here like this:
    -- add('Shougo/neosnippet.vim')
    -- add('Shougo/neosnippet-snippets')

    -- Required:
    end_()

    -- Syntax highlighting is enabled by default on Neovim.

    -- If you want to install not installed plugins on startup.
    -- if check_install() == 1 then install() end
end

And call this function in init.lua
-- `nvim/`
local path_here = debug.getinfo(1).source:match("@?(.*/)")

-- other stuff

require('dein')
activate_dein(path_here)

Please critisize 🙏. Otherwise, feel free to use it.

Sorry, I don't use Lua for the config.
Other people can discuss for it.

Thank you I've been looking for something like this I am new to vim and porting vimscript to lua has been a challenge. However I get this error when I run neovim :
Error detected while processing /home/niceiq/.config/nvim/init.lua: E5113: Error while calling lua chunk: Vim:E117: Unknown function: dein#begin stack traceback:         [C]: in function 'begin'         /home/niceiq/.config/nvim/lua/user/plugins.lua:21: in function 'activate_dein'         /home/niceiq/.config/nvim/init.lua:6: in main chunk
I probably didn't set up some paths right so it didn't recognise the function. Here is what my plugins.lua file look like :
local set = vim.opt
local fn = vim.fn
local add = fn['dein#add']
local begin = fn['dein#begin']
local check_install = fn['dein#check_install']
local install = fn['dein#install']
local end_ = fn['dein#end']

-- 'path' would be init.lua's parent directory.
-- That is, '~/.config/nvim'.
function activate_dein(path)
    -- Neovim is always "nocompatible".

    -- Required:
    -- Add the dein installation directory into runtimepath
    local dein_path = string.format("home/niceiq/.cache/dein/repos/github.com/Shougo/dein.vim", path) -- Replace with yours.
    set.runtimepath:append(dein_path)

    -- Required:
    local cache_path = string.format("/home/niceiq/.cache/dein", path) -- Replace with yours.
    begin(cache_path)

    -- Let dein manage dein
    add(dein_path)

    -- Add or remove your plugins here like this:
    -- add('Shougo/neosnippet.vim')
    -- add('Shougo/neosnippet-snippets')

    -- Required:
    end_()

    -- Syntax highlighting is enabled by default on Neovim.

    -- If you want to install not installed plugins on startup.
    if check_install() == 1 then install() end
end

    local dein_path = string.format("home/niceiq/.cache/dein/repos/github.com/Shougo/dein.vim", path) -- Replace with yours.

@coeusiq
I think you are missing the leading forward slash for the string literal and you did not use the function correctly.
string.format takes a string literal and replaces the %s and other place holders in it with the variables after the comma. The reason why I used it was because I wanted to concatenate path with /../../.local/share/dein and this was the solution I found.
I have since changed the code and used .. to concatenate string and did other simplifications.
What you want instead was probably something like:
    local dein_path = "/home/niceiq/.cache/dein/repos/github.com/Shougo/dein.vim"

However, this code will not work under another user's config, so I have a portable solution.
I will update the example above. Please have a look and see if it would be clearer.


m-frame show/hide based on Distance to player

What is your suggestion?
Currently when a scene is running many MML documents they will be via m-frames. So if the player is too far away from a specific m-frame it should automatically unload or hide the content. Once the player moves back to the valid distance the content should reappear.
Why is it important?
This will improve client side frame rate as content that isn't currently relevant to the player is hidden.
How would you implement it?
<m-frame distance="30"> or <m-frame dist="30"> where distance attribute is in meters from the player to center of the MML content. So visible within the 30 meters specified, invisible when the player is outside the 30 meter range.
Packages
No response
Extra details
No response

I've just raised a PR that adds this functionality. Would be great to get your feedback on it, @MetaZoneio!

Resolved by #155


Fixes to ui-slot-composer (event, content object)

Events were not mapping to Particles because Particle.id is no longer a simple String (requires casting before comparison).
ui-slot-composer was mutating the content object that a Particle produced, which was wrong on several levels.
ui-slot-composer was putting non-serializable particle object onto the render packet.
ui-slot-composer changes need matching updates in renderers/brokers. I've updated xen-renderer.

New slot-render-packet structure (formerly the outer fields were mixed into content):
{
  content <- the packet produced by the Particle, now unmodified
  containerSlotName,
  containerSlotId,
  outputSlotId,
  slotMap,
  modality,
  particle: {
    name,
    id
  }
}

Can confirm it worked on my machine as well! 👍


release-lib.nix: initialize pkgs for the currentSystem

Previously calling release-lib for only x86_64-darwin like:
  import ./release-lib.nix {
    supportedSystems = [ "x86_64-darwin" ];
  }

would still cause the packageSet to be evaluated for
x86_64-linux. This is annoying if you are evaluating this on
x86_64-darwin and your packageSet uses Import From Derivation to
produce a jobset. In that case you need to have a x86_64-linux build
machine configured in order to finish the evaluation.
This commit initializes pkgs for the currentSystem such that all IFD
derivations are build for the current system.
This shouldnt change anything for hydra.nixos.org since there
builtins.currentSystem == "x86-64-linux".

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
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 nix-review --run "nix-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.

Notify maintainers
cc @

Ideally @edolstra will take a look at this one.

You know you can use e.g. the following?
import ./release-lib.nix {
  supportedSystems = [ "x86_64-darwin" ];
  nixpkgsArgs = { system = "x86_64-darwin"; };
}

Along with whatever Nixpkgs config you want in nixpkgsArgs.
Generally I think we should avoid impurities like builtins.currentSystem, however, here it seems to make sense to me, as that function seems to be intended to be used when testing for the current system.

I've been eliminating the use of currentSystem because it doesn't work in pure evaluation mode (da5fc5c985a77c40bec34c027202132e46a0e81e, 7eb332af5d6e4ed76030f84d68bb62eaca7fdac2). Note that the nix command will default to pure mode in the future. So reintroducing currentSystem is not a good idea IMHO.

I've been eliminating the use of currentSystem because it doesn't work in pure evaluation mode (da5fc5c, 7eb332a). Note that the nix command will default to pure mode in the future. So reintroducing currentSystem is not a good idea IMHO.

builtins.currentSystem still seems like a better thing than hardcoding "x86_64-linux" everywhere. I think a compromise might be to add a "currentSystem" arg here that Nix could some day provide automatically. I think pure-eval mode can handle this?

@FRidh thanks for pointing out the work around of passing system via nixpkgsArgs.
That solves my problem and it doesn't introduce any impurities that @edolstra pointed out. So closing this.

@FRidh unfortunately I discovered today that the nixpkgsArgs = { system = "x86_64-darwin"; }; workaround doesn't work because it overrides the system argument passed to packageSet' thereby causing release-lib to only create jobs for x86_64-darwin.
@edolstra what about introducing an additional system argument to release-lib which defaults to builtins.currentSystem? That will solve the problem in the OP and allow users who use pure mode to override it to x86_64-linux.

Why does release-lib need pkgs at all? If it is just for my assertTrue then I am sure we can do something better`

@Ericson2314

Why does release-lib need pkgs at all?

pkgs is primarily used at call-sites of release-lib.
In nixpkgs itself there are plenty of examples. For example pkgs/top-level/release.nix brings pkgs into scope here and uses pkgs in lots of places.
At work I use the following for example:
      release-lib = import (pkgs.path + "/pkgs/top-level/release-lib.nix") {
        # Here it would be great if I could specify:
        #   system = builtins.currentSystem;
        # Such that `release-lib.pkgs` is always evaluated for the current system
        # which enables darwin users to evaluate this file
        # without them needing a x86_64-linux builder.
      };

      jobs = release-lib.mapTestOn
        (lib.mapAttrsRecursiveCond
          (as: !lib.isDerivation as)
          (_path: drv: release-lib.supportedMatches (drv.meta.platforms or supportedSystems))
          release-lib.pkgs);

@basvandijk if it is just used by consumers of release-lib.nix and not release-lib.nix itself, then let's definitely get rid of it. I agree the the underlying issue of getting rid of this Linux assumption is definitely still worth tackling, but at least it's not obfuscated with this change.

What's the status of this?


updating progress notes

Should we remove lines 7 and 8 now - "For a more comprehensive search of all of our collections, wellcomelibrary.org is still available. There you can search the library and archive catalogues for complete coverage of the collections and their data."

Could someone with a better understanding of the search work update the 'What are the limits?' section and add anything relevant to the 'improvements to search' section?

Could someone with a better understanding of the search work update the 'What are the limits?' section and add anything relevant to the 'improvements to search' section?

@jtweed who is the best person to ask?

Should we remove lines 7 and 8 now? - "For a more comprehensive search of all of our collections, wellcomelibrary.org is still available. There you can search the library and archive catalogues for complete coverage of the collections and their data."

I think we should leave them in for now, as we still don't have absolutely everything and we don't have requesting. Though I'd possibly change to:
"For the most comprehensive search of all of our collections, and to request access to physical items from the library, ..." or however it is we describe physical requesting elsewhere.


How to run mapreduce on slave? i.e. how to set .setSlaveOk()

Im trying Master/Slave replication for something. My goal is to use the slave only for mapreduce tasks, get the results inline and then store it into the master.
My full code is given below.
When i use master for both serverm and servers , then it works, but if u use mapreduce on the slave server in servers, i get following error :-
> [debug] mongo://slaveserver:27017: Connected
[debug] mongo://slaveserver:27017: Initialized as unknown
[debug] Finished scanning... primary? no
{ stack: [Getter/Setter], arguments: undefined, type: undefined, message: 'Could not connect to primary: ' }
[debug] mongo://slaveserver:27017: Disconnected

AFAIK mongo will allow you to run mapreduce on slave as long as the output is inline and setSlaveOk() is set. How do i set that using mongolian?
in the code below,  dbs does not have a method getMongo()
var mongofunctions = require('./mongofunctions'),
  conf = require('./config/conf'),
  helpers = require('./helpers'),
  Mongolian = require("mongolian"),
  serverm = new Mongolian("masterserver:27017"),
  servers = new Mongolian("slaveserver:27017"),
  dbm = serverm.db(conf.dbname),
  dbs = servers.db(conf.dbname),
  beacons = dbs.collection("beacons"),
  hourlystats = dbm.collection("hourlystats"),
  params = {};

var start = new Date((new Date()).getTime() - 1 * 60 * 60 * 1000 ); // 1 hour ago
start.setUTCSeconds(0);
start.setUTCMilliseconds(0);
start.setUTCMinutes(0);
var end = new Date(start.getTime() +  1 * 60 * 60 * 1000); // start plus an hour

params.timestamp = {
  "$gte": start,
  "$lt": end
};

beacons.mapReduce(
  mongofunctions.cronstatgenerator.map,
  mongofunctions.cronstatgenerator.reduce,
  {
    out: {inline:1},
    finalize: mongofunctions.cronstatgenerator.finalize,
    query: params
  }, function (error, result) {
    console.log(error);
    result.results.forEach(function(item){
      //console.log(item);
      hourlystats.save(item);
    });
    process.exit();
  }
)

Would like to add... that i can run this mapreduce with inline output on the slave using the mongo console directly without any issues.

Aha thanks... it turns out that my map-reduce job was taking hours to finish cause amazon throttles down micro instances big time, even when run from the mongo shell. So for now im doing my processing client side using python.


:sparkles: introducing aliases

Well, everything works fine for me
I just need from u, @ShuffleZZZ  @Shuffle45, to write messages here and here
BUT: it is not ready to be used in master, because we have to do #115 first to use database migrations

The following steps to do:

/clear command for all party aliases

beauty list printing (cropping to telegram message size)

#116 - one line fix

#115 - integral database migrations


introduce wasm light clients

Closes: #XXX
What is the purpose of the change
Introduces the ibc wasm light clients module as we discussed in the telegram chat. There are a few notable parts:

Although the ibc wasm light client module is capable of sharing the vm with x/wasm, we chose to go with a separate path in order to fully separate regular cosmwasm with light clients. See juno's recent post mortum for an example.
When you compare the reference implementation and the code here, you'll see that they assign the DataDir without the home prefix but this will be fixed with this PR.

Testing and Verifying
We had to change the parallel tests to run sequential since the wasm light client module is using a global store key. This will not be necessary once we upgrade to ibc v8/sdk 0.50.
Documentation and Release Note

[ ] Does this pull request introduce a new feature or user-facing behavior changes?
[ ] Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

[ ] Specification (x/{module}/README.md)
[ ] Osmosis documentation site
[ ] Code comments?
[ ] N/A

closing this PR in favour of #7637 to avoid CI from going crazy.


Cell-Interaction and ECN edits

Cell-Interaction Module: options are "Illustration" and "Network"
ECN Module: new legend, at the bottom of the network.

Looks good @heimannch . New ECN legend looks good. Minor , and if possible: can ECN legend be made a little larger.

Looks fine to me, @vthorsson would you merge when you are satisfied with the legend size?

@vthorsson, I updated the legend image, should be easier to read now.


Fix typos and markdown

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

@alu0100832211 someone merged another PR before yours and now there are merge conflicts. Could you please fix the merge conflicts?

Yes, give me a minute

@alu0100832211 I see the same thing. Not sure why it's grayed out. Can you try contacting github support?

Ok

Thank you for your contribution, but the guide has been moved here https://github.com/freeCodeCamp/freeCodeCamp/tree/master/guide and this cannot be merged. If you create a new PR targeting the new location we will do our best to get it merged.


Error Logging In

Having trouble logging in after a sandbox refresh. (Eclipse WSDL plugin still works). I have been using this plugin for over a year with no issues so not sure what I can do to fix
Using version 1.1.0 we take the following steps to get this error

Netsuite Tools > Setup Project
Enter email, password & select Sandbox
Select account from the Account Selection screen
Error Logging In pops up immediately but still lets me see the File Cabinet window when I close the error

Password has not changed nor has my email and all other WSDL based plugins to Netsuite work

Someone had this issue the other day with logging in and it eventually went away. There's gotta be something that happens on sandbox refresh that isn't playing nicely. I would give it a few and retry. The file cabinet screen popping up is because I don't bail if there's an error (which I should be doing).

Do you hard-set the ROLE ID on the Account Selection screen to Administrator = 3. Reason I ask is that my default role is Dev Ops Manager, a custom role, not netsuite's native Administrator so that could explain the login error Im getting

Nevermind, I answered my own question: I see on NSRolesRestServiceController.java on line 14 that there are some hardcoded properties


Exclude single date, all date of a day

Hi,
Is it possible to exclude a specific date or range of dates of a specific day? e.g. National holidays, Sundays etc.
Thanks

There is a method to limit the options to a specific set of days, but no method to exclude a set.
What you can do is extend DatePickerDialog and override ìsOutOfRange` with the logic you need.


Jest fails on second test file to reach require("ffi")

🐛 Bug Report
Jest fails when a second test file requires (directly or indirectly) the ffi module. This happens when jest is executed without the --no-cache flag. It happens with and without the --no-cache flag when running with --runInBand.
To Reproduce
Run jest, jest --runInBand or jest --runInBand --no-cache with the following two test files.
Note: When using jest the first execution will success, subsequent ones will fail.
const ffi = require("ffi");
it("m1", () => {});

const ffi = require("ffi");
it("m2", () => {});

$ jest
 PASS  ./m1_tests.js
 FAIL  ./m2_tests.js
  ● Test suite failed to run

    RangeError: Maximum call stack size exceeded

      at debug (node_modules/debug/src/debug.js:1:1)

Test Suites: 1 failed, 1 passed, 2 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        2.743s

The real world test case provided a bit more context that might be helpful. I am not sure why it did not
show up in the reduced example.
 FAIL  test\integration\integration_tests.js
  ● Test suite failed to run
    RangeError: Maximum call stack size exceeded

      at debug (node_modules/debug/src/debug.js:65:17)
      at Object.writePointer [as _writePointer] (node_modules/ref/lib/ref.js:746:3)
      at Object.writePointer [as _writePointer] (node_modules/ref/lib/ref.js:747:11)
      at Object.writePointer [as _writePointer] (node_modules/ref/lib/ref.js:747:11)
      ...
      at Object.writePointer [as _writePointer] (node_modules/ref/lib/ref.js:747:11)
Test Suites: 2 failed, 2 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        24.99s
Ran all test suites matching "integration".

Ref: https://ci.appveyor.com/project/havardh/workflow/build/1.0.371#L147
Expected behavior
Passing tests as jest --no-cache provides.
$ jest --no-cache
 PASS  ./m1_tests.js
 PASS  ./m2_tests.js

Test Suites: 2 passed, 2 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        3.332s
Ran all test suites.
Done in 4.41s.

Link to repo
https://github.com/havardh/jest-require-ffi
Envinfo
$ npx envinfo --preset jest
  System:
    OS: Windows 10
    CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD

This is a known bug, which we don't have a fix for yet, see: https://github.com/facebook/jest/issues/3552. Any help on the topic appreciated.
Closing as a duplicate (feel free to add your case to linked issue).


Make an NSError error code for "account over limit"

We should figure out how to recognize resource loading failures which are caused by a mapbox.com hosting account going over its limit, and we should have an NSError error code specifically for that situation.
I've never actually seen what happens on an over limit account, so I have no idea what the current code would do in that situation. I'm guessing the results would be mysterious and frustrating.

@incanus Can this issue be closed now that v3 support was removed for the 0.7.0 release?

Hmm, I think 404 still applies to v4 API. What I said above was in case this changed with v4, which it hasn't.


New version: JetBrains.FleetLauncher.Preview version 1.35.115

Created by 🥟 Dumplings in workflow run #5328.
Logs
Updated: 1.35.110 → 1.35.115
Submitting WinGet manifests

Microsoft Reviewers: Open in CodeFlow

Automatic Validation ended with:

Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Packages\JetBrains.FleetLauncher.Preview__DefaultSource\fleet.exe returned exit code: 1
Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Links\fleet.exe returned exit code: 1

(Automated response - build 881.)


First party plugins are not passing analysis in travis

Steps to Reproduce
From: https://travis-ci.org/flutter/plugins/jobs/352879739
Checking project cloud_firestore...
  info - 'ZERO' is deprecated and shouldn't be used at test/cloud_firestore_test.dart:196:49 - (deprecated_member_use)
  info - 'ZERO' is deprecated and shouldn't be used at test/cloud_firestore_test.dart:221:49 - (deprecated_member_use)
  info - 'ZERO' is deprecated and shouldn't be used at test/cloud_firestore_test.dart:251:49 - (deprecated_member_use)
  info - 'ZERO' is deprecated and shouldn't be used at test/cloud_firestore_test.dart:281:49 - (deprecated_member_use)
  info - 'ZERO' is deprecated and shouldn't be used at test/cloud_firestore_test.dart:314:49 - (deprecated_member_use)
5 issues found; analyzed 15 source files in 5.8s.

Checking project google_sign_in...
  info - 'JSON' is deprecated and shouldn't be used at example/lib/main.dart:6:28 - (deprecated_member_use)
  info - 'JSON' is deprecated and shouldn't be used at example/lib/main.dart:68:39 - (deprecated_member_use)
2 issues found; analyzed 8 source files in 6.4s.

The following packages have analyzer errors (see above):
 * cloud_firestore
 * google_sign_in

cc @mravn-google

Fixed in https://github.com/flutter/plugins/pull/420


Document other internal representations of Java programs

[ ] decide on the format of the documentation
[ ] provide the documentation in this repo

Content

[ ] Document how these representations can be mapped to EO

Closing as obsolete.


How to use value for std::experimental::optional type?

I am trying to parse the json value for a field if it exists and set it to std::experimental::nullopt if it does not.
#include "json.hpp"
#include <experimental/optional>

namespace nlohmann {
    template <typename T>
    struct adl_serializer<std::experimental::optional<T>> {
        static void to_json(json& j, const std::experimental::optional<T>& opt) {
            if (opt == std::experimental::nullopt) {
                j = nullptr;
            } else {
                j = *opt;
            }
        }

        static void from_json(const json& j, std::experimental::optional<T>& opt) {
            if (j.is_null()) {
                opt = std::experimental::nullopt;
            } else {
                opt = j.get<T>();
            }
        }
    };
}

namespace my_project {
struct Person {
    std::string id;
    std::string name;
    std::experimental::optional<std::string> company;
};

    void to_json(json& j, const Person& p) {
        j = json {
            {"id", p.id},
            {"name", p.name},
            {"company", p.company}
        };
    }

    void from_json(const json& j, Person& p) {
        p.id = j.at("id").get<std::string>();
        p.name = j.at("name").get<std::string>();

        // This works

        try {
            p.company = j.at("company").get<std::experimental::optional<std::string>>();
        } catch(std::exception) {
            p.company = std::experimental::nullopt;
        }

        // This does not work, but it would be nice to have it instead if using try/catch for multiple fields.

        p.company = j.value("company", std::experimental::nullopt);
    }
}

I advise you to take a look at #278, don't hesitate to provide feedbacks about the proposed behaviours :)

@dianambb Did you have the chance to check the issue mentioned in https://github.com/nlohmann/json/issues/760#issuecomment-333364714?

💤 I closed this issue due to inactivity. Please feel free to add a comment and I shall reopen it.


useQuery -> subscribeToMore

Closes #14. I've tested it and it works
Usage:
useEffect(() => query.subscribeToMore({ ... }), [])

subscribeToMore wasn't forwarded by purpose.  It's easy to make a mistake mixing with it with hooks. Please look at the discussion in https://github.com/trojanowski/react-apollo-hooks/pull/35. You can use useSubscription hook with the onSubscriptionData callback instead: https://github.com/trojanowski/react-apollo-hooks#usesubscription. Please let me know if you have any use case of subscribeToMore which is not possible to solve with useSubscription.

@trojanowski useSubscription looks good. Having subscribeToMore co-located on the query as well also does makes sense, as fetchMore is already there. Plus it's used in the Apollo documentation.
Side-note, useSubscription doesn't provide any way to unsubscribe

@trojanowski Now thinking about it, subscribeToMore is required. Hooks aren't conditional and always have to be called, meaning I can't delay the subscription.
Example:
function component() {
  const query = useQuery(...)

  // Can't accomplish this with useSubscription
  return <button onClick={() => query.subscribeToMore(...)}></button>
}

Side-note, useSubscription doesn't provide any way to unsubscribe

It's automatically unsubscribed when a component is unmounted. Or do you mean conditional subscriptions? For that I'm going to add skip option to it. Example usage:
useSubscription(MY_SUBSCRIPTION, {
  // if `skip` is equal to `true` the subscription will be skipped
  skip: shouldSkip,
});

@trojanowski Now thinking about it, subscribeToMore is required. Hooks aren't conditional and always have to be called, meaning I can't delay the subscription.

skip option could be used for that. Your modified example:
function Component() {
  const query = useQuery(...)
  const [shouldSubscribe, setShouldSubscribe] = useState(false);
  useSubscription(MY_SUBSCRIPTION, {
    skip: !shouldSubscribe,
  });
  return <button onClick={() => setShouldSubscribe(true)}></button>
}

Please notice that in your example you don't unsubscribe - is it by purpose? If so you can always use useApolloClient and client.subscribe. If not - that's one of the errors I'm trying to prevent by not forwarding subscribeToMore.

@trojanowski skip option would also work albeit a bit messy, but it still wouldn't allow for dynamically created subscriptions:
function component() {
  cons[(clicks, setClicks)] = useState(0)
  const query = useQuery()

  // Each time the button is pressed, it creates a new subscription.
  return (
    <button
      onClick={() => {
        setClicks(clicks + 1)
        query.subscribeToMore({ variables: { clicks } })
      }}
    />
  )
}

Please notice that in your example you don't unsubscribe - is it by purpose?

To highlight the above, but it'd make sense for subscribeToMore to automatically unsubscribe when the component unmounts

@samdenty I thought about your use case, and I think it could be solved that way:
import range from 'lodash/range';

function MyComponent() {
  const [clicks, setClicks] = useState(0)
  const query = useQuery()

  return (
    <>
      {range(clicks).map(clickId => (<Subscriber clickId={clickId} />))}
      <button
        onClick={() => {
          setClicks(clicks + 1)
          query.subscribeToMore({ variables: { clicks } })
        }}
      />
    </>
  )
}

function Subscriber({ clickId }) {
  useSubscription(MY_SUBSCRIPTION, { variables: { clicks: clickId }, });
  return null;
}

Please let me know if it works for you.

@samdenty I'm going to close this PR right know. Please let me know if the solution from my previous comment doesn't work for you or if you have other use cases for subscribeToMore which are not possible to solve with useSubscription.

@trojanowski  how can I do that with useSubscription and useQuery:
    subscribeToMore({
      document: newMessageSubscription,
      updateQuery: (prev, { subscriptionData }) => {
        if (!subscriptionData) {
          return prev;
        }

       // Perform updates on previousResult with subscriptionData
        return {
          ...prev,
          messages: [...prev.messages, subscriptionData.newMessage],
        };
      },
    });

https://www.apollographql.com/docs/react/api/react-apollo#graphql-query-data-subscribeToMore


interface is not exist

my goal: pod should have two ip, one is k8s internal ip, another one is physical network ip, which can connect to outside network.
i understand i need use host-local type.
so after install multus cni plugin, then i configure networkattachmentdefinition cr like following:
[root@d0404 cluster_configuration]# cat nad-cr.yaml
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-conf
spec:
config: '{
"cniVersion": "0.3.1",
"type": "host-local",
"master": "bond0.1103",
"mode": "bridge",
"ipam": {
"type": "host-local",
"subnet": "<IP_ADDRESS>/24",
"rangeStart": "<IP_ADDRESS>",
"rangeEnd": "<IP_ADDRESS>",
"gateway": "<IP_ADDRESS>"
}
}'
and kubectl describe pod, finding interface already add
Normal  Scheduled         default-scheduler  Successfully assigned default/samplepod to d0506
Normal  AddedInterface  1s         multus             Add eth0 [<IP_ADDRESS>/32]
Normal  AddedInterface  1s         multus             Add net1 [<IP_ADDRESS>/24] from default/macvlan-conf
Normal  Pulling         1s         kubelet, d0506     Pulling image "alpine"
Normal  Pulled          1s         kubelet, d0506     Successfully pulled image "alpine"
Normal  Created         1s         kubelet, d0506     Created container samplepod
Normal  Started         1s         kubelet, d0506     Started container samplepod
but the interface or ip doesn't exist in pod
[root@d0404 cluster_configuration]# kubectl exec -it samplepod -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet <IP_ADDRESS>/8 scope host lo
valid_lft forever preferred_lft forever
2: tunl0@NONE:  mtu 1480 qdisc noop state DOWN qlen 1000
link/ipip <IP_ADDRESS> brd <IP_ADDRESS>
4: eth0@if171: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
link/ether 7e:ec:d8:84:4e:d8 brd ff:ff:ff:ff:ff:ff
inet <IP_ADDRESS>/32 scope global eth0
valid_lft forever preferred_lft forever

Do you mind enabling logging and then showing us the results? Thanks!
Logging parameters here @ https://github.com/intel/multus-cni/blob/master/doc/configuration.md#logging -- place these in the /etc/cni/net.d/00-multus.conf on each node


Add Confirm before Deleting Service

Is your feature request related to a problem? Please describe.
When right-clicking on a Service one of the options is Delete Service, it's too easy to mistakenly Delete the service (when intending to Disable it) and it's consequential because re-adding the service you need do the whole login/setup from fresh.
Describe the solution you'd like
Add a Confirm dialog popup when clicking Delete Service.

This has been already implemented in #1328


Meta is excessively patched because object is typically never fully equal

Usually, the meta on the Fody model will be a subset of all meta being returned by the server.  For example, my application is only interested in the created/updated timestamps while the server may return the users that performed the action as well.  That causes issues in complex meta structures, since the current implementation only checks the equality of the 1st level property in meta.  In this instance, the full contents of the "system" property are not equal and therefore will always be patched.  In reality, the meta properties in the Fody class have not been changed, so the patch should not be sent.
// Contents of the Meta property
// Response from JsonApi
{
  "system": {
    "createdBy": "91773e2b-f121-435d-b3bf-be26cb3c9503",
    "createdAt": "2018-02-12T15:29:18.6158073Z",
    "updatedBy": "91773e2b-f121-435d-b3bf-be26cb3c9503",
    "updatedAt": "2018-02-12T16:01:56.8293298Z",
    "eTag": "\"0b0099b9-0000-0000-0000-5a81ba740000\""
  }
}
// Patch request produced by Argo
{
  "system": {
    "createdAt": "2018-02-12T15:29:18.6158073Z",
    "updatedAt": "2018-02-12T16:01:56.8293298Z",
    "eTag": "\"0b0099b9-0000-0000-0000-5a81ba740000\""
  }
}

This issue started in #91 where we switched from tracking setters using Fody to doing diffs using JSON.  That was a positive change overall and leads to a smaller patch body in the end since the consumer does not have to reset every complex property just to get one of them to update.  At the time, I didn't want to commit to making a complex JSON diff tool and none of the existing libraries were particularly attractive, so the current implementation is very coarse-grained and somewhat inefficient.  Optimally, we would either use a library like jsondiffpatch or roll our own simple, targeted solution to build the patch.
https://github.com/redarrowlabs/Argo/blob/5b2e19dca9d6ee9b062337052bc0740544f8dea9/src/RedArrow.Argo.Client/Session/Session.cs#L647


[TE] frontend = aaronucsd/removed error default state

I wonder if this is actually the root-cause :-) It seems like the RCA controller should catch error by itself and fix it.

@apucher Yeah, my error catch all for any  route that does not handle it itself. So the fix really is why it broke and gracefull add code to handle the error. But you said the catch-all return home` link was preventing so i can remove for now. But this is meant to catch any error that bubbled all the why up.

I don't have much context yet until i research into it more..Maybe leave the error substate for now?

yes. i'd leave this in for now and instead add some "message-and-reset-to-blank" error-handling in the rootcause route

Closed this PR due to 6 months inactivity. Reopen if needed.


Fix Ubuntu .pptx template unzipping

Unzipping of our template .pptx with 7z fails on ubuntu. It succeeds on Windows, and internally succeeded on RHEL8.
We need to figure out how to fix this.
This seems to be an issue with the committed .pptx file somehow, because we can zip and unzip folders on ubuntu.
ERROR:
Unexpected end of input stream
zipping/unzipping: Error During Test at /home/runner/work/PPTX.jl/PPTX.jl/test/testWriting.jl:24
  Got exception outside of a @test
  failed process: Process(setenv(`/opt/hostedtoolcache/julia/1.6.7/x64/libexec/7z x no-slides-cp.pptx -ono-slides-cp`,

Switched to using unzipped .pptx directories as default template. That fixed it.


How to use explore V2?

Make sure these boxes are checked before submitting your issue - thank you!

[yes ] I have checked the superset logs for python stacktraces and included it here as text if any
[yes ] I have reproduced the issue with at least the latest released version of superset
[yes ] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version
0.13.0
Expected results
I want to use explore V2 to view slice.
Actual results
Only get the explore V1
Steps to reproduce

hi @ganshanshan! i'm glad you are eager to use explore v2. we are still in development, but very close to a release!

@ascott Thank you very much for your hard work.
You know that there are no so much chart types in explore V1,for example line&bar chart(time series and not time series),multiple chart,horizontal bar chart .And my team develop these charts which are not in explore V1.
I have two questions:

Can I contribute our code to superset?If okay,how to do it?
In the future,the explore V1 will be give up,and if I submit the code ,it can only work in V1,not work in V2?

Looking forward to your reply.

I see lots of discussion on Explore V2, but I've just upgraded to Superset 0.17.0, expecting shiny shiny things, but nothings changed.
Is there yet a way to use Explore V2 on the PyPI release, or will I have to clone and build from source.

Notice: this issue has been closed because it has been inactive for 411 days. Feel free to comment and request for this issue to be reopened.


Invoke-DbaLogShipping SQL Server 2005 bugs

Bug Report

General Troubleshooting steps

[x] Verified running latest release of dbatools?
[x] Verified errors are not related to permissions?
[x] Can duplicate in new/fresh PowerShell.exe session?

Version Information

Operating System (Name|Version): 2012R2
PowerShell Version: 5.0
SQL Server (Edition|Version): SQL Server 2005 (sorry)

Steps to Reproduce

[ ] Attach any screenshots (if possible/allowed)
[ ] Attach logs generated by dbatools (Get-DbatoolsLog)
[ ] Attach output from PowerShell console (if possible/allowed)

Feature Request

Problem to solve
Not sure if this is a SQL Server 2005 issue or a new configuration issue.  But in the 4 internal scripts New-DbaLogShippingPrimaryDatabase, New-DbaLogShippingPrimarySecondary, New-DbaLogShippingSecondaryDatabase, New-DbaLogShippingSecondaryPrimary, there is a sql parameter @overwrite = 1.  I was getting an error on this option when setting up a new Log Shipping on SQL 2005.
Second issue with SQL 2005, was in New-DbaLogShippingPrimaryDatabase, there is a call to sp_add_log_shipping_primary_database with @backup_compression.  That didn't exist in 2005, so that was throwing an error even when set to 0.
Additional information

Thanks fr reporting this. I have noted it to sander


[HDInsight] Support node reboot features

Swagger PR is https://github.com/Azure/azure-rest-api-specs/pull/9733

Support to list hosts of the cluster
Support to restart the specific hosts of the cluster

LGTM

Thanks


Address #2220 (slow download perf against PyPi mirror)

Summary
Addressing the extremely slow performance detailed in https://github.com/astral-sh/uv/issues/2220. There are two changes to increase download performance:

setting accept-encoding: identity, in the spirit of https://github.com/pypa/pip/pull/1688
increasing buffer from 8KiB to 128KiB.

1. accept-encoding: identity
I think this related pip PR has a good explanation of what's going on: https://github.com/pypa/pip/pull/1688
  # We use Accept-Encoding: identity here because requests
  # defaults to accepting compressed responses. This breaks in
  # a variety of ways depending on how the server is configured.
  # - Some servers will notice that the file isn't a compressible
  #   file and will leave the file alone and with an empty
  #   Content-Encoding
  # - Some servers will notice that the file is already
  #   compressed and will leave the file alone and will add a
  #   Content-Encoding: gzip header
  # - Some servers won't notice anything at all and will take
  #   a file that's already been compressed and compress it again
  #   and set the Content-Encoding: gzip header

The files.pythonhosted.org server is the 1st kind. Example debug log I added in uv when installing against PyPI:

(there is no content-encoding header in this response, the whl hasn't been compressed, and there is a content-length header)
Our internal mirror is the third case. It does seem sensible that our mirror should be modified to act like the 1st kind. But uv should handle all three cases like pip does.
2. buffer increase
In https://github.com/astral-sh/uv/issues/2220 I observed that pip's downloading was causing up-to 128KiB flushes in our mirror.
After fix 1, uv was still only causing up-to 8KiB flushes, and was slower to download than pip. Increasing this buffer from the default 8KiB led to a download performance improvement against our mirror and the expected observed 128KiB flushes.
Test Plan
Ran benchmarking as instructed by @charliermarsh

No performance improvement or regression.

Thanks! I read through the linked pip PR. This makes sense to me.

Thank you!


New Koboldcpp provider

I made a Koboldcpp experimental provider: https://github.com/synw/wingman/blob/main/src/providers/koboldcpp.ts. I did it to be able to run inference from my 8Go RAM phone from Wingman queries using small models (Koboldcpp is the only thing that runs on my phone)
It would be nice to be able to switch provider depending on your prompt commands. I have different local servers running different backends: Goinfer on Linux, Koboldcpp on Android. I would like to be able to submit a query to one or another depending on the prompt. If the command could specify the provider it would be nice
By the way what's the plan for this extension: do you want to develop it further and maintain it, or not really? I am wondering because I am suggesting many changes and improvements, but they might not fit in your plan

Just an update: this refactor is well on its way. Here's some screenshots of the somewhat rough implementation of the third panel which is primarily used for configuring provider, completion params, and other relevant things like template format and API URL:

Nice: a way to select the provider was missing (I just set a provider as default in my branch to test my new ones). The question of the prompt templates is also crucial if you want to have a chance to get decent results from a model or another, good that we can have support for this.
In my branch I added some default template and a default context size settings because I really need these features, but I am going to remove them and prepare a PR that can merge in the actual code. As we are discussing about refactoring and improvements, I add a list of the most important features I would like to have to use a local model:

Model config: the context window size support is important: this way we can tokenize the prompt and calculate the number of tokens to predict (and remove the hardcoded 1000 number) and send this to the api ( #17 ). I will provide an utility to do this in my branch: input the prompt and the context window size and get the number of tokens to predict
Prompt templating support: I see that this is on the way, excellent. We should have the ability to add custom templates, for example when using exotic models that require a specific format
Server config : ability to associate a server config to a prompt. A server config would be an url+a provider. This way the prompts could be dispatched on different servers and models. For example I could have a server running Code Llama Python for the Python prompts, and another for more general code or whatever

Here is the PR #22 : please review the code. It will be usable when we will have this setting to select the default provider that you are working on

Looking at the PR now.

Model config: the context window size support is important: this way we can tokenize the prompt and calculate the number of tokens to predict (and remove the hardcoded 1000 number) and send this to the api ( https://github.com/nvms/wingman/issues/17 ). I will provide an utility to do this in my branch: input the prompt and the context window size and get the number of tokens to predict

I agree this is very useful, but: how will we infer which tokenizer we need to use at runtime? AFAIK js-tiktoken works fine for estimating token count for ChatGPT, but is not accurate for llama models, which is where llama-tokenizer-js comes in. Do we need to allow the user to choose a tokenizer in the UI? Maybe the Provider interface should include something like a tokenizePrompt(prompt: string): number method, forcing a provider implementation to specify a tokenizer? This is something I have not given much thought, but I'm leaning towards the second idea.

Prompt templating support: I see that this is on the way, excellent. We should have the ability to add custom templates, for example when using exotic models that require a specific format

I agree. This is in progress, but not yet functional. I wanted to get your feedback on this approach I'm trying.
  "ChatML": {
    system: "<|im_start|>system\n{system_message}<|im_end|>",
    user: "<|im_start|>user\n{user_message}<|im_end|>\n<|im_start|>assistant\n",
    first: "{system}\n{user}",
    stops: ["<|im_end|>"],
  },
  "Llama 2": {
    system: "<<SYS>>\n{system_message}\n<</SYS>>",
    user: "<s>[INST] {user_message} [/INST]",
    first: "<s>[INST] {system}\n\n{user_message} [/INST]",
    stops: ["</s>"],
  },

The above probably makes sense to you, but I will explain my thinking anyways. Tell me if I'm wrong or this is a bad approach.

Often times the first part of the conversation is different enough than all subsequent messages that it makes sense to have a specific format for just the first message, which almost certainly includes the system message and user message. So in the case of the ChatML example above, with the way the first message is defined as {system}\n{user}:

{system} is replaced with ChatML.system and {user} is replaced with ChatML.user.
All subsequent messages are just formatted with ChatML.user, with conversation history prepended to it (as is handled by most of the provider implementations right now).

I think the usefulness of this type of format configuration becomes apparent when examining the llama 2 format, most specifically.

Koboldcpp (and maybe others I'm not aware of) supports a stop_sequence: string[], which is the purpose of stops.

This approach is easy to extend by a user (it's just JSON), and I can populate the UI with whatever additional formats the user defines.

Do we need to allow the user to choose a tokenizer in the UI?
Tokenization approach really depends more on the model being used than the provider,

Yes it depends on the model family. We could have a mixed approach like defining default tokenizers for each providers, and have a tokenizer fallback setting and command param to let the user choose in case needed. For the local model providers the Llama tokenizer would be fine for most cases. For OpenAi the llama-tokenizer-js lib recommends the Gpt Tokenizer lib, or use the official Tiktoken one. I don't know about Anthropic.
About the templating it looks good but I don't really get the first abstraction thing, I must read the code to get a better idea about this. The supported template variables should include the conversation history. I like the Orca mini format abstractions, it's pretty simple and clear:
### System:
{system}

### User:
{prompt}

### Input:
{input}

### Response:

Associating a stop sequence to a template might be a good idea, but in the api it is an inference parameter: please have a look a this data structure for reference: https://github.com/synw/infergui/blob/main/src/interfaces.ts#L29 : it's the Llama.cpp api implemented in Goinfer but Koboldcpp is pretty much similar
By the way I have a question: would it be possible to edit the commands in a more convenient format than json? Like in human readable yaml files for example? For complex templates like few shots ones it is much more convenient. This is what I did in Goinfer with my concept of tasks. Example "command" in yaml: https://github.com/synw/goinfer/blob/main/examples/tasks/code/json/fix.yml (one shot prompt)

We could have a mixed approach like defining default tokenizers for each providers, and have a tokenizer fallback setting and command param to let the user choose in case needed.

Yeah, this might be the only approach that makes sense for wingman. I'll work on this in the refactor (I should publish the branch maybe today when it's in a good spot).

I don't really get the first abstraction thing

Maybe it's not needed, but it is my understanding that the first message in a conversation is usually formatted differently than all followup messages, like in the current Anthropic provider (simplified for example purposes):
if (!isFollowup) {
  prompt = `${system}${user} ${user_message}${assistant}`
} else {
  prompt = `${history}${user} ${user_message}${assistant}`
}

Becomes something like:
if (!isFollowup) {
  // formats with `format.first` as guide, e.g. `<s>[INST] {system}\n\n{user_message} [/INST]`
  prompt = formatFirst(command, userMessage, llama2Template);
} else {
  // formats with `format.user` as guide, e.g. `<s>[INST] {user_message} [/INST]`
  prompt = `${history}${format(command, userMessage, llama2Template)}`;
}

Since the first message is not always just {system}{user}, sometimes it is {system}\n{user}, {system}\n\n{user}, or in the weird case of llama2: {<s>[INST] {system}\n\n{user} [/INST]
Is this not necessary?

Associating a stop sequence to a template might be a good idea, but in the api it is an inference parameter

Ah, I overlooked this. Thank you for pointing this out to me. It definitely does feel right to define it on the template. Will have to think about this one some more.

would it be possible to edit the commands in a more convenient format than json?

Open to suggestions that are vscode-friendly. AFAIK the recommended method is to use settings.json for this type of thing. I understand that the way we define custom commands at the moment is somewhat cumbersome. I'd like to improve it somehow if at all possible.

Mostly lurking at the moment (also due to day job stuff) but hope to be able to contribute some more as well soon.
Re: prompt config, having it in the json settings is a huge benefit because the config is automatically synced and always available. There are some other vs code extensions out there that let you customize prompts (flexigpt, continue, for example) as js or python objects in separate config files, but then it's up to the user to manage that js/python file and make sure that the path to it is correct and all that. I'm just one user here, but I use vs code on remote machines 90% of the time via the k8s or ssh remote extensions... wingman just works in that scenario. The other extensions require me to copy config/prompt files around.
Personally, I'd prefer for common prompting formats + tokenizer selection to be built in (keyed by model name for example), with maybe an option to add a custom one to the settings.json, even if it requires some more or less complicated string escaping/templating into json. I think it's the approach that keeps it the easiest for the 90+% of users who are just going to use GPT-4 or other common model, while still keeping it possible to do more custom things for other users.
FWIW I'm mainly a python programmer so when I was initially setting up a bunch of prompts I made a tiny script that let me define the prompt settings as a python object and then json encode it/escape it/etc to copy/paste into settings.json. Maybe some tiny UI for prompt creation that does something similar would be useful.

Personally, I'd prefer for common prompting formats + tokenizer selection to be built in (keyed by model name for example), with maybe an option to add a custom one to the settings.json, even if it requires some more or less complicated string escaping/templating into json. I think it's the approach that keeps it the easiest for the 90+% of users who are just going to use GPT-4 or other common model, while still keeping it possible to do more custom things for other users.

Completely agree. A new user with a fresh install should be able to set their API key and just start using it, entirely ignoring the configuration panel. Likely more than 90% of users will fall into that bucket as you mentioned. For the remaining few, it should be configurable enough such that they can use whatever provider/llm/format/etc. they want to use -- and it should be easy to do so. So far version 2 captures this idea, but there is still a bit more work to be done.

Maybe some tiny UI for prompt creation that does something similar would be useful

Yeah, since this is such a core feature of the extension it might make sense to have some small UI like this. I have no good ideas at the moment though.


1.0.0-rc52 crash when contacts add

With go-textile_v1.0.0-rc52_linux-amd64.tar.gz
$ textile contacts add -p 12D3KooW9sxYAEHH45ySJV1qeK4Dsn6zyFujcrw2pDKT1VZeNwie
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x184f750]

goroutine 20761 [running]:
github.com/textileio/go-textile/core.(*CafeService).searchLocal(0xc000082900, 0x1, 0xc0024d1f40, 0xc00263a370, 0x1, 0xc003588000, 0x14, 0x1000)
	/go/src/github.com/textileio/go-textile/core/cafe_service.go:636 +0x1a0
github.com/textileio/go-textile/core.(*Textile).search.func1(0xc0026ce840, 0x2, 0x2, 0xc0001e08c0, 0xc0019ff200, 0xc002587aa0, 0xc002587920, 0x3fca418, 0x0, 0x0, ...)
	/go/src/github.com/textileio/go-textile/core/search.go:110 +0xb7
created by github.com/textileio/go-textile/core.(*Textile).search
	/go/src/github.com/textileio/go-textile/core/search.go:102 +0x581
Post http://<IP_ADDRESS>:40600/api/v0/contacts/search: EOF
No contacts were found
[1]+  Exit 2                  textile daemon

Thanks for the report @flyskywhy. Are you by chance trying to add yourself as a contact? If so, I see the issue.
FYI: I'll be removing searching / adding contacts by peer ID in the next release. An account can have multiple peers. It doesn't make sense to only add one of them. So, search by address or fuzzy username will be the way moving forward.


Arguments to path.join must be strings

When I forget to define deployTo option, it throws this error:
$ shipit staging deploy

Running 'deploy:init' task...
'deploy:init' errored after 385 μs
TypeError: Arguments to path.join must be strings
    at Object.module.exports [as join] (/home/minhchu/myproject/node_modules/path2/posix/join.js:10:10)
    at extendShipit (/home/minhchu/myproject/node_modules/shipit-deploy/lib/extendShipit.js:65:40)
    at Shipit._shipitUtils2.default.registerTask (/home/minhchu/myproject/node_modules/shipit-deploy/lib/tasks/deploy/init.js:21:32)
    at module.exports (/home/minhchu/myproject/node_modules/orchestrator/lib/runTask.js:34:7)
    at Shipit.Orchestrator._runTask (/home/minhchu/myproject/node_modules/orchestrator/index.js:273:3)
    at Shipit.Orchestrator._runStep (/home/minhchu/myproject/node_modules/orchestrator/index.js:214:10)
    at Shipit.Orchestrator.start (/home/minhchu/myproject/node_modules/orchestrator/index.js:134:8)
    at /home/minhchu/myproject/node_modules/shipit-cli/lib/cli.js:45:14
    at next (native)
    at step (/home/minhchu/myproject/node_modules/shipit-cli/lib/cli.js:84:191)
    at /home/minhchu/myproject/node_modules/shipit-cli/lib/cli.js:84:361
    at process._tickCallback (internal/process/next_tick.js:109:7)
error Command failed with exit code 1.

We may check required options and throw some friendly warnings first

Having the same issue.


Add example of usage

Can you add an example of the plugin usage to the README.md?  Would like to see 1. what it does 2. how it does it :)

Yes, you are right. I have to add a usage documentation.

Added usage docs: 28063e51


HTTP 403 for all leagues

Sport
Football
Summary
I'm running my script which was worked previous times in the past, but now I'm getting HTTP 403 when trying to access my public league. Even when trying to access the test instance, I get this same error (league_id = 123, season 2018). For the baseball test, the same thing happens ( leauge_id = 81134470, season= 2021).
I'm not sure if I'm doing something incorrectly, but hoping someone can validate that this is not working as intended.
Logs/Data
No response

Are you using the latest version? It was semi-recently fixed. https://github.com/cwendt94/espn-api/issues/539

Upgraded to version 0.36.0 and I am also running into this issue.
HTTPSConnectionPool(host='lm-api-reads.fantasy.espn.com', port=443): Max retries exceeded with url: /apis/v3/games/ffl/seasons/2023/segments/0/leagues/[LEAGUEID]?view=mTeam&view=mRoster&view=mMatchup&view=mSettings&view=mStandings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)')))
It is happening to all scripts that I created last year.  I also got the latest espn_s2 cookie for a private league

I did just try on another computer, it did work......

Make sure that the leagues have been re-activated. That could also be a cause of the error.

Upgraded to version 0.36.0 and I am also running into this issue.
HTTPSConnectionPool(host='lm-api-reads.fantasy.espn.com', port=443): Max retries exceeded with url: /apis/v3/games/ffl/seasons/2023/segments/0/leagues/[LEAGUEID]?view=mTeam&view=mRoster&view=mMatchup&view=mSettings&view=mStandings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)')))
It is happening to all scripts that I created last year. I also got the latest espn_s2 cookie for a private league

Did you ever end up getting this working? I am having the same issue. Confirmed that I was running 0.36 but still encountering the 403 forbidden issue.

I cannot get this to work on my work computer.  I am not sure if that is the root cause, or if it is because I have multiple versions of Python install.
On my personal Mac, I can get it to run with no issues

What python version are you seeing this error? That might be causing it.

From what I can tell I just have one version of python installed, which is 3.9.9

Finally sat down and spent time trying to figure out what is going on
The same as bs0l, I had launcher paths in the Environment Variables that were pointing to wrong versions.  I went through Program Files, AppData/Roaming and AppData/Local and removed all references of Python folder, then uninstalled Python and re-installed in a customized location that I wanted it in

For what it's worth - I had been using python 3.8 with version 0.33 all last year with no issue, but hit the 403 with this year's football league.  After updating to the latest version of the API (0.38.1), it resolved the 403.


CI: Use pushd/popd when installing GEOS

This is bash specific. Feel free to close if you want this to work other shells.

Thanks!


LWM2M: Support for DTLS with Raw Public Key security mode [v2]

Main changes since v1 (#2296)

Change of a static variable in tinydtls https://github.com/solettaproject/soletta/pull/2296#discussion-diff-75605632
sol_blob_ref()s to solve https://github.com/solettaproject/soletta/pull/2296#discussion-diff-75606155

Signed-off-by: Bruno Melo<EMAIL_ADDRESS>

Fix these minor things and we're good to go!

An updated version is at #2299


Fixes #2723: Documented the files in openfood/repositories package

Description
Documented the files in openfood/repositories package
Related issues and discussion
Fixes #2723

@teolemon @deniger Can you please review this PR.


PP-8614 - Documentation for 3DS details in Reporting API

Context
It is now possible to view 3D Secure authentication details about a payment through the Pay Reporting API.
Changes proposed in this pull request
This PR makes the following changes:

Adds authorisation_summary object to the API response example on the 'Report on a payment' page
Adds definitions of authorisation_summary, including required and version objects
Adds a link to the 'Report on a payment' page to the 'Set up SCA' page

Guidance to review
Questions for the SME:

Is the authorisation_summary definition accurate?
Has authorisation_summary been added to the correct part of the response example?
Do the version values (2.2.0, 2.1.0, 1.0.2) need their own definitions?

Questions for 2i reviewer:

I switch between 'authorisation' and 'authentication' a bit. 'Authorise' is how Pay refer to it, but 'authenticate' is how 3DS is referred to elsewhere. Is this switching okay?
Do I introduce the possible version values appropriately?

Nice, looks good to me. 👍
We've chatted about authorisation vs authentication and it seems like using both is OK - authorisation_summary may eventually contain more information which is not limited to authentication. It might be worth discussing this further with the team. Given that authorisation and authentication are two separate processes, perhaps a different name for this object would be more fitting if it will contain details of both things. It should be fine if Pay treats an authentication from 3DS as part of the payment authorisation.


How to

This seems to be a great package but unfortunately I could not get it to work properly.
There is some Hotspots.ts file but it does not seem to be used at all
A short Howto would be very very helpful

Hi @bwaidelich,
we had the plan to provide a usable implementation with a separate package. It is only used within a internal boilerplate currently.
Maybe this is the right time to finally do so. I will get back to you...

Awesome, thanks for the quick feedback!
If it turns out to be too much work, some pointers in the README might already help though

Hi @bwaidelich, we will provide something tomorrow at the latest...

Awesome!

Hi @bwaidelich ,
i added an implementation example that we will refactor into a ready to run plugin over the next days.
Also i sent you a message in Neos Slack
https://github.com/Format-D/FormatD.HotspotContent

@bwaidelich
We have created a package and released a first running version:
Package Name: formatd/hotspot-content
Hope that helps :)


Mime/Content Type?

Are there any thoughts/conventions for MIME/Content-Type values for COPC files?

LAS is registered as application/vnd.las
LAZ is registered as application/vnd.laszip

Maybe application/vnd.laszip; profile=copc ?
Related issues for COGTIFF: https://github.com/cogeotiff/cog-spec/issues/13 https://github.com/opengeospatial/CloudOptimizedGeoTIFF/issues/1

For planetary computer, we went with
application/vnd.laszip+copc

The rationale was to follow GeoJSON's registration. Profile certainly makes sense too though.
I didn't have a strong opinion on the topic. If someone does, please put forward the rationale for one form or another. I don't understand the intricacies of IANA registrations, as they've always seemed a bit arbitrary to me.

application/vnd.laszip+copc seems sane enough to me 👍

I don't understand the intricacies of IANA registrations, as they've always seemed a bit arbitrary to me.

Agreed!


Hot reload calendar?

A second call to caleandar(element,events); in a vain attempt to reload the calendar produces no error but does nothing. This is a use-case where I can't reload the parent container.

And, I figured that out too.


Linking attachments in case of buslogging

Hello,
as the specification says, attachments can be linked to channels. This is especially for buslogging from interest, since it allows to attach a .dbc attachment directly to the buslogging channel. Tools like AsamMDF then directly interpret the buslogging data and show the signals.
From the documentation I can read, that the 'Sync' channel is used to synchronize an attachment block. Can you give me an example for the implementation?
Greetings,
Sebastian

The MDF library is "independent" of other libraries. The ihedvall/dbclib have the parser functionality of a DBC file. This library also have interface so you can load in a bus logger file into the parser and get the signal values. The DBC library has similar subscriber interface as the MDF library. In the DbcViewer application, you can load in a MDF bus logger file and plot the signal values.
There is some problem with the parsing of CAN messages regarding type of protocol J1939, NMEA 2000 etc. I think I manage to test the NMEA 2000 and plain CAN protocol but the remaining protocols are untested. So if you have a MDF bus log file with matching DBC file, you are welcome to test or send me the files.
Note that the MDF file seldom attach the DBC or A2L file but if you add an ODS database (ihedvall/odslib) for indexing the files, solves that problem.
Regarding the Sync channel type, I am at your level, I don't really know how it works. I assume that the attachment is a video stream for example recording something during the test. The sync channel the reference the streams "timestamp" whatever this is. I actually have an synchronization MDF file so I can research little bit more if you want.
Best Regards
Ingemar Hedvall

I checked how a Sync type channel works. The attachment is added as usual and I assume that it is a video stream of some kind. The Sync channel is similar to the master channel. The master channel defines the channel groups synchronization domain. Let use time in this example. The Sync channel defines the synchronization domain of the video stream which refers to the relative start time of the video.
The channel is defined as a Sync Type. Its signal data points to the attachment block and has its synchronization domain set to time.
There is some "chicken or egg" problem with this design as you defines the Sync channel first, then add the signal data and at the end attach the video stream. When adding the attachment at the end, the synchronization channels signal data link needs to be updated. I'm not sure the current mdflib interface support this when creating MDF files. Maybe need a extra optional channel argument when adding the attachment. Adding this to the to do list.

Hello,
thank you for the fast answers. to clarify what i exactly mean:
In case of Buslogging it is genrally possible to attach a .dbc file to a Channel. In MDF FileViewer, it looks like this:

As an effect, buslogging mdf files are processed by tools like AsamMdf (V 6.4.4) and look like this:

So, as you can see, pure buslogging data are extracted directly and shown as separate channel groups. This is possible because of a link block between channel and attachment.
As you already mentioned, the channel is created at the beginning of the measurement, while the attachment is added at the end. But, if the channel block is already written to the file, it is not possible to add the missing linking block right?
Greetings
Sebastian

The Python AsamMdf application have more features than the MdfViewer application. The MDF Viewer is just a plain file browser and doesn't include any knowledge about DBC files. It is not a replacement of the AsamMdf GUI.
The DbcViewer application have something similar to the AsamMdf GUI application regarding DBC and MDF files.
The ReportExplorer application have an ODS database (Sqlite) for indexing the test object data so it can handle up to 10 000 files. It will do what you want but it is under development.
If you want me to add this functionality to the MdfViewer, you may request this function. The best way is to add a requirement to the GitHub project (ihedvall/projects/Developing MDF applications and libraries).
Note that the Sync channel issue is something unrelated. It is when a video stream is added to the MDF file. Maybe it is better to separate that problem for the moment.

I will modify the add attachment function so it fixes the reference link in channels.

Fixed so it is possible to reference attachments in channels.
Making the same functionality of the AsamMdf GUI tool regarding embedded DBC files is possible but will take some time. A proposal is to open the DBC Viewer application with the bus logger MDF and DBC files as input arguments. This functionality already exist today but through menu selection.
I change this issue to an enhancement.

By the way, you must add the DBC attachment before calling the InitMeasurement() when creating MDF files. I note that the attachment links in the CN block are dynamically i.e. the size of the block changes. You cannot change the block size after it is stored. You may change the content.


rasa_core stop reply using rest and (edit: unimplemented) actions

Hi There and thanks for rasa! Now I am fighting with the following problem:
I think I figure out the main problem
If in domain.yml actions I have something like
actions:
- action_default_fallback

but I didn't implement the python action
then
Rasa freeze on searching for fallback without any message
Here is some tests I used to figure out

Version:
rasa-core                          0.13.0a6
rasa-core-sdk                      0.12.1
rasa-nlu                           0.13.8

and Python 3.6 on OsX
Issue:
Steps
I lunch rasa-core using
python -m rasa_core.run --enable_api -d models/dialogue -u models/current/nlu --cors "*" -o out.log --endpoints endpoints.yml --credentials credentials.yml --verbose
Then I send
POST /conversations/testusser/respond HTTP/1.1
Host: localhost:5005
Content-Type: application/json
cache-control: no-cache

body:

{
    "query": "how are you"
}

And rasa stop replies any request but It doesn't show any error message on the console:
Before that if I sending
{
    "query": "hi"
}

I receive
[
    {
        "recipient_id": "testusser",
        "text": "Hey there !! welcome to RASA Faq bot"
    }
]

I think training files I used should be from FAQ-BOT example
Archive.zip

HI All, this ticket is good to stay closed... In my debugging I figure out that the main problem was that action server was not started.


Translate a RegExp into SweetJS

Out of curiosity, I had written a RegExp function that would translate any occurence of an ObjC style block into a proper anymous function.
^{ console.log("Foo"); }
// becomes
function(){ console.log("Foo"); } // I thought about adding: .bind(this)

^(arg){ console.log(arg); }
// ->
function(arg){ console.log(arg); }

// A practical use:
app.use("/", ^(reg, res){
    res.send("o.o");
});

The code I wrote to make this translation:
var blockRegexp = /\^(\(.*?\))?({[\s\S]*?})/g;
module.exports = function(src) {
    var res = src.replace(blockRegexp, function(block, args, body, index, match){
        return "function"
            +(typeof args == "undefined" ? "()" : args)
            +body;
    });
    return res;
}

My use-case is in combination with OJ, where I could realize a very ObjC like extension.
How would I go about translating my little RegExp hackery into a SweetJS macro?

This is something sweet.js excels at :).
// Non-recursive macro so we can fallback to the ^ operator
// when we don't have a match
let (^) = macro {
    rule { ($args:ident (,) ...) { $body ... } } => {
        function ($args (,) ...) { $body ... }
    }
    rule { { $body ... } } => {
        function () { $body ... }
    }
    // Fallback to operator usage
    rule { } => { ^ }
}

foo.bar(^{
    return 42
})

foo.baz(^(err, res){
    console.log(res)
})

var foo = 4 ^ 2

foo.bar(function () {
    return 42;
});
foo.baz(function (err, res) {
    console.log(res);
});
var foo = 4 ^ 2;

This. is. awesome. Where can I learn how to do magic like this? ;)
Very nice. I am going to test this if it will run nicely within OJ. Thanks for the macro, will let you know if it worked and close the issue then. :)

I would start with the docs http://sweetjs.org/doc/main/sweet.html

Awh. The parser does not like ObjC.
<EMAIL_ADDRESS>~/W/sjs-test $ cat t.sjs
let (^) = macro {
    rule { ($args:ident (,) ...) { $body ... } } => {
        function ($args (,) ...) { $body ... }
    }
    rule { { $body ... } } => {
        function () { $body ... }
    }
    // Fallback to operator usage
    rule { } => { ^ }
}

@implementation Foo
+(id)barMyCb:(callable)cb {
    cb();
}
@end

[Foo barMyCb:^{ console.log("o3o"); }];
<EMAIL_ADDRESS>~/W/sjs-test $ sjs -r ./t.sjs
/usr/local/lib/node_modules/sweet.js/lib/parser.js:4876
            throw e;
                  ^
Error: Line 12: Unexpected token @
[... @ implementation Foo + ...]
    at throwError (/usr/local/lib/node_modules/sweet.js/lib/parser.js:1937:21)
    at throwUnexpected (/usr/local/lib/node_modules/sweet.js/lib/parser.js:1986:9)
    at parsePrimaryExpression (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2347:9)
    at parseLeftHandSideExpressionAllowCall (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2402:61)
    at parsePostfixExpression (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2432:45)
    at parseUnaryExpression (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2483:16)
    at parseBinaryExpression (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2546:16)
    at parseConditionalExpression (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2600:16)
    at parseAssignmentExpression (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2757:16)
    at parseExpression (/usr/local/lib/node_modules/sweet.js/lib/parser.js:2787:16)

No, you cannot just throw any language at it :) sweet.js expects js + macros as input, and gives you plain js as output.

Ah okay. Then I just gonna try it another way. :)
On Do. Mai 07 2015 20:19:32 Nathan Faubion wrote:

No, you cannot just throw any language at it :) sweet.js expects js + macros as input, and gives you plain js as output.
—
Reply to this email directly or view it on GitHub https://github.com/mozilla/sweet.js/issues/471#issuecomment-99967044.

Turns out that ojc also uses an AST parser. Mmh. Looks like I have to return on using my RegExp. But at least I now know how to use sweet.js. :)

I'm mass closing issues due to the release of 1.0 obviating lots of bugs. If you feel this issue is something we still need to address feel free to reopen.


Support for loading different types of document eg. CSV, JSON, SQL etc.

Need to support for loading diff document types CSV, JSON, SQL, etc.

Came here to add PDF because I think much background information is in that format.

And XML format as well as there's plenty of data written available in that format.

This is now live. Closing this issue.


MQTT

When I enable MQTT program crash.

Traceback (most recent call last):
File "", line 35, in
File "util.py", line 6, in getinstance
File "mqtt.py", line 31, in init
File "mqtt.py", line 45, in connect
File "/lib/umqtt/simple.py", line 154, in subscribe
File "/lib/umqtt/simple.py", line 173, in wait_msg
OSError: -1

Been a long time since I've looked at this. Might be a dependency issue where the version installed is too new?

Hi,
yes there was problem width dependecy mqtt library  and severeal other error. In critical peaces of code I use try: and make a lot other change. I reading temperature from external zigbee temp. sensors and show it on clock


Speak-Like-Yoda

Aim

A python script that translates an input English sentence into Yoda-speak.

Details

In this project, The script only uses Python's standard modules random and string, so no additional installation is needed
@kaustubhgupta please have a look into this issue because I think this is a unique project and its something new.

@kaustubhgupta please assign me the issue


k3s vloume plugin

Environmental Info:
K3s Version:
v1.24.1+k3s1
Node(s) CPU architecture, OS, and Version:
CPU architecture   ---  arm64
os--openwrt
os-version   22.03.0-rc6
Cluster Configuration:

Describe the bug:

Steps To Reproduce:

Installed K3s:
server:   curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.24.1+k3s1  sh -

agent:   k3s agent --token ${TOKEN} --server [https://${SERVER_HOST}:6443]
Expected behavior:
mount lvs for pod
Actual behavior:
k3s agent log:
time="2022-10-25T05:01:44Z" level=error msg="Failed to connect to proxy. Empty dialer response" error="dial tcp <IP_ADDRESS>:6443: connect: connection timed out"
time="2022-10-25T05:01:44Z" level=error msg="Remotedialer proxy error" error="dial tcp <IP_ADDRESS>:6443: connect: connection timed out"
time="2022-10-25T05:01:49Z" level=info msg="Connecting to proxy" url="wss://<IP_ADDRESS>:6443/v1-k3s/connect"
E1025 05:02:39.697289    7461 kubelet.go:1709] "Unable to attach or mount volumes for pod; skipping pod" err="unmounted volumes=[data65550test], unattached volumes=[nodedb data65550test nodename kube-api-access-h9bfw rootfs node]: timed out waiting for the condition" pod="bxc-65550/bxc-app-1-65550-arm64-100g-zw4hd"
E1025 05:02:39.697857    7461 pod_workers.go:951] "Error syncing pod, skipping" err="unmounted volumes=[data65550test], unattached volumes=[nodedb data65550test nodename kube-api-access-h9bfw rootfs node]: timed out waiting for the condition" pod="bxc-65550/bxc-app-1-65550-arm64-100g-zw4hd" podUID=35d9426f-effe-4297-8557-ab58fe95558c
time="2022-10-25T05:03:58Z" level=error msg="Failed to connect to proxy. Empty dialer response" error="dial tcp <IP_ADDRESS>:6443: connect: connection timed out"
time="2022-10-25T05:03:58Z" level=error msg="Remotedialer proxy error" error="dial tcp <IP_ADDRESS>:6443: connect: connection timed out"
time="2022-10-25T05:04:03Z" level=info msg="Connecting to proxy" url="wss://<IP_ADDRESS>:6443/v1-k3s/connect"
E1025 05:04:56.697588    7461 kubelet.go:1709] "Unable to attach or mount volumes for pod; skipping pod" err="unmounted volumes=[data65550test], unattached volumes=[nodename kube-api-access-h9bfw rootfs node nodedb data65550test]: timed out waiting for the condition" pod="bxc-65550/bxc-app-1-65550-arm64-100g-zw4hd"
E1025 05:04:56.698213    7461 pod_workers.go:951] "Error syncing pod, skipping" err="unmounted volumes=[data65550test], unattached volumes=[nodename kube-api-access-h9bfw rootfs node nodedb data65550test]: timed out waiting for the condition" pod="bxc-65550/bxc-app-1-65550-arm64-100g-zw4hd" podUID=35d9426f-effe-4297-8557-ab58fe95558c
W1025 05:06:09.920535    7461 sysinfo.go:203] Nodes topology is not available, providing CPU topology
E1025 05:06:09.926732    7461 info.go:114] Failed to get system UUID: open /etc/machine-id: no such file or directory
W1025 05:06:09.926990    7461 machine.go:65] Cannot read vendor id correctly, set empty.
W1025 05:06:09.933679    7461 info.go:53] Couldn't collect info from any of the files in "/etc/machine-id,/var/lib/dbus/machine-id"
E1025 05:06:10.357319    7461 network_policy_controller.go:283] Aborting sync. Failed to run iptables-restore: failed to call iptables-restore: exit status 2 (iptables-restore v1.8.7 (legacy): Couldn't load match `physdev':No such file or directory
Additional context / logs:
ds   logs
Events:
Type     Reason              Age                  From                     Message

Normal   Scheduled           6m12s                default-scheduler        Successfully assigned bxc-65550/bxc-app-1-65550-arm64-100g-zw4hd to openwrt-test-taiyuan
Warning  FailedMount         4m10s                kubelet                  Unable to attach or mount volumes: unmounted volumes=[data65550test], unattached volumes=[rootfs node nodedb data65550test nodename kube-api-access-h9bfw]: timed out waiting for the condition
Warning  FailedAttachVolume  2m (x10 over 6m12s)  attachdetach-controller  AttachVolume.Attach failed for volume "data65550test" : invalid character 'V' looking for beginning of value
Warning  FailedMount         116s                 kubelet                  Unable to attach or mount volumes: unmounted volumes=[data65550test], unattached volumes=[nodename kube-api-access-h9bfw rootfs node nodedb data65550test]: timed out waiting for the condition

agent :
/usr/libexec/kubernetes/kubelet-plugins/volume/exec/bonuscloud.io~lvm/lvm
[root@OpenWrt-test-taiyuan:12:02 PM /usr/libexec/kubernetes/kubelet-plugins/volume/exec/bonuscloud.io~lvm] # sh lvm getvolumename '{"kubernetes.io/fsType":"ext4","kubernetes.io/pvOrVolumeName":"data65550test","kubernetes.io/readwrite":"rw","size":"100g","volumeID":"bonusvol65550v01","volumegroup":"bonusvolgroup"}'
{"status": "Success", "volumeName": "data65550test"}
and I don't know k3s apiserver want receive what kind of return information for getvolumename ,so  daemenset events  always  show  AttachVolume.Attach failed for volume "data65550test" : invalid character 'V' looking for beginning of value,  i am so  confused

There are a LOT of different errors here

time="2022-10-25T05:03:58Z" level=error msg="Remotedialer proxy error" error="dial tcp <IP_ADDRESS>:6443: connect: connection timed out"
This would indicate that the node can't connect to the server. What is that IP address, and do you have any idea why this node can't connect to it?
E1025 05:06:10.357319 7461 network_policy_controller.go:283] Aborting sync. Failed to run iptables-restore: failed to call iptables-restore: exit status 2 (iptables-restore v1.8.7 (legacy): Couldn't load match physdev':No such file or directoryYou seem to be missing some kernel modules on this host. Thephysdev` match is not available, but is a required module for enforcing network policies.
AttachVolume.Attach failed for volume "data65550test" : invalid character 'V' looking for beginning of value
I would have to defer to the bonuscloud storage provider - have you opened an issue with their team yet? I would also check to see if they have a modern CSI plugin. Kubelet volume plugins have been deprecated for quite a while.

There are a LOT of different errors here

time="2022-10-25T05:03:58Z" level=error msg="Remotedialer proxy error" error="dial tcp <IP_ADDRESS>:6443: connect: connection timed out"
This would indicate that the node can't connect to the server. What is that IP address, and do you have any idea why this node can't connect to it?
E1025 05:06:10.357319 7461 network_policy_controller.go:283] Aborting sync. Failed to run iptables-restore: failed to call iptables-restore: exit status 2 (iptables-restore v1.8.7 (legacy): Couldn't load match physdev':No such file or directoryYou seem to be missing some kernel modules on this host. Thephysdev` match is not available, but is a required module for enforcing network policies.
AttachVolume.Attach failed for volume "data65550test" : invalid character 'V' looking for beginning of value
I would have to defer to the bonuscloud storage provider - have you opened an issue with their team yet? I would also check to see if they have a modern CSI plugin. Kubelet volume plugins have been deprecated for quite a while.

Thank you very much, and i think the first and the second is independent the third。
The bonuscloud just a vg name,our disk is use lvm -> pv -> vg -> lvs to mount.I guess your mean is this k3s version is not support to lvm plugin?

I don't know,  but I don't believe we've ever tested this bonuscloud.io driver that you appear to be using. Where did you get it from? Why are you even using a volume plugin instead of a CSI driver? As I mentioned earlier, they've been deprecated for a while.

Thank you very much for the information you provided me.
Well, our company has been using the k8s lvm plug-in to format the hard disk for node nodes, create vg, create lv, and hang the lv to the target directory for use by the business container. Now we expect to use k3s to complete this process, and continue the previous style to obtain better compatibility, so we do not intend to use the updated CSI method. Please tell me which version of k3s I need to use, and whether the server and agent should keep the same version

our company has been using the k8s lvm plug-in
Please tell me which version of k3s I need to use

Which one? Can you share a link to the source code or documentation?

we do not intend to use the updated CSI method.

flexvolume plugin drivers will be removed from Kubernetes at some point. You should investigate moving to CSI drivers before that happens. Some options would be:

https://github.com/metal-stack/csi-driver-lvm
https://github.com/topolvm/topolvm

whether the server and agent should keep the same version

Yes, servers and agents should always run the same version of Kubernetes, except briefly during upgrades.

I must say, thank you very much for your reply.
At present, the k3s version we are using is v1.24.1+k3s1
Since csi driver is a better way, I will go to more research in this area to understand how csi and lvm work together, and what information can be provided in this regard


Small issue: wrong link on charmhub.io for "Homepage"

Steps to reproduce
go to https://charmhub.io/postgresql-k8s
click in relevant links on "Homepage"
Expected behavior
open https://canonical.com/data/docs/postgresql/iaas
(maybe)
Actual behavior
https://ubuntu.com/data/postgresql
results in a 404
Versions
current version of the metadata.yaml
Screenshot

@mcjaeger  thank you for the report, we saw it. Currently charmhub.io simply shows the first link from the 'website' list.
I do not like the idea to point directly into the documentation, I would prefer https://github.com/canonical/postgresql-k8s-operator if public page will not be released soon.
Mohamed, do we have understanding about the expected date of publishing https://ubuntu.com/data/postgresql and https://ubuntu.com/data/mysql ? Otherwise I have to revert this and re-apply later... Meh...
Tnx!


cmd/go: internal compiler error: NewBulk too big: nbit=66729 count=934227 nword=2086 size=1948797522

What version of Go are you using (go version)?

$ go version
go version go1.17.1 windows/amd64

Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\sfq\AppData\Local\go-build
set GOENV=C:\Users\sfq\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\sfq\Documents\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\sfq\Documents\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.1
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\sfq\Desktop\qqqqq\id-validator\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\sfq\AppData\Local\Temp\go-build7276215=/tmp/go-build -gno-record-gcc-switches
GOROOT/bin/go version: go version go1.17.1 windows/amd64
GOROOT/bin/go tool compile -V: compile version go1.17.1
gdb --version: GNU gdb (GDB) 8.1

What did you do?

git clone go get -u github.com/guanguans/id-validator
go build  -gcflags "all=-N -l" github.com/guanguans/id-validator/examples
When I use go version go1.15 windows/amd64，it eats up all my system's memory.
When I change to go version go1.17.1 windows/amd64, It takes a long time to compile, and print out the below information.
PS C:\Users\sfq\Desktop\qqqqq\id-validator> go build  -gcflags "all=-N -l" github.com/guanguans/id-validator/examples
# github.com/guanguans/id-validator/data
data\constellation.go:60:6: internal compiler error: NewBulk too big: nbit=66729 count=934227 nword=2086 size=1948797522

Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new

What did you expect to see?
Compile successfully
What did you see instead?
PS C:\Users\sfq\Desktop\qqqqq\id-validator> go build  -gcflags "all=-N -l" github.com/guanguans/id-validator/examples
# github.com/guanguans/id-validator/data
data\constellation.go:60:6: internal compiler error: NewBulk too big: nbit=66729 count=934227 nword=2086 size=1948797522

Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new

Thanks for reporting this.
The issue is caused by huge map literals like the ones you have in the .go files in the data folder, and I believe this is a dup of #29829 (closed) and #33437 (still open). See in particular https://github.com/golang/go/issues/26560#issuecomment-407276913.
The reason the error message is slightly different is that in commit 0ced54062e9d58f8ff6b3beff0c8694e799d47a8 bvbulkalloc was renamed to NewBulk. So now it says "NewBulk too big" instead of " bvbulkalloc too big".

Duplicate of #33437


How do you handle with the loss_match of track_head in QueryTrack?

Dear author：
In MaskTrack, when calculate the loss_match of track_head, the picture having only one instance will not participate in the calculation of loss_mach.  So, if the pictures of one batch all have only one instance, the loss_match of this batch will be 0.  How do you solve this problem in your QueryTrack?

Please refer to the implantation of Mask Track R-CNN.


syft: 1.5.0 -> 1.6.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/syft/versions.
meta.description for syft is: CLI tool and library for generating a Software Bill of Materials from container images and filesystems
meta.homepage for syft is: https://github.com/anchore/syft
meta.changelog for syft is: https://github.com/anchore/syft/releases/tag/v1.6.0
Updates performed

Golang update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.6.0 with grep in /nix/store/zlx5xrrgaf9k1f1wxzwzxdsc86b7dni1-syft-1.6.0
found 1.6.0 in filename of file in /nix/store/zlx5xrrgaf9k1f1wxzwzxdsc86b7dni1-syft-1.6.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

syft

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/zlx5xrrgaf9k1f1wxzwzxdsc86b7dni1-syft-1.6.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A syft https://github.com/r-ryantm/nixpkgs/archive/4c3cc7b115c59eb1826bd65c60dd8d218273f2ac.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/4c3cc7b115c59eb1826bd65c60dd8d218273f2ac#syft

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/zlx5xrrgaf9k1f1wxzwzxdsc86b7dni1-syft-1.6.0
ls -la /nix/store/zlx5xrrgaf9k1f1wxzwzxdsc86b7dni1-syft-1.6.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package built:

syft

Maintainer pings
cc @developer-guy @06kellyjac @kashw2 for testing.

@NixOS/nixpkgs-merge-bot merge


New version of IntelliJ requires requires build 223.* or older of plugin

A number of users are reporting that newer versions of IntelliJ are seeing the following message:
Plugin 'CUE' (version '0.8.5') is not compatible with the current version of the IDE, because it requires build 223.* or older but the current build is IU-231.4840.387 Plugin 'Kotest' (version

I don't use IntelliJ myself, so I'm creating this issue as more of a placeholder for discussion and for others to comment with specifics.

Thanks, a fix is underway.

The update is now available, https://plugins.jetbrains.com/plugin/16126-cue/versions/stable/300843

@jansorg thanks so much for this.


Python version 3.6 not supported

I was attempting the "Geometry Basics: Distance between points in 2D"
(https://www.codewars.com/kata/geometry-basics-distance-between-points-in-2d/train/python) kata today and ran into this error when clicking "Run Sample Tests" or "Attempt":

For this particular kata, Python 3.6 appears to be the only version I can select, as the others are greyed out:

I can reproduce the "python version 3.6 not supported" message on other Python kata that have the 3.6.0 option.

@kazk this can be closed with the new front end finally supporting 3.6 properly.

Thanks, this was actually caused by the request payload having number 3.6 as language version (I think). The new runner is little bit nicer and accepts it.
I tried to find the source of this bug (why the language version is sometimes given as a number), but eventually gave up.


Document QueryObject

In order to properly write type definitions for queryCache.getQueries and queryCache.getQuery function, I would need the documentation of QueryObject type.
This object can be of course inspected at runtime, but it's unclear which properties are considered public and which are private.

The query object is deliberately undocumented for now as we find common use cases around the API and internal query object. As we find those use cases, we can slowly add documentation. PR's welcome!