Clean up bindConfigServices function

Description:
The current implementation of the bindConfigServices function could create outputs and/or errors that would be confusing to debug.
Issue:
Looking at the https://github.com/taubyte/dreamland/blob/main/cli/new/helpers.go file, it seems that if the conditional check on line 78 fails, then we will end up with a port of 0 and a sub of "" for any given service. Apparently it is possible to use port 0 to bind to a random available port, however this could cause problems with the use of TCP as 0 is a reserved port not intended to be used. In any case, a sub of "" is not in the list of ValidSubBinds found in the file https://github.com/taubyte/dreamland/blob/main/cli/common/vars.go. We see sub being validated on line 86, but not if the conditional check on line 78 fails. So this seems like a contradiction of logic: likely it should be validated both times.
Also, if it is possible for any service to bind to port 0, I would expect the conditional on line 112 to fail from time to time, in which case we would get an error for two services having duplicate port bindings. And the reason they are duplicate is just that they ended up taking on a default value after the conditional on line 78 failed. This gives the appearance that the code is written assuming the conditional on 78 will not fail.
Possible Solution:
It would likely be better to save the confusion by just creating a requirement that the result of strings.Split(bind, "@")  on line 63 have a length == 2, instead of letting the inputs fall all the way through to the validation of duplicate ports to fail. This could save some debugging efforts insofar as we would not have to read all the times that port gets initialized, reassigned, or accessed on the binds map.

port==0 means that dreamland will randomly assign a port.
Can you provide a snippet of what you think the solution should be?

The simplest solution if we only wanted to accept binds which had a length of 2 when split would be to just change the conditional on line 64 in  https://github.com/taubyte/dreamland/blob/main/cli/new/helpers.go:
if len(_def) != 2 {
	return nil, fmt.Errorf("processing bindings for `%s` failed", bind)
}

However, if the application has been designed to accept the value 0 and use it as a signifier to assign a random port to the service during runtime, the better solution would probably be to allow multiple bindings to port 0. This is assuming that we wouldn't cause some kind of failure due to a lack of spare random ports to assign. In order to allow multiple bindings to port 0, we could modify the condition on line 112 to read like this:
if ok && port != 0 { // proceed with error handling here}

These are just the bare minimum simple ways to achieve the desired functionality. Though the code in this file is in need of a refactor which is probably equally as important.
It could easily be broken into several functions at the least. Perhaps separate structs each with their own set of methods? Likely some similar logic is being used elsewhere in the repository and could even benefit from using some of the methods we would extract here, should we decide to expose them.
This might be a nice first pass for a refactor of the bindConfigServices function if we extracted three methods, each representing what I think the function is doing at a high level:
func bindConfigServices(_binds []string, _services []string) (map[string]ServiceConfig, error) {
	binds, err := parseServiceBindings(_binds, _services)
	if err != nil {
		return nil, err
	}

	err = validateNoPortConflicts(binds)
	if err != nil {
		return nil, err
	}

	return createConfig(binds, _services), nil
}

We could imagine each of the functions encapsulating a chunk of the logic. parseServiceBindings would encapsulate the logic from lines 57-105, validateNoPortConflicts would encapsulate the logic from lines 108-123 and createConfig would encapsulate the logic from lines 128-145. Naturally, these functions would need to be broken down further


Split AsVersionedObjects so it can be reused

Some commands want the functionality but not a runtime.Object

Assigning to @bgrant0607 for v1.0 triage. Please re-assign as appropriate.

This is not critical for us because we're carrying it as a patch - can be post 1.0
----- Original Message -----

Assigning to @bgrant0607 for v1.0 triage. Please re-assign as appropriate.

Reply to this email directly or view it on GitHub:
https://github.com/GoogleCloudPlatform/kubernetes/pull/9972#issuecomment-112962496

LGTM.

This is small/simple, and tests pass, so it can go in.


New pull_request_template

Agree this is all just a documentation & reminder of common sense, but reminders are sometimes useful :)
I'm onboard with adding more unit testing as well.


Feature request (MIST): Github action to auto assign issues and PRs to projects

What MIST package?
None. This applies to the whole repository
Is your feature request related to a problem? Please describe.
When a new issue or PR is created, you have to manually assign a project. People who know MIST well may know the projects an workflows, but it should be automated if any user wants to raise an issue.
Describe the solution you'd like
Github doesn't currently provide project assigning on issue templates, but a github action such as this one should to the trick.
Development checklist

[ ] Create new GH action yml
[ ] Trigger it for both issues and pull requests
[ ] PRs go directly to WIP/In progress
[ ] Issues go to Upstream/Backlog

Development checklist

[ ] Create new GH action yml
[ ] Trigger it for both issues and pull requests
[ ] PRs go directly to WIP/In progress
[ ] Issues go to Upstream/Backlog

Does this shows up on the project?

Finally I'm not going to automate project assigning for PRs, as the PR template asks for a linked issue. If the linked issue is on the correct project and column, that should be enough.


The middleware pipeline should halt on error

Right now, when next(err) is called, the pipeline will switch into an "error mode" and start to process the error down the error middleware. If some middleware then calls next() (i.e. double-next) then the normal pipeline processing will resume.
I think that once an err has been provided to the pipeline, a flag should be set in the pipeline and simply ignore all next() calls (non-error-pipeline calls). This would probably be a sane way to manage errors, as it would be an analogue to someone raising a flag when they get on('error', fn) called and want to ignore the results from non-cancel-able async operations.

i'm not agree with you. my argument is a then-catch flow from promises
bluebird.resolve()
.catch(() => {
    // will NOT come here
})
.then(() => {
    // will come here
    throw new Error();
})
.then(() => {
    // will NOT come here
})
.catch(e => {
    // will come here
})
.then(() => {
    // will come here
})

I mean if you ever finish express5 which is going to support promises, this what people will expect from its behavior

Hi @TrejGun good point. What is your idea for how to change the behavior to solve the double-next() issues?

i believe when you want to pass an error between error-middlewares you should call next(error) but not next()
app.use(function (err, req, res, next) {
  next(err);
})

if you call next() from error middleware
app.use(function (err, req, res, next) {
  next();
})

you should resume non-error-pipeline

Gotcha. So what I'm trying to brain storm is a solution to the following problem:
app.use(function (req, res, next) {
  setImmediate(function () {
    // some async activity fails
    next(new Error())
  })
  setImmediate(function () {
    // user has logic error that didn't stop the processing
    // so a second next() occurs thinking successful
    next()
  })
})

So the issue I'm trying to think of how to handle better is that second next() call, after an error occurs. Right now it breaks really odd, and of course is all silent about how that happens. It basically will re-enter into the middleware processing even after the res may have been written to because of the error handling, resulting in those annoying "can't send headers" errors at best, silent race conditions at worse.
What is your take on a solution? How do Promises handle the situation?

new Promise((resolve, reject) => {
	setImmediate(() => {
		reject(new Error());
	});
	setImmediate(() => {
		resolve();
	});
})
	.then(() => {
		console.log("then");
	})
	.catch(e => {
		console.log("catch", e);
	});

says
catch Error
    at Immediate.setImmediate (~/test.js:3:10)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

so just skip second call completely and put a warning to console
Callback called more than once.


tbac patch secret  without command does.. something

It's not clear to me what this does in terms of modification:
kubectl tbac patch secret fix-time-default-default
secret/fix-time-default-default modified

Should this not be an error presenting the commands?

Yes, this should be fixed. What it does is that it sends a patch with the same data. We should add a check to require an update on the patch command and exit if it doesn't contain an update.


/signin does not pass through any redirect URL

I am using oauth2_proxy with nginx + auth_request. But, virtually always, the callback success drops me on / rather than on the actual place I was originally going.
It doesn't seem like the X-Auth-Request-Url header is being handled correctly possibly, or at least the handoff between the sign_in and start doesn't seem to work.
The only way I've gotten this to work is by making the 401 redirect to https://auth.mydomain.tld/oauth2/start?rd=https://whatever.mydomain.tld/realpath (note that it says start instead of sign_in.)

Works for me. How much did your initial attempt differ from
  location /oauth2/ {
    proxy_pass       http://<IP_ADDRESS>:4180;
    proxy_set_header Host                    $host;
    proxy_set_header X-Auth-Request-Redirect $request_uri;
  }

  location / {
    auth_request /oauth2/auth;
    error_page 401 = /oauth2/sign_in;
    ... serve actual content ...
  }

(notice X-Auth-Request-Redirect instead of X-Auth-Request-Url as you wrote)

Hi,
I'm using kubernetes nginx ingress with signin-url points to bot /start and /sign_in I do not get to the original URL either.

For me /sign_in would not work, but /start did. (I'm using my own fork of #464.)

I had the same problem with a redirection from https://auth.example.com to https://app.example.com and I spent whole day solving it.
The problem was in following lines of code:
https://github.com/bitly/oauth2_proxy/blob/a94b0a8b25e553f7333f7b84aeb89d9d18ec259b/oauthproxy.go#L565-L567
When oauth2_proxy receives callback it checks the redirect URL to be relative own domain. Seems to be it done for security reasons. But anyway there are at least two PRs(#461, #464) that created to solve this problem and none of them not merged yet.
For now, the only solution is to apply one of the PRs by hand to HEAD and build a binary.
P.S.
If you are using docker containers you can temporarily use alikhil/oauth2_proxy:2.2.2 image which I build for myself from own fork.

You my friend @alikhil are a legend, thanks


Generate component / Adding component error issue

When adding component with add-components or generating project, when installing one of tje components, sends error, nothing is being appended to components.js. (it is installed to node_modules, but not appended to components.js)

This issue is already resolved. Can't reproduce.


fix(app): add optional description icon to dropdownMenu

closes AUTH-311
Overview
Add a description icon with a description tooltip to choices dropdown menu for RTP.
Test Plan
Upload the protocol attached to the ticket's comment and see that there is an icon with a tooltip which matches the description text in the parameters slideout for desktop app
Changelog

extend DropdownMenu to include an optional tooltip text which renders an icon and tooltip
add tooltip text prop to the slideout

Review requests
see test plan
Risk assessment
low

lgtm
if you can add a test for this tooltip, that will be great. (or make a ticket)

i'll make a new ticket! @koji


Fix property PageCount

Change the Page Count property to public.
What does the pull request do?

Changes the PageCount property from private to public
What is the current behavior?

The property does not have to be private.
What is the updated/expected behavior with this PR?

Getting data in the ViewModel.
Checklist

[ ] Added unit tests (if possible)?
[ ] Added XML documentation to any related classes?
[ ] Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentation

Breaking changes

Obsoletions / Deprecations

Fixed issues

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: dot-pulsar sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@dot-pulsar why do you need this property? I am not sure if DataGrid works with paging at all.

Going to close this as we've had no reply from the submitter and I think @maxkatz6 is correct in that it's not supported anyway.


[FLINK-5214] Clean up checkpoint data in case of a failing checkpoint operation

Adds exception handling to the stream operators for the snapshotState method. A failing
snapshot operation will trigger the clean up of all so far generated state resources.
This will avoid that in case of a failing snapshot operation resources (e.g. files) are
left behind.

Thanks for the review @StefanRRichter. I'll address your comments and then merge this PR.


Tests are broken when minitest 5.19 is used

There was an update to Minitest that broke great_expectations gem which we have dependency on.
Likely solution is to use pure minitest expectations by dropping archived great_expectations gem.
At the moment minitest is locked at v5.18.1 to make tests work.

For the time being, I've unlocked the minitest version and added require 'minitest/unit' to test_helper.rb as a temporary workaround during  recent update.

closing this issue with workaround fix above


prevents truncation of long symbolic links when unpacking

Unpacking tar archive which contains symbolic links with long names produces broken links as long names get trancuted. This PR fixed issue for me.
Even worse the error get's not detected during unpacking. symlink(&src, &path) does not report error even if src does not exist.
Don't know if it will be ok to add check if src exist at time when symlink get created, because may be targeted src file is not yet unpacked. But would be nice to have some inegrity check (checksum ?) of unpacked archive as it leads to strange (and time consuming) errors.

Merged. Thanks!

Don't know if it will be ok to add check if src exist at time when symlink get created, because may be targeted src file is not yet unpacked.

I'm not sure this is possible or desirable. As it's often fine if symlinks point to external files. And I don't think there is a way to check checksums over the actual unpacked files.
This is just a bug in our codebase, though, misusing the API. So I don't think we should have any deep changes because of it.
However, it may help to update a docstring of the Header::link_name in the tar crate to clearly indicate that it may return broken link names (or emit error?), because I remember I've fixed similar bug somewhere. (And maybe the unbroken API is newer than the usage in vagga, I'm not sure).


How do I get instructor to not edit optional attributes in the response model output

from openai import OpenAI
from instructor import from_openai
from pydantic import BaseModel, Field
from typing import Optional

client = from_openai(OpenAI(api_key=...))

class Grade(BaseModel):
    grade: str
    reasoning: str
    numeric_grade: Optional[float] = Field(None, exclude=True)

message = client.messages.create(
    model="gpt-4o-mini",
    response_model=Grade,
    messages=[
        {
            "role": "system",
            "content": "You are an expert grader evaluating document relevance and requirements."
        },
        {
            "role": "user",
            "content": "Grade this document against this query: ...",
        },
    ],
    max_retries=2,
)

I want message.numeric_grade to be set to None (and this should be clearly communicated by the fact that I used pydantic to signal that it ought to be excluded, but the model will still sometimes fill in it's own value for that attribute. How do I disable this completely? Does instructor have some way to handle these optional attributes? I tried a bunch of things, and nothing seems to work.

Instructor will make a Grade.model_json_schema() for the model to infor the model of the output forma you need.
Grade.model_json_schema() = {'properties': {'grade': {'title': 'Grade', 'type': 'string'},
  'reasoning': {'title': 'Reasoning', 'type': 'string'},
  'numeric_grade': {'anyOf': [{'type': 'number'}, {'type': 'null'}],
   'default': None,
   'title': 'Numeric Grade'}},
 'required': ['grade', 'reasoning'],
 'title': 'Grade',
 'type': 'object'}

which does not prevent the model to put something in that field. To enforce the fact that the model does not see that field, use SkipJsonSchema
SkipJsonSchema, By wrapping the type hint with SkipJsonSchema, you tell Pydantic to completely omit this field from the JSON schema that instructor uses to build the prompt and guide the LLM's response.
Try this out :

from openai import OpenAI
from instructor import from_openai
from pydantic import BaseModel, Field
from typing import Union
from pydantic.json_schema import SkipJsonSchema

client = from_openai(OpenAI(api_key="..."))

class Grade(BaseModel):
    grade: str
    reasoning: str
    numeric_grade: SkipJsonSchema[Union[float, None]] = None # Correct way to make it optional

message = client.messages.create(
    model="gpt-4o-mini",
    response_model=Grade,
    messages=[
        {
            "role": "system",
            "content": "You are an expert grader evaluating document relevance and requirements."
        },
        {
            "role": "user",
            "content": "Grade this document against this query: ..." # Replace with actual document and query
        },
    ],
    max_retries=2,
)

print(message)

Thanks that finally solved my problem!


Uncaught TypeError: Cannot read property 'style' of undefined

[Enter steps to reproduce:]

...
...

Atom: 1.14.4 x64
Electron: 1.4.15
OS: "Arch Linux"
Thrown From: linter-js-standard package 3.9.0
Stack Trace
Uncaught TypeError: Cannot read property 'style' of undefined
At /home/edar/.atom/packages/linter-js-standard/lib/init.js:111

TypeError: Cannot read property 'style' of undefined
    at Object.__cacheTextEditor (/packages/linter-js-standard/lib/init.js:111:18)
    at storeSettings (/packages/linter-js-standard/lib/init.js:79:14)
    at Function.module.exports.Emitter.simpleDispatch (/usr/lib/atom/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/usr/lib/atom/node_modules/event-kit/lib/emitter.js:129:28)
    at /usr/lib/atom/src/pane-container.js:348:27
    at Function.module.exports.Emitter.simpleDispatch (/usr/lib/atom/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/usr/lib/atom/node_modules/event-kit/lib/emitter.js:129:28)
    at Pane.module.exports.Pane.setActiveItem (/usr/lib/atom/src/pane.js:300:22)
    at Pane.module.exports.Pane.activateItemAtIndex (/usr/lib/atom/src/pane.js:435:19)
    at Pane.module.exports.Pane.activatePreviousItem (/usr/lib/atom/src/pane.js:400:21)
    at Pane.module.exports.Pane.removeItem (/usr/lib/atom/src/pane.js:585:16)
    at Pane.module.exports.Pane.destroyItem (/usr/lib/atom/src/pane.js:658:16)
    at TabBarView.module.exports.TabBarView.closeTab (/usr/lib/atom/node_modules/tabs/lib/tab-bar-view.js:333:26)
    at HTMLDivElement.TabView.didClickCloseIcon (/usr/lib/atom/node_modules/tabs/lib/tab-bar-view.js:222:19)

Commands
     -9:20.7.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-fusion-syntax.theme-one-dark-ui)
     -9:14.1.0 editor:join-lines (input.hidden-input)
     -9:07.8.0 settings-view:open (input.hidden-input)
  2x -8:59.9.0 core:confirm (input.hidden-input)

Non-Core Packages
advanced-open-file 0.16.5
angular-2 0.2.6
angular-2-typeScript-snippets 0.6.3
angular-bootstrap 1.0.1
angular-restful-snippets 0.14.0
angular2-snippets 0.3.0
angularjs 0.4.0
angularjs-snippets 0.10.18
atom-beautify 0.29.17
atom-bootstrap3 1.2.12
atom-bootstrap4 1.4.0
atom-dark-fusion-syntax 2.0.3
express-complete 0.2.0
autocomplete-angular-material 0.4.0
autocomplete-modules 1.6.7
cdn-libs 0.1.2
color-picker 2.2.5
css-snippets 1.1.0
emmet 2.4.3
expressjs 1.2.0
file-icons 2.0.16
flexbox-snippets 0.3.0
git-plus 7.3.3
git-plus-plus 1.1.0
hyperclick 0.0.40
js-hyperclick 1.10.1
js-hyperx 1.1.0
js-refactor 0.7.5
language-babel 2.55.6
language-graphql 0.8.0
language-html-angular 1.0.16
language-mongodb 0.3.1
less-autocompile 1.0.0
linter 1.11.23
linter-eslint 8.1.2
linter-js-standard 3.9.0
linter-less 2.6.0
linter-sass-lint 1.7.4
linter-stylelint 3.9.0
minimap 4.26.8
minimap-autohide 0.10.1
minimap-highlight-selected 4.5.0
path-hyperclick 0.3.0
pigments 0.39.0
platformio-ide-terminal 2.3.1
refactor 0.11.3
rest-client 1.3.1
smart-daemon-control 0.8.7
template-generator 0.15.0
todo-show 1.11.0

Hey @edarblanco some steps to reproduce would be cool.

Oh, my apologies, but apparently I solved the problem precisely today, I deleted the configuration folder of the plugin and to reinstall it everything was perfect, I give the thread as closed, thanks

I have just had the same issue with Atom v1.14.4 on macOS. To reproduce:

touch foo.js
atom foo.js
Type something into foo.js but do not save the file
Open another tab, for example Settings
rm foo.js
Switch back to foo.js in Atom

This mostly happens to me when I switch between branches.  I'll leave files open (in background tabs) that do not exist on another branch, and if I switch back to one of those tabs (manually or just when closing other tabs and they are supposed to come to the foreground) I run into this issue.

Yep I just got the same issue too
[Enter steps to reproduce:]

I just opened my editor via atom .. I did have other instances of atom already open for different directories. Worth nothing that this was not a standardlinted project (just regular eslint) so I would not have expected anything from standard.

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Mac OS X 10.11.6
Thrown From: linter-js-standard package 3.9.0
Stack Trace
Uncaught TypeError: Cannot read property 'style' of undefined
At /Users/rankida/.atom/packages/linter-js-standard/lib/init.js:111

TypeError: Cannot read property 'style' of undefined
    at Object.__cacheTextEditor (/packages/linter-js-standard/lib/init.js:111:18)
    at storeSettings (/packages/linter-js-standard/lib/init.js:79:14)
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at /app.asar/src/pane-container.js:348:27
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at Pane.module.exports.Pane.setActiveItem (/app.asar/src/pane.js:300:22)
    at Pane.module.exports.Pane.activateItem (/app.asar/src/pane.js:452:21)
    at TabBarView.module.exports.TabBarView.onMouseDown (/app.asar/node_modules/tabs/lib/tab-bar-view.js:678:19)

Commands

Non-Core Packages
atom-beautify 0.29.17
atom-typescript 11.0.1
busy-signal 1.3.0
intentions 1.1.2
linter 2.1.0
linter-eslint 8.1.4
linter-js-standard 3.9.0
linter-ui-default 1.2.1
platformio-ide-terminal 2.5.0
react 0.16.2

I repro'd this when I renamed a dir and touched files in atom with pathnames that did not exist (after the move).

When the file does not exist checkStyleSettings ignores the error, and returns undefined:
https://github.com/ricardofbarros/linter-js-standard/blob/60643d80615f9f1133dc71370575ad2f25e29932/lib/utils/style-settings.js#L41
Which causes opts to be undefined here:
https://github.com/ricardofbarros/linter-js-standard/blob/60643d80615f9f1133dc71370575ad2f25e29932/lib/init.js#L108
Which causes Cannot read property 'style' of undefined here:
https://github.com/ricardofbarros/linter-js-standard/blob/60643d80615f9f1133dc71370575ad2f25e29932/lib/init.js#L111

I get this error whenever I checkout a new branch with git.  Atom suddenly randomly marks some tabs as unsaved and throws gazillions of these errors.

@ricardofbarros will you please re-open this issue. It is definitely an active bug and there is now explicit steps to reproduce it.

Now this is my solution, save the atom package list, and remove or save in another location the atom packages  configuration, and install with apm install the list of all the packages, for my work, but my problem was one package outdated

My steps to reproduce:

Create x.js
Rename x.js to y.js
Open y.js
Select the x.js tab

@alancnet Yes, I've frequently gotten that error doing similar actions.
But strangely I just tried it and couldn't manage to cause the error.  Atom picked up the change immediately.
Maybe we're dealing with a sketchy file watcher here?

I can reproduce the error by deleting a file that Atom currently has open in an inactive tab, then switching to the tab.
To eliminate as much unpredictability as possible, here is a command line that will generate the error 100% of the time.
touch foo.js && touch bar.js && atom foo.js && sleep 10 && rm foo.js && atom bar.js

Now just click back on the tab for foo.js and you'll see the error.  At least I do, on Mac OS 10.12.4.

Create a new file and switch from, then switch to, the new file. Since atom hasn't created the file in the filesystem yet (because it hasn't yet been saved), this error will be thrown

Got the issue too....

I ended up switching to prettier

come on, when will this be fixed??

if i submit a pr would you accept it?

I'll install from your fork if it doesn't get merged.

This bug is very reproducible when trying to edit JSX files with a .js extension. It makes atom unusable in fact since it pops up every time you try to switch tabs. Uninstalled linter-js-standard and installed prettier

likewise, switched to prettier

I have this problem too.
Almost 5 months, a lot of angry users and no reaction from the maintainer? Bad impression... 👎

This will be fixed in an upcoming patch version.

Released in v3.9.2 🎉


sections: add Section#type? and Section#attribute?

These two predicates replace the Section#flag? predicate, which
has unintuitive behavior and is now deprecated.
Closes #423.

cc @iOS-Developer-Sun let me know if these changes work for you.


Prevent hanging due to cPickle serialization

Resolves #1503
Skipping the automatically triggered CI test since this PR will add a new CI target. The first build with this target should fail after detecting the current usages of cPickle without HIGHEST_PROTOCOL, and the second commit I add will fix those usages.

jenkins, test this please

jenkins, test this please

jenkins, test this please

Failed as expected:  http://jenkins.cgcloud.info/job/toil-pull-requests/2604/console


Training with Keras.metrics is giving the correct number of true negatives and false negatives, but 0 for true positives and false positives

Please go to TF Forum for help and support:
https://discuss.tensorflow.org/tag/keras
If you open a GitHub issue, here is our policy:
It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead).
The form below must be filled out.
Here's why we have that policy:.
Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information.

Have I written custom code (as opposed to using a stock example script provided in Keras):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
TensorFlow installed from (source or binary):
TensorFlow version (use command below):
Python version:
Bazel version (if compiling from source):
GPU model and memory:
Exact command to reproduce:

You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the problem.
Describe the problem clearly here. Be sure to convey here why it's a bug in Keras or why the requested feature is needed.
Describe the current behavior.
Describe the expected behavior.
I have imbalanced data with images and their binary classes (ratio of pos/neg is 6%). I loaded my images as list of images, binary labels from a data frame as a list of values, converted both to numpy array, then used few metrics from Keras.metrics trying to monitor precision. I followed tutorial from Tensorflow on 'credit fraud detection', I used exactly the activation function 'sigmoid', loss function 'BinaryCrossentropy', but I have been getting 0 values for true positive and false positives, so precision can't be calculated. I get it the other way round if I choose 'softmax' activation, I will appreciate some help. Thanks.
Contributing.

Do you want to contribute a PR? (yes/no):
If yes, please read this page for instructions
Briefly describe your candidate solution(if contributing):

Standalone code to reproduce the issue.
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
This is a link to my GitHub repository, the code I'm working on is in file 'test_keras.py'
To reproduce the issue I will need to provide the images, but they are large dataset medical images with ethical approval restriction for research, so I wonder if advice can be given without sending the images across:
https://github.com/drskaf/Stress-Perf-Classifier.git
Source code / logs.
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
This is a snippet of the training log:
Epoch 1/100
66/66 [==============================] - 73s 1s/step - loss: 0.8304 - tp: 0.0000e+00 - fp: 0.0000e+00 - tn: 1987.0000 - fn: 113.0000 - accuracy: 0.9462 - precision: 0.0000e+00 - recall: 0.0000e+00 - auc: 0.5000 - prc: 0.0538 - val_loss: 0.8227 - val_tp: 0.0000e+00 - val_fp: 0.0000e+00 - val_tn: 852.0000 - val_fn: 48.0000 - val_accuracy: 0.9467 - val_precision: 0.0000e+00 - val_recall: 0.0000e+00 - val_auc: 0.5000 - val_prc: 0.0533

Hi @drskaf,
It looks like your model is just outputting zeros everytime. If you look at the accuracy:
1987 / 2100 = 0.9462
Basically everything is classified as class 0, that's why you see tp: 0.0000e+00 - fp: 0.0000e+00 - tn: 1987.0000 - fn: 113.0000.

Thanks,
But why is this behaviour?
I have label arrays of [0]s and [1]s, I choose BinaryCrossentropy as per tutorial, and 'sigmoid' function, the output of the model predicts series of arrays in the shape of [float], but Keras.metrics outputting only zeros as you mentioned. Does that mean I have to make my labels as one array per batch size instead of series of arrays to make the metrics work on both zeros and ones?

@drskaf
This is expected behaviour as model do not predict class 1, the predicted classes by model are just class 0s. Might be related to model or data, you need to consider different strategies for training.

After changing my image loading function to make images a column in the data frame containing the labels, then creating 2d NumPy array from the images using: X_train = np.array([np.array(x) for x in df_train['images']]), and taking the labels out of the data frame: y_train = np.array(df_train.pop(args["target"])) I managed to get all tp, fp, tn, fn in the first epoch, but not been able to get them on the validation set or from 2nd epoch onwards. I will be grateful for any comments as I don't understand the behaviour of BinaryCrossentropy with my model? thanks
Here is a snippet of first 2 epochs:
Epoch 1/100
33/33 [==============================] - 70s 2s/step - loss: 0.5887 - tp: 4.0000 - fp: 60.0000 - tn: 1927.0000 - fn: 109.0000 - accuracy: 0.9195 - precision: 0.0625 - recall: 0.0354 - auc: 0.4962 - prc: 0.0543 - val_loss: 0.2195 - val_tp: 0.0000e+00 - val_fp: 0.0000e+00 - val_tn: 852.0000 - val_fn: 48.0000 - val_accuracy: 0.9467 - val_precision: 0.0000e+00 - val_recall: 0.0000e+00 - val_auc: 0.5000 - val_prc: 0.0533
Epoch 2/100
33/33 [==============================] - 69s 2s/step - loss: 0.2204 - tp: 0.0000e+00 - fp: 0.0000e+00 - tn: 1987.0000 - fn: 113.0000 - accuracy: 0.9462 - precision: 0.0000e+00 - recall: 0.0000e+00 - auc: 0.5000 - prc: 0.0538 - val_loss: 0.2182 - val_tp: 0.0000e+00 - val_fp: 0.0000e+00 - val_tn: 852.0000 - val_fn: 48.0000 - val_accuracy: 0.9467 - val_precision: 0.0000e+00 - val_recall: 0.0000e+00 - val_auc: 0.5098 - val_prc: 0.0676

After waiting for more than 20 epochs, I was getting all values and the model just needed some time to learn, so I think all is good now!
Thanks

Hi @drskaf,
Kindly close the issue if your problem is solved.


Support for bumping pyright version using dependabot

Thanks for a great action,
It would be nice to be able to pin the pyright version used but have in automatically upgraded. Would it be possible to specify the version of pyright in a package.json file or similar such that dependabot or similar tool automatically can update the version when a new pyrigth version is released. Could this be possible?

That's an interesting idea, though I don't quite know I feel about Python projects sticking package.json and package-lock.json into their repos and then not using them for anything but pyright.
It doesn't look like dependabot is adding any new ecosystems either, so I don't have the opportunity to encode this elsewhere.
Maybe it'd be possible to pin via the pyright PyPI package (and detect that it's already installed in PATH), if that's something you might find more reasonable.

@jakebailey I guess that could work. I have been trying to avoid using the pip version to not pull in an extra node environment within my pip install.

I don't quite know I feel about Python projects sticking package.json and package-lock.json into their repos and then not using them for anything but pyright.

Agree that's not the greatest. It would be better if the files could have a less generic name. As a partial mitigation I guess its possible to have the file in another location than the root to make this less confusing such as .github/pyright/package.json ?
This should work since dependabot can be configured to look in multipel directories

Yes, I would expect the user want to specify the full version since it in my experience is fairly common for typechecking to change between 2 patch versions causing new errors

That preset only works for vars that end in _VERSION, but here's a working example:

https://github.com/jakebailey/pyright-action-renovate-test
https://github.com/jakebailey/pyright-action-renovate-test/pull/4

It doesn't look like dependabot is adding any new ecosystems either, so I don't have the opportunity to encode this elsewhere.

Looks like this is now Contributing new ecosystems

Yeah, though I'm not totally sure what it'd look like 😄
I'm tempted to just add support for reading the version out of a package.json, as originally suggested. That's what we do in TypeChat: https://github.com/microsoft/TypeChat/blob/main/python/package.json#L12

So, just wanted to weight in: I'm using this action, and also the pre-commit hook from https://github.com/RobertCraigie/pyright-python (the python package wrapper over the pyright package, that is listed in the pyright doc as the way to go.
Do you think there could be a way to ensure that the pyright version used by both system is the same AND is updated by renovate/dependabot ? Given the way pre-commit works, I'm enclined to say the only way I see would be to extract the version from pre-commit with:
$ yq '.repos | filter(.repo == "https://github.com/RobertCraigie/pyright-python").0.rev | "pyright-version="+sub("^v", "")' >> $

(yq is pre-installed on GHA)
So I'd need a step for that, and then use
- uses: jakebailey/pyright-action@v1
  with:
    version: ${{ steps.<id>.outputs.pyright-version }}

Is there a better way or should this be the way ? If so, should it be documented as such ?

@jakebailey Given that you now support using an installed version from PATH (and thanks for that) I think we can safely close this issue. The user is free to manage installation of pyright in a way that they see fit, which can then be updated using dependabot or a similar tool

Yes, I agree!
There is still #98, where parsing a version and passing it in may still be valuable, but I think the verison: PATH method is not too bad if you're willing to pull in the PyPI package.

@jakebailey FYI installing the version via NPM should also work fine. Here is an example that I hacked together of doing that https://github.com/microsoft/Qcodes/pull/5958

Indeed; though I largely think parsing it is going to be faster, slightly. I have this in TypeChat: https://github.com/microsoft/TypeChat/blob/f53b971179d0136424a75d67287903a2421af98b/.github/workflows/ci.python.yml#L52

@jakebailey Thanks for the tip. That is indeed a lot simpler and nicer


fails to build on some systems with SMP make flags

I just tried to build this on opensuse with quite a few parallel jobs. The project fails at linking stage of the tests, unable to find -lccl, I think because a dependency is missing in the buildsystem. I am not very familiar with autotools but will try to find it. The build succeeds in serial mode.
Not a major issue because it's a fast build anyway

Hey Dan! Do you mean doing thing like "make -j8"? In that case, one final "make" after that will solve the issue. Do you think this is a good enough solution?

Autotools has been deprecated. I am closing this issue. Feel free to reopen if you are still having trouble!


Fix text scale bug

Fix #10

Thanks for the pull request but I found a fix which still allowes custom scale.

I tried your last version and it not working for me: if custom scale is set (big size), and there is not enough space for text, then it simply does not fit (clip). Please check it. By the way, I did not remove the custom scaling option in the pull request.

Could you please provide a small sample which shows the issue?

Sorry, I tried it on an empty project and the latest version works fine. Thank you!

Perfect :)


Beta 3.0 cppbinding

support GetNodeHostInfo & HasNodeInfo

Codecov Report

Merging #82 into master will decrease coverage by 0.29%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #82      +/-   ##
==========================================
- Coverage   80.64%   80.35%   -0.28%
==========================================
  Files          12       12
  Lines        3491     3491
==========================================
- Hits         2815     2805      -10
- Misses        447      455       +8
- Partials      229      231       +2

Impacted Files
Coverage Δ

node.go
77.87% <0%> (-0.67%)
:arrow_down:

execengine.go
82.95% <0%> (-0.51%)
:arrow_down:

nodehost.go
77.01% <0%> (-0.21%)
:arrow_down:

Continue to review full report at Codecov.

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

Thanks for working on this. Merged.


Regression in commit 18b536f

Regression in items list pages.
 :( I was really hoping this wouldn't have any adverse effects.
@benrom Thanks for the report. I'm working on a refactor of the filter API that should alleviate ExAdmin assuming that the name field is actually a schema field. This should be done later today or tomorrow, sit tight...

@smpallen99 Feel free to assign this to me as well.

@benrom Just pushed a pull request that fixes this.

I'm on vacation. will look at it later in the week when I get back home.


Fix infinite wait on invalid label

Currently, if we use the lock step in a pipeline script, and refer to a non-existing label (e.g. label: 'invalidLabel'), and ask for some quantity of resource explicitly (e.g. quantity: 1) the step will wait indefinitely. I'm not talking about a label whose resources are all locked, but about a label that has no corresponding resource, even a locked one.
This is annoying when running pipelines on Jenkins instances that do not have the required resources available: in this case, one would much rather see the pipeline branch fail, so that we know that something is wrong immediately.
Note that, when configuring locked resources through the UI, non-existing labels are already forbidden.
This PR changes the behavior to fail the step execution in the event of a non-existing label.

I forgot to mention the infinite wait only happens when requesting a quantity of resources explicitly; I updated the test to request exactly 1 resource. You can see the job wait indefinitely by running mvn clean install on this branch, where I reverted my fix: https://github.com/yrodiere/lockable-resources-plugin/tree/infinite-wait-on-invalid-label

@abayer Hello! I see you performed the previous release, so I suppose you are the maintainer. Do you think this could be merged? If not, is there anything I can do to improve the PR?

Just a note: This seems to still be broken for FreeStyle jobs...


Focus does not move into the frame after navigating to one from a navigation view.

Describe the bug
After selecting an item in a navigation view, focus should move to the first focusable element inside the frame.  Instead focus stays in the navigation view.
Steps to reproduce the bug

Make a simple app with a navigation view and a frame.
Add a new page with a button.
Make a SelectionChanged event.
In the event, navigate to the page made earlier.

Expected behavior
Focus moves to the button inside the frame.
Screenshots
https://github.com/microsoft/microsoft-ui-xaml/assets/2517139/c8a2d75d-7bd8-4749-b4d5-68a847926808
NuGet package version
WinUI 3 - Windows App SDK 1.5.3: 1.5.240428000
Windows version
Windows Insider Build (xxxxx)
Additional context
No response

NavigationView has no knowledge of the Frame you are using, or if it is being used with a Frame at all. It merely reports user interactions and you are responsible for determining what to do with them.
If that means you call a method on Frame to display some content, then you need to decide what to do after that content loads. That might mean focusing on something in the Frame, but that is up to the developer and is not something NavigationView should try to figure out by making assumptions.


How to implement last of field defined as isArray: true

Hi, 1st:  great piece of work on fortunejs.
Not sure how to handle this:
i have changes defined as a field (isArray true) in a record type and would like to implement a lastChange field returning only the last one, what is the recommended way to do this:

Transform function ?
field with Function record type ? it is listed in the API doc but cannot find an example

Thanks in advance

A transform function would work here:
[ input, function output (context, record) {
  record.lastChange = record.changes[record.changes.length - 1]
  delete record.changes
  return record
} ]

There are tests that show how to use custom types: https://github.com/fortunejs/fortune/blob/a4260d8ee90aba3589b8b727f1043a62be2c8bd2/test/integration/adapters/memory.js#L62-L84
However, custom types are only implemented for the memory adapter so far, and mostly they serve as input validation, so it's not what you want.

excellent thanks.
if I may 2 further question:

is there a way to make this new field added by transform appear in the default html rendering
is transforms also the place to de-reference this field ? how would i go about having the found change object directly in lastChange ?

Thanks

Yes, you would have to add the new field into the record type definition. The reasoning is that the table headers are shown based on record type definitions, and type coercion to a string is done by reading the definition.
Yes, you could also de-reference it there.

Sorry for the additional questions, i really like the potential of your solution :

ok, I have added, lastChange: { link: 'change' }, yet in the /item/id/lastChange does not seem to use the id properly, the page list cahnge fields but no data. any clue ?

is there any code sample of dereferencing in the code repo ?

hmm, I would have to see your example to figure it out.
dereferencing should be as simple as:
function output (context, record) {
  return store.adapter.find(type, [ record.lastChange ])
  .then(records => {
    record.lastChange = records[0]
    return record
  })
}

If possible, an example of the 2 in the code and doc would really help.
And I think I would interested to see how it looks in the default renderer as well, as it is so great to explore data without having to build a dedicated UI.

Here's an example using the test data. You can run it yourself by pasting it into any project that requires fortune.
const http = require('http')
const instance = require('fortune/test/integration/test_instance')
const fortune = require('fortune')

instance()
.then(store => {
  store.recordTypes.user.lastFriend = { type: Object }

  const userOutput = store.transforms.user[1]

  store.transforms.user[1] = function (context, record) {
    return userOutput(context, record)
    .then(record => {
      if (record.friends)
        return store.adapter.find('user', [
          record.friends[record.friends.length - 1]
        ])
        .then(records => {
          record.lastFriend = records[0]
          return record
        })

      return record
    })
  }
  http.createServer(fortune.net.http(store)).listen(1337)
})

Excellent, dereferencing is clear, thanks!

Without dereferencing, how do i get the link to lastFriend to work in the default HTML rendering?

I have used the same example with:
`store.recordTypes.user.lastFriend = { link:'user' };
const userOutput = store.transforms.user[1]
store.transforms.user[1] = function (context, record) {
if(record.friends) {
record.lastFriend = record.friends[record.friends.length - 1]
}
return record;
}`
The link in user exists but when clicking on lastFriend, it does not show the user when following the link

The include doesn't work because the field is actually empty, it doesn't matter if it is set in the output transform. In order for it to work, you have to persist it, like so:
store.transforms.user[0] = function (context, record, update) {
  var friends

  switch (context.request.method) {
  case 'create':
    friends = record.friends
    break
  case 'update':
    friends = update.replace.friends
    break
  }

  if (friends) record.lastFriend = friends[friends.length - 1]

  return update || record
}

ah ok, thanks !


Should version be showing 23.2 from the UI

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

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

Superset version
23.2
Expected results
{"GIT_SHA": "", "version": "0.23.2"}
Actual results
{"GIT_SHA": "", "version": "0.22.1"}
Steps to reproduce
. ./venv/bin/activate
pip install superset --upgrade
superset db upgrade
superset init
Just clicked on the UI show version.
Did I miss a step in the upgrade process?

reran and refresh and it shows correctly. I must have missed a step.


Removed data length check

I removed the data.length check because it was removing the PrimaryToolbar when filtering returned zero images.

Closing this as it was fixed here: https://github.com/RedHatInsights/edge-frontend/pull/101


Create Application class in application package and run it from Main

Since Main is our application entry point I think it we should move game loops and other game code into a class called Application or SailingGame maybe, when then make Main class create an object of this class and use something like a .run() method to start it.
I think this looks much nicer and its makes it a little bit easer to make changes to the application without changing the application entry point.
@0-Gixty-0  What do you think about this?

Closing this issue as it was discussed irl


Group changes

For channels and subscriptions, group is changed from eventing.knative.dev to messaging.knative.dev

cc @kameshsampath


HTAN: investigate OpenLayer for applying color functions to the layers on GPU

this is a spike ticket regarding https://github.com/OHIF/Viewers/issues/2153. The idea here is to report the first investigations to understand what it is necessary for applying the coloring for an OpenLayer tile.
Possible ways:
A) (CPU) using the callback function in OpenLayers of postrender. Then modifying the rendered tile pixel by pixel.
B) (CPU) by applying an operation on rasterSource (e.g. https://openlayers.org/en/latest/examples/color-manipulation.html)
C) (GPU) adding the color function parameters (color, min, max) to the Layer object and update the relevant webgl code.

(A) is not a viable solution, it allow to modify only the resulting pixel of the cavas after the blending (blending done with https://github.com/OHIF/Viewers/issues/2158#issuecomment-725363650) and not the rendered pixel per layer

(B) the dicom-microscopy-viewer uses tileImage as source (https://github.com/MGHComputationalPathology/dicom-microscopy-viewer/blob/master/src/viewer.js#L738) which does not seem to have in the api the operation worker to modify the image pixels as https://github.com/openlayers/openlayers/blob/main/src/ol/source/Raster.js#L47. Also perfomance are not great (try https://openlayers.org/en/latest/examples/color-manipulation.html)

(C) Currently the tileLayer rendering is done with https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage in line https://github.com/openlayers/openlayers/blob/6b0471c2dc32453122c4acff94e6529407a55f4e/src/ol/renderer/canvas/TileLayer.js#L481
It would be nice to have a webGL render and defining a webglpostprocessingpass for the coloring https://openlayers.org/en/latest/apidoc/module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html (see also  https://openlayers.org/en/latest/apidoc/module-ol_webgl_Helper-WebGLHelper.html). In this way one can define custom shaders for any coloring function (it would be great for using any very fast image processing tool, e.g., smoothing).
but there is only one webGLrender and it is for vector points:
https://github.com/openlayers/openlayers/blob/6b0471c2dc32453122c4acff94e6529407a55f4e/src/ol/renderer/webgl/PointsLayer.js
it seems that other WebGL renders support has been droppend in favor of canvas 2D api.
Therefore, a CPU solution (something like the rasterSource pixels operation in B) is the only approachable one.

Since (A), (B) and (C) are not viable solutions, a CPU solution is the only approachable one and by using an offscreen canvas (e.g. link1 and link2), draw the image in the offscreen, apply color function (e.g. https://github.com/Punzo/dicom-microscopy-viewer/blob/032aa53f7b97d4635c7c371e2d7ecaa14a82e62d/src/viewer.js#L420-L449) and finally compose the offscreen canvas on the original one for blending (by using the composite operation).
steps to do:

add color, min and max parameters to the Tile objects
add a bool parameter to enable pixel manipulation with the color function to the TileLayer objects
add draw on an offscreen canvas, color  manipulation and finally copying the result in the screen canavs in the openlayer CanvasTileLayerRenderer. Draw is called here


Autoscale geometries

Currently if we have a relative Box, we need to manually rescale it by the image in order to draw it:
img | [box * (row.height, row.width) for box in row.annotations]
Instead we should consider:

Indicate whether a Box or Polygon is in relative or absolute space.
Add a property in Image to retrieve the shape
Automatically rescale the geometry when drawing

@Renkai if you're looking for something to tackle, this is a good one

One alternative to adding an attribute is we could consider creating a RelativeGeometry mixin that has functionality to autoscale. Then we just create Relative* subclasses of * Geometry classes with the RelativeGeometry mixin added and (hopefully) nothing else.
Thoughts? @eddyxu ?

@changhiskhan
Sounds interesting, but I have some questions.

What is Add a property in Image to retrieve the shape?
What is the mixin here? In Scala, I think it's trait, but in Python, I'm not sure what is a proper way to implement mixin.

And can you address some links to the key classes or files on how we implement the box draw mechanism in the current code base?

Key python file: https://github.com/eto-ai/rikai/issues/488

Mixin: https://github.com/eto-ai/rikai/blob/main/python/rikai/mixin.py
https://github.com/eto-ai/rikai/blob/fed57cd7d22b520b87c1a6693850916051ba9331/python/rikai/types/vision.py#L44
Rikai Image depends on Mixins heavily.

Here is a related issue: https://github.com/eto-ai/rikai/issues/523
These DSL should be designed at the very beginning. And then we start to implement it.

I found that the box2d returned by AWS Rekognition (e.g. recognize celebrities) is relative box2d.


Added tf_logging for deprecated 'experimental_run_v2' (Tf 1.x)

To resolve PR #49187 , by providing logging messages for  deprecated 'experimental_run_v2'  in Tf 1.x

Hi @mihaimaruseac ,
could you please specify the changes required in this case?  This PR was for adding a logging message regarding the tf version specification.

But why add the logging messages? We don't add these messages to the other deprecated APIs

See also https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/util/deprecation.py

Hi,
Thanks for the link, I think the 'tf_logging' can be done away with, and those can be replaced with the @depricated decorator instead?
For instance:
@doc_controls.do_not_doc_inheritable  # DEPRECATED, moving to `extended`
@deprecated(None,'use extended.colocate_vars_with() instead.')
 def colocate_vars_with(self, colocate_with_variable):
      """DEPRECATED: use extended.colocate_vars_with() instead."""
      return self._extended.colocate_vars_with(colocate_with_variable)

Thanks

I have added the deprecated decorators ,please let me know if any changes are required

Adding Ran to review the distrstrat changes

Reverted the decorator changes for TF1.x Strategy objects , please let me know if any changes are required.

Hi @crccw  @mihaimaruseac , I see that after merging the master in my remote, google butler removed the ready to pull tag. Can the tag be re-assigned?

Resolved spaces, let me know if any other changes required.


New deployed 3bot not accessible on presented IP

3bot ID: weynandkuijpers
deployed 3bot: botcomettoo
Deployed new 3bot called ```botcomettoo``

Downloaded the wireguard config but cannot connect to the presented IP (with the wireguard tunnel enabled / on:
john@RescuedMac:~/opt/wireguard$ sudo wg-quick up ./botcomettoo.conf
[sudo] password for john:
Warning: `/home/john/opt/wireguard/botcomettoo.conf' is world accessible
[#] ip link add botcomettoo type wireguard
[#] wg setconf botcomettoo /dev/fd/63
[#] ip -4 address add <IP_ADDRESS>/32 dev botcomettoo
[#] ip link set mtu 1420 up dev botcomettoo
[#] ip -4 route add <IP_ADDRESS>/32 dev botcomettoo
[#] ip -4 route add <IP_ADDRESS>/16 dev botcomettoo
john@RescuedMac:~/opt/wireguard$ ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
^C
--- <IP_ADDRESS> ping statistics ---
148 packets transmitted, 0 received, 100% packet loss, time 150115ms

john@RescuedMac:~/opt/wireguard$ sudo wg
interface: botcomettoo
  public key: 6sNCwS84iwHZCMFG2FmW3krcjCtYckJiXGa4NswtICQ=
  private key: (hidden)
  listening port: 34197

peer: c8XxVdzwkfJ94tIp2k10sHArhzDYsRU6qRtWICVJU1E=
  endpoint: <IP_ADDRESS>:5062
  allowed ips: <IP_ADDRESS>/16, <IP_ADDRESS>/32
  transfer: 0 B received, 4.62 KiB sent
  persistent keepalive: every 25 seconds
john@RescuedMac:~/opt/wireguard$
john@RescuedMac:~/opt/wireguard$ ssh<EMAIL_ADDRESS>

@delandtj @LeeSmet any idea on this?

the wireguard info shown here does not match what was generated and stored on the deployer
root@threebot-deployer:~/sandbox/cfg/wireguard# cat weynandkuijpers_botcomettoo_test_management.conf

[Interface]
Address = <IP_ADDRESS>/32
PrivateKey = L+pCktfRoW+CAQcpHXFOOjf8IgOsKteJFZmQ1L5r3kg=
[Peer]
PublicKey = Kk056+kb0ZkKbCjw/Uoua/VU0XVtcPA6jDui/zLCK3I=
AllowedIPs = <IP_ADDRESS>/16, <IP_ADDRESS>/32
PersistentKeepalive = 25
Endpoint = <IP_ADDRESS>:8803root@threebot-deployer:~/sandbox/cfg/wireguard# ls -l weynandkuijpers_botcomettoo_test_management.conf
-rw-r--r-- 1 root root 260 Feb  1 11:35 weynandkuijpers_botcomettoo_test_management.conf
root@threebot-deployer:~/sandbox/cfg/wireguard#

is that the latest downloaded config ?

yes - I downloaded the file and copied it.  But in order to prove that is not an old file:  did it again and took screen recording:
https://user-images.githubusercontent.com/13766992/106555975-04522b80-6538-11eb-9565-f535fdc06df7.mp4
so new wireguard config and it does not allow connections.

Cannot ping the endpoint:
john@RescuedMac:~/Downloads$ ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
From <IP_ADDRESS> icmp_seq=1 Destination Host Unreachable
From <IP_ADDRESS> icmp_seq=2 Destination Host Unreachable
From <IP_ADDRESS> icmp_seq=3 Destination Host Unreachable
From <IP_ADDRESS> icmp_seq=4 Destination Host Unreachable
^C
--- <IP_ADDRESS> ping statistics ---
11 packets transmitted, 0 received, +4 errors, 100% packet loss, time 10198ms
pipe 5

@weynandkuijpers please navigate to the 3bot dashboard, list your networks, select the management network and add the workload_ids here.

Issue solved:
john@RescuedMac:~/opt/wireguard$ sudo wg-quick up ./cometjetser.conf
Warning: `/home/john/opt/wireguard/cometjetser.conf' is world accessible
[#] ip link add cometjetser type wireguard
[#] wg setconf cometjetser /dev/fd/63
[#] ip -4 address add <IP_ADDRESS>/32 dev cometjetser
[#] ip link set mtu 1420 up dev cometjetser
[#] ip -4 route add <IP_ADDRESS>/32 dev cometjetser
[#] ip -4 route add <IP_ADDRESS>/16 dev cometjetser
john@RescuedMac:~/opt/wireguard$ ssh<EMAIL_ADDRESS>The authenticity of host '<IP_ADDRESS> (<IP_ADDRESS>)' can't be established.
ECDSA key fingerprint is SHA256:s0NXVN0MF3K1S2Wfj7kTgBysCmiJZoxvpIFOTvQktwg.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '<IP_ADDRESS>' (ECDSA) to the list of known hosts.
root@zosv2tst-09:~#
root@zosv2tst-09:~# ls -al
total 4
drwx------ 1 root root   84 Feb  2 04:36 .
drwxr-xr-x 1 root root   52 Feb  2 04:36 ..
-rw-r--r-- 1 root root 3423 Feb  2 04:36 .bashrc
drwxr-xr-x 1 root root   20 Feb  2 04:38 .cache
drwxr-xr-x 1 root root   18 Feb  1 10:52 .config
drwxr-xr-x 1 root root   22 Feb  2 04:36 .jsng
drwxr-xr-x 1 root root   10 Feb  2 04:38 .local
-rw-r--r-- 1 root root  161 Dec  5  2019 .profile
drwx------ 1 root root   30 Feb  2 04:36 .ssh
-rw-r--r-- 1 root root  227 Feb  1 10:52 .wget-hsts
drwxr-xr-x 1 root root   20 Feb  2 04:37 sandbox
root@zosv2tst-09:~#


i3009 renter settings

Address issue #3009
upload and download speeds were being reset to defaults as they were not being returned when Settings() was called on the renter

Hey @MSevey, you may already know this but GitHub uses keywords to manage linked issues.  You might consider saying something like resolves #3009 instead of address issue #3009 so that the issue gets closed automatically when this PR gets merged in.  GitHub keywords work in titles and descriptions so it's best practice to title issues with resolves #3009 renter settings instead of i3009 renter settings.
Of course, you need to be careful if you don't want the PR to close the issue, in which case addresses issue #3009 would be perfect since addresses is not a GitHub keyword.
Check out the link below for a full list of keywords: https://help.github.com/articles/closing-issues-using-keywords/
Keep up the good work, the community is loving the PRs you're working on!

@tbenz9 thanks for the info, I'll check out that link!

Build fail due to pending PR on NebulousLabs/ratelimit


add more lint with gofumpt and replaced mutex map with sync.Map for better performance.

added gofumpt and enabled extra lint.
replaced mutex map with sync.Map for better performance.

@ValleyZw Can you rebase/pull the latest changes from master?

Also, please lets stick to gofmt - it is already strict enough in my opinion.

@ValleyZw After the reading the documentation for sync.Map it actually not the same as using a RW mutex, because it doesn't seems to be concurrent safe when multiple routines execute read_map->modify->update_map operations.
I also don't like that it makes the code a little more difficult to work with.
Unless there is something I'm missing and the eventual performance benefits are really worthed, I'd prefer to keep the current implementation.


[system-probe] add additional telemetry for dropped connection events

What does this PR do?

This PR adds additional telemetry on dropped connection info to be sent to process-agent. Those can happen when process-agent's buffers get filled, most of time due to a configuration value being too low. Two cases are are handled:

When the connection stats buffers is full
When the perf buffer of the eBPF tracer is full

Those additionnal stats are bundled in /network_tracer/connections route of system-probe:
  "connTelemetryMap": {
    "closed_conn_dropped": "830",
    "conn_dropped": "0",
    // ...
    "perf_lost": "505",
    //...
  }

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

The dropped connections stats are now monotonic so that each clients can get the delta on those since the last fetch. Those are part of internal telemetry, and reset each time the route was used, after being used to display a log message (see pkg/network/state.go:591). Making the internal stats monotonic means once the condition to display this message is true, it always will be. One way to avoid that would be to place in getTelemetryDelta, but that would require adding all the other telemetry fields to the route response as well.
Describe how to test/QA your changes

/etc/datadog-agent/system-probe.yaml
Make the connections stats buffer really small
system_probe_config:
  enabled: true
  log_level: "debug"
  max_closed_connections_buffered: 1

Manual checks of dropped connection info
With a small buffer, just a few networking operations are needed to drop stats (e.g apt update). You can then see this by getting the connections route with:
curl -s --unix-socket /opt/datadog-agent/run/sysprobe.sock http://unix/network_tracer/connections|jq .connTelemetryMap
Checking for perf buffer's drops
This one is harder to make it happen, and to test, so you will probably see the new perf_lost field being zero. It can be triggered eventually if you block system-probe long enough with a debugger (can take quite some time, depending on how traffic you machine has).
Reviewer's Checklist

[X] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
[ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
[ ] A release note has been added or the changelog/no-changelog label has been applied.
[ ] Changed code has automated tests for its functionality.
[ ] Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
[X] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
[ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
[ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
[ ] If applicable, the config template has been updated.

@Yumasi I think you need to rebase to fix the CI failures, since #12548 fixed them.


Update the LICENCE copyright

Branch: 0.15.x
Expected behaviour: Copyright must updated.
Current behaviour: Copyright is not updated.
Steps to reproduce:

Download the KA Lite `OSX installer
After the download has been completed, double click the .dmg file.
The Copyright is not updated as shown at the screenshot below.

Already fixed in develop branch.


MDN and External tip links not displaying

The MDN links and other help links do not show up on the beta site.
Screenshot

Regular site:

Beta site:

@dhcodes Thanks for catching this. You don't have to use the issue template if it doesn't fit the issue, though.

I'll take a stab at this assuming we still plan to have MDN links on the site.

@dhcodes Did you make any progress on this?

Refer : https://github.com/FreeCodeCamp/FreeCodeCamp/issues/12067#issuecomment-269818773
Opening up to the community.

I'd like to raise a few questions about this. Having looked at the hint structure, I think we should make some changes.

The hint currently accepts only plain-text whereas most of the MDN resources are links.
The hint generates a toast to which we could add an action link, but I wonder if using a dropdown on the hint button might not be a better approach.
Alternatively, if we could limit the number of hints on each exercise to 1 hint, we could do away with the toast and have a one-click hint button to open the resource in a new tab.

Thought on any of this?

@dhcodes Good suggestions 👍 I'm not really sure what the hints are supposed to be like. I believe the idea is that they should be like the hints on the forum.

Whoa. Hadn't seen that issue. Thanks @systimotic. Closing this is fine as long as we reference the MDN links needing to be added to staging in that other issue. 👍

Closing in favor of #13460


Android: Sending message often fails, retrying always fails.

Summary
Sending a message almost always fails despite an active connection (receiving at the same time works). Resending ("try again") always fails. When refreshing (swiping up) the message is successfully sent and appears, however, as a duplicate; the failed message is still there.
Environment Information

Device Name: Nokia 8.1
OS Version: Android 11
Mattermost App Version: 1.48.0 (Build 3000380) from Play Store
Mattermost Server Version: 6.0.1

Steps to reproduce
Select a channel and type a message. Even when a Wifi connection definitely works (I'm receiving mattermost messages in the same channel, no toast is active), sending fails every time with a freshly opened app. The message appears grey with a red (!). Tapping the (!), I can select "Try again". This has never once worked. However, when I wipe up, the message is sent and appears. (I know that it is only now sent, because it now also appears in the desktop app). The failed message remains there.
The messages are also sent when I let the screen lock activate by just waiting and then unlock the phone. After that (unlocking with Mattermost active) all messages will be sent successfully!
This is currently for me the only way to get Mattermost to work properly.
Expected behavior
The messages should be sent, the connection is established.
"Try again" should succeed (sending is obvously possible because swiping up works)
After swiping up, the failed messages should disappear because they had been successfully sent.
Observed behavior (that appears unintentional)
see above.

I get this all the time, very frustrating. At least let me copy the failed message, ending having to retype the entire thing. I don't use the app enough to remember to copy thr text before sending 😓

@eklockare hey, thanks for confirming my report. can I ask you a few questions? I've been trying to isolate myself where this bug comes from. are you the admin of your mattermost instance or do you maybe otherwise know whether you use mysql or postgres as database backend? also, do you use the new/experimental "collapsed reply threads" feature?

@adsche can you confirm if this is still happening on the latest version of the beta (V2)?

@larkox does not seem to happen with the beta.

I am experiencing the same issue in V2.1.0 in android. Messages failed to send almost always when I first open the app, hitting retry again always send msg successfully.


gradle build does not work out of the box

running gradle build in the IVCT_Framework root folder does not work out of the box because the tests for the Command project require ENV variable IVCT_CONF to be configured.
It would be preferable to include special unit test configuration for these unit tests rather than relying on the configuration at the location indicated by the ENV variable.

we propose to raise a "AssumptionViolatedException" in all JUnit test cases, for situations like the unkonwn environment variable.

the build shall be possible after clone the framework rep in a fresh folder

The build can now be completed without any further configuration.
What about gradle test? At the moment, it is necessary to have an ActiveMQ running to be able run all the gradle tests. Does this cause a problem for e.g. Travis?
To adjust the IVCT system so that all the gradle tests work without ActiveMQ is not really desirable since that can hide issues that deal with the calls to ActiveMQ.
Ideally we also need tests that test the communication via ActiveMQ between two or more processes.
Another question is: should the gradle tests work if the environment variables or IVCT.properties have not been adjusted to the local environment e.g IVCT_SUT_HOME_ID with the default value?

Travis can run an ActiveMQ instance in a docker container to allow testing so that's no issue.
I'd say preferably your unit tests are not depending on your 'operational' configuration. They should instead override or use some static testing config.

That is good to hear that the automatic tests have no problem.
That means the manual tests can require some extra steps such as starting ActiveMQ before performing the tests. This should be included in issue #93 Testing the Framework. The relevant tests should also display a message that ActiveMQ is required in order to pass the test, then user can quickly see that there is this dependency.

You can run an Embedded Broker for the unit tests that require ActiveMQ:
See for more info:
https://activemq.apache.org/how-to-unit-test-jms-code.html

Have added an embedded ActiveMQ for the Junit tests. Some generated Junit frameworks did not work with the embedded ActiveMQ: commented: have commented out some annotations to prevent errors in the Junit tests. After checking out the software, "gradlew build" will have "BUILD SUCCESSFUL".
NB. "gradlew build" will not work correctly if an external ActiveMQ server is running.


GraphQLNonNull from another module or realm

I was programming on my laptop on work. When I arrived home I cloned the code but something is going wrong.
Cannot use GraphQLNonNull \"User!\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.
This is the console output
Error: Cannot use GraphQLNonNull "User!" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
    at instanceOf (/home/maarten/Programming/February/ine/server/node_modules/graphql/jsutils/instanceOf.js:15:13)
    at isNonNullType (/home/maarten/Programming/February/ine/server/node_modules/graphql/type/definition.js:168:35)
    at isWrappingType (/home/maarten/Programming/February/ine/server/node_modules/graphql/type/definition.js:241:30)
    at Object.getNamedType (/home/maarten/Programming/February/ine/server/node_modules/graphql/type/definition.js:286:12)
    at Object.getTypeForRootFieldName (/home/maarten/Programming/February/ine/server/node_modules/graphql-binding/dist/utils.js:40:22)
    at buildInfoForAllScalars (/home/maarten/Programming/February/ine/server/node_modules/graphql-binding/dist/info.js:17:24)
    at Object.buildInfo (/home/maarten/Programming/February/ine/server/node_modules/graphql-binding/dist/info.js:7:16)
    at Proxy.<anonymous> (/home/maarten/Programming/February/ine/server/node_modules/prisma-binding/dist/src/Handler.js:53:38)
    at signup (/home/maarten/Programming/February/ine/server/src/resolvers/Mutation/auth.js:7:40)
    at <anonymous>

On the laptop everything was working fine.
Here on my desktop every mutation at port 4000 is failing.

I had to downgrade prisma to the same version which is 1.1.2. Any ideas what might've broken while upgrading?

I solved this by doing npm i -g prisma.


TimeUtils Refactor

Description
This PR refactors the existing TimeUtils to use a public enum system with a set of available date formatting patterns (the current set is pulled from the existing private formatting strings).
Both ISO 8601 helper methods have updated names to better reflect their return values, and both are able to accept an optional Date arg to convert using the specified pattern.
getIso8601Date -> getIso8601DateTimeZoneRFC822

There is value in being more specific with the time zone formatting this method uses, as it will reduce potential ambiguity, and this naming convention aligns with the next method:

getIso8601DateTimeZoneISO8601 -> getIso8601DateTimeZoneUTC

The "TimeZoneISO8601" is not as clear as "TimeZoneUTC" because ISO 8601 is the general date pattern standard, with many variations possible; UTC makes it more clear that all times will be converted to UTC +0 (with further explanation in the method's docs)

The general purpose date converter getIso8601Date(date:, format:, timeZone:) has been updated to accept only non-optional enum values as the date formatting pattern and also renamed:
getIso8601Date -> getFormattedDate

Rationale: since this method handles all date formats, even those not conforming to ISO 8601, its name should reflect that capability; also, even before the enum system was implemented, there was no restriction on the date pattern that could be passed as the arg

The naming convention (generally) for the enum values themselves is as follows:
<date pattern standard>_TIMEZONE_<time zone format>_PRECISION_<smallest precision unit>
ISO8601_TIMEZONE_RFC822_PRECISION_SECOND
ISO8601_TIMEZONE_ISO8601_UTCZ_PRECISION_MILLISECOND
TimeZone "GMT" has been updated to "Etc/UTC" to move off the deprecated 3 letter time zones, and "Etc/UTC" comes from the canonical value for UTC +0 (zero offset) from the tzdb, supported by ICANN.
Related Issue

Motivation and Context
This change would make it much easier for 3rd party extensions to get the common date formatting capabilities they need, through both:

Clearly named helper/convenience methods that can convert passed Dates or the current Date() into commonly needed formats (automatically applying common built-in assumptions about usage; for example, the time zone to use)

getIso8601DateTimeZoneRFC822 -> 2022-11-30T11:53:09-0700
getIso8601DateTimeZoneUTC -> 2022-11-30T18:53:09.497Z

A general purpose date converter that only accepts date patterns defined in the enum TimeUtils.DatePattern.

This allows for easy use of common date formatting patterns that have guaranteed consistency (as tested by the TimeUtils test cases, etc.), virtually eliminating potentials for typos, incorrect date formats, etc.

Point 2 also removes the burden of handling every potential date format pattern (that is, basically being a restrictively simple wrapper around SimpleDateFormat); it handles all the enum cases covered in DatePattern gracefully (for example, setting the time zone to the appropriate value automatically for the ISO8601_TIMEZONE_ISO8601_UTCZ_PRECISION_MILLISECOND pattern), and if users want their own custom format they can simply use the SimpleDateFormat directly.
Also these changes would be most optimal to decide on before the TimeUtils APIs are cemented in a public release.
How Has This Been Tested?
Unit tests for the TimeUtils have been updated to reflect the new enum system, with a new test case for conversion of provided dates into the helper/convenience methods.
Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] I have signed the Adobe Open Source CLA.
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Can you also fix lint errors and update the apidump file.

Please fix the build error in tests

@timkimadobe Can you resolve the conflicts so that we can merge this in?


Use jnp.nanmin and jnp.nanmax in jax.experimental.ode.optimal_step_size

This simple bug fix prevents jax.experimental.ode.odeint from getting stuck on NaN's if a trial adaptive stepsize led to a NaN for mean_error_ratio.
See the following discussions for more info:
https://github.com/google/jax/issues/14612
https://github.com/patrick-kidger/diffrax/issues/223

I'm going to close this because it seems to have gone stale. If you'd like to continue with this contribution, feel free to re-open and add a test!


64-bit version

Any plans on 64-bit version? I'm using Notepad++ (64-bit) and was hoping to see CSScript.Npp work.

Isn't it the moment when you truly appreciate the hosting model the other editors have? :)
Sublime, Atom, VSCode they all host extensions under portable runtime (e.g. Python, Node.js).
It's a difficult one. The plugin code itself is C# so it is ultimately portable. However it integrates with N++ via x86 DLLExport layer. I remember trying once to port it to x64 but I had plenty of really strange problems and not only portability related ones. I even got an impression that x64 N++ somehow different to x86 functionality wise. Though most likely it was only an  impression.
I don't have time right now to invest into this and I don't even have a x64 N++ copy for testing. I've done a very quick x64 build (attached) and you can just try it in your environment. There is a small chance that it will just work. Let me know if it indeed does.
CSScriptNpp.x<IP_ADDRESS>.1.zip

Yeah, their hosting model is kinda superior. But I don't want to trade that off for much better performance N++ has. Only Sublime comes somewhat close, but I only enjoy using it on Linux.
Okay. Here's what happens after installing the DLL you provided above:

Thanks, this confirms that the N++ interop (NppPluginNETBase.cs) that I inherited with the project template is x86 specific.  I will keep this issue open and see if the author of the interop has updated it for x64.
...
OK there is an update. Judging from this post: https://notepad-plus-plus.org/community/topic/12633/npppluginnet-64-bit. I wasn't the only one who was affected.
I will plan the upgrade.
Though I have to say that it does put an extra maintenance pressure on me. Maintaining two separate synced products on N++ plugins repository is not an easy task and most likely will require N++ support. And interacting with N++ team is ... let's say... a challenge. But not an impossible one :)
Just letting you know that I only yesterday release the first cut of VSCode extension for CS-Script. It is conceptually very similar to the plugin for Sublime but it has the Debugger!!!!!
Both Sublime and VSCode plugins for CS-Script can be a good portable alternative for Notepad++.

Both Sublime and VSCode plugins for CS-Script can be a good portable alternative for Notepad++.
Wait, CS-Script is available for these editors too? The main reason I went with N++ was CS-Script.

Wait, CS-Script is available for these editors too?

Yes it is available. :)
Though VSCode plugin is just a "baby" (a couple days old). But it has the highest potential out of all.
After developing for three of those popular editors I have now pretty good understanding of their strengths and weaknesses. As well as their potential for CS-Script:

N++ plugin is the richest and the most mature. Though it is a dead end path. Not portable. The C# debugger is a nightmare to maintain. Plugin integration model is very restrictive and rather clumsy. Dev support is very difficult to get. Thus it was the most dev unfriendly. But... it still delivers the most comprehensive UX.

ST3 has the best documentation and excellent support. It was the easiest to develop for. Great community. Very good architecture. Portable. Fast. The only two real problems I can name: you cannot debug your plugin and it will never allow any feature that wold make it to look like typical IDE. No panels, toolbars... Thus integrating C# debugger will never be an option.

VSCode is the best in terms of architecture. Extension development workflow is designed correctly from the start. Excellent dev language - TypeScript. All vital sub-systems are already in-place. It has the best potential if you ask me. Though it is young and rough on edges. Doco is hard to use. Support...I am yet to see. Many vital features are still only scheduled. But... this is that one I am concentrating on. :)

Excellent dev language - TypeScript

Yeah, I fancy TS too.
Now that I think of it, does one even need CS-Script for VSCode? AFAIK it has excellent C# support and developer experience. Am I wrong? I mean, what would the advantages of using CS-Script for VSCode be?
Thank you for sharing your experience!

Currently VSCode story for C# has very strong objective to serve .NET Core. And this imposes so many limitations preventing it from being a phenomenal tool for a desktop/server app development. VSCode C# fancies only ASP.NET Core (at least currently). Thus you cannot benefit from the richness of neither .NET nor Mono:

You cannot build an executable for desktop (e.g. Mono). And I am not convinced .NET Core will ever wants to service anything else but Web apps.
You cannot debug (unless if it is .NET Core).
Project structure is shockingly restrictive. You cannot work (e.g.run, debug) with a single file. It has to be a folder and what is inside of it.

And CS-Script fills the gap. It lets full scale desktop CLR back into the game. The extension itself is very lean. It just binds Mono Debugger, OmniSharp and CS-Script together. And CS-Script plays role of runtime host (launcher) and a project manager. That's it. Everything else is just standard VSCode functionality. With the help of CS-Script extension it is now possible for VSCode to:

just execute your C# file without the need for a special folder
have any sort of module dependencies form any location on the file system
have access to the full .NET/Mono API
debug (finally) your code even if it doesn't target .NET Core
use C# in a scripted way (Python inspired)

And all this on top of the all rich functionality that is available with OmniSharp and MonoDebug.

Thanks for the info. I missed these features you listed when I last used VSCode. I'll be sure to check out CS-Script for VSCode the next time I install VSCode.
Btw, I don't have anything against .NET Core. It's cool, and can also be used to write any kind of server-side applications, not only web apps.
Also, VSCode is pretty great for TypeScript. Are you developing your plugin for VSCode in VSCode? (:

Btw, I don't have anything against .NET Core.

Me neither. I am a big supporter the .NET Core move. Particularly with .NET Standard spec.
It's just for some cases Mono/.NET it is still a better choice. One obvious approach would be for VSCode to allow to fall back to Mono/.NET but they decided to not to. And this is exactly what I see as a problem. CS-Script.VSCode is just happens to be a suitable solution to this problem but it also can be other C# hosting solution. When VSCode either adds native Mono/.NET support or .NET Core reaches true maturity there will be no need for any extension like that.
While all CS-Script plugins have symbiotic relationship with their hosting editors/IDEs, CS-Script's primary objective is to bring Python user experience for C# syntax. Not to enhance editors. Thus I actually see no problem with an editor/IDE not gaining anything from CS-Script.

Are you developing your plugin for VSCode in VSCode?

Of course. I wouldn't do it any other way.  But til that day comes, I'm using the latter. Especially since the most recent version (5.0) was a really great step forwards. I mean, finally abonding XBuild in favor of MSBuild (and Roslyn). Best thing ever.

Python user experience for C#

Never really tried that side of CS-Script. But looking at some screenshots now, I love the ability to pass arguments by just writing a comment. I guess I'm outta check CS-Script custom syntax.

:) :) :)
I am with you on this one.

Especially since the most recent version (5.0) was a really great step forwards.

I have a quick look and found that the latest mono actually supports C# 7. Though it needs to be activated in some special way and by default it generates pdb not mdb so I will need to convert one into another on fly. Otherwise MonoDebug will not understand the symbols. But all doable.
I am overdue with some of cs-script.vscode doco but as a good substitution you can go to cs-script.sublime wiki: https://github.com/oleg-shilo/cs-script-sublime/wiki.
After all the objective is to make cs-script.vscode to do what cs-script.sublime does but to have a superior OmniSharp (Intellisense) and the mono Debugger!!!!
That wiki is actually quite informative but for complete doco go https://github.com/oleg-shilo/cs-script/wiki.
And for super light syntax reminder:
cscs.exe syntax

and CLI commands
cscs.exe cmd

Hmm, I skimmed through the wiki, and it looks really promising. But one detail in particular caught my attention. Is Chocolatey the official way to install CS-Script on Windows now? I thought it came bundled w/ plugin installers.

The script engine itself is a single file - cscs.exe (or window app version csws.exe). Thus it is just too easy to get it bundled with the products that use it. And this is what I typically do
However the whole CS-Script suite comes with plenty of  other stuff:

Shell extensions
Builds targeting specific versions of CLR
NuGet utility
Samples
...

And for that Chocolatey is a better fit as  deployment technology.

I see, thanks.
Should the issue be closed?

Yeah, let's close it for now.
But if anyone is also interested it can be reopened. I am not sure when and if I'll get time to look at N++ x64  porting but at least then we can set it's status to help wanted.


Fix remaining issues with authentication

Codecov Report
Base: 96.42% // Head: 96.41% // Decreases project coverage by -0.01% :warning:

Coverage data is based on head (43aa053) compared to base (bd125b3).
Patch coverage: 85.71% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
- Coverage   96.42%   96.41%   -0.02%
==========================================
  Files          57       57
  Lines        6710     6714       +4
==========================================
+ Hits         6470     6473       +3
- Misses        240      241       +1

Flag
Coverage Δ

unittests
96.41% <85.71%> (-0.02%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

weaviate/connect/connection.py
92.94% <75.00%> (-0.60%)
:arrow_down:

weaviate/client.py
96.66% <100.00%> (+0.17%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Select Menu in layout header

I am trying to add a customer selection menu in the layout header next to toggle navigation.

Created ClientSelection.ts file for loading select menu items.

In Layout.cshtml, added a select container after toggle navigation and initialized the same in script

It works perfectly in chrome, firefox, edge browsers. But in IE11, select menu works only in dashboard page. For all other pages it shows a blank menu.

How should i reload the menu items in each and every page (Problems occurs only in IE)

Closing due to inactivity.


https://api3x.firstrade.com/sess/login

hi,
Previous versions of urls are connected properly,but not properly after changing api3x.firstrade.com
"statusCode":403,"error":"Forbidden","message":"Access denied"}
Get account data
----> 7 ft_accounts = account.FTAccountData(ft_ss)
8 if len(ft_accounts.account_numbers) < 1:
9     raise Exception("No accounts found or an error occured exiting...")
d:\ProgramData\Anaconda3\lib\site-packages\firstrade\account.py in init(self, session)
296         response = self.session.get(urls.account_list())
297         if response.status_code != 200 or response.json()["error"] != "":
--> 298             raise AccountResponseError(response.json()["error"])
299         self.all_accounts = response.json()
300         for item in self.all_accounts["items"]:
AccountResponseError: Failed to get account data. API returned the following error: Forbidden

Were you using a profile? If so you need to make sure you delete the .pkl file. It will try and use the old cookies and they do not work.

I don't use cookies. I think the problem is using the new URL (https://api3x.firstrade.com/), which seems to be officially banned now. I suggest changing back to the original URL https://www.firstrade.com/

It is not banned I use this almost everyday and it works fine.

As there has been no reply to this in awhile closing.


use mocha's skip for conditional tests

Hopefully I got all of them.

@diasdavid coding style fixed, ready to merge

Thanks @MichaelMure :)


First-time user: Error connecting/authenticating to GitHub - no commands work

Hello, I'm trying to use teachers_pet (0.3.5) and can't seem to get it working. I've never used it before so hopefully it's something simple to fix. I'm trying to set up teams using create_student_teams and it's giving me the error below. I've tried entering my password and using a token (both on command line and in the environment variable) and get the same result. Any idea how to make it work? (I am able to connect to GitHub otherwise, e.g., with git push)
$ teachers_pet create_student_teams --students=./students.txt --organization=PCC-CIS-233J --username=caratang
Authenticating to GitHub...
c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:923:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Faraday::SSLError)
from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:923:in block in connect' from c:/Ruby22-x64/lib/ruby/2.2.0/timeout.rb:74:in timeout'
from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:923:in connect' from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:863:in do_start'
from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:852:in start' from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:1375:in request'
from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:1133:in get' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:80:in perform_request'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:40:in block in call' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:87:in with_net_http_connection'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:32:in call' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:8:in call'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:8:in call' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in build_response'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in run_request' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/connection.rb:140:in get'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sawyer-0.5.5/lib/sawyer/agent.rb:94:in call' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/octokit-3.3.1/lib/octokit/client.rb:339:in request'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/octokit-3.3.1/lib/octokit/client.rb:200:in paginate' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/octokit-3.3.1/lib/octokit/client/organizations.rb:206:in organization_teams'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/teachers_pet-0.3.5/lib/teachers_pet/client_decorator.rb:30:in existing_teams_by_name' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/teachers_pet-0.3.5/lib/teachers_pet/actions/create_student_teams.rb:6:in create_student_teams'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/teachers_pet-0.3.5/lib/teachers_pet/actions/create_student_teams.rb:32:in run' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/teachers_pet-0.3.5/lib/teachers_pet/commands/create_student_teams.rb:10:in create_student_teams'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/teachers_pet-0.3.5/bin/teachers_pet:4:in <top (required)>' from c:/Ruby22-x64/bin/teachers_pet:23:in load'
from c:/Ruby22-x64/bin/teachers_pet:23:in `'

Did you try to update your ruby on windows to latest?
This may help you I think:
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

Thank you for responding. That looks like the same error I'm getting, but I already have the new certificate mentioned as the fix in the workaround. I just installed Ruby a week or so ago in order to use teachers_pet.
Any other ideas appreciated.

I ran into the same problem, the following helped me.
The problem is that Ruby does not use the certificate store of the OS, and does not recognize the certificate authority (CA) who signed the SSL certificate of the api.github.com site (see explanation here: Why is Ruby unable to verify an SSL certificate?).
As of now (2015-08), api.github.com is signed by Digicert. Thus you have to specify that this is a trusted CA. This can be done in the SSL_CERT_FILE environment variable. All you need is the certificate of the CA in pem format. Luckily, version 2.1 of the Ruby install on Windows already contains this certificate. Thus in a command prompt execute:
set SSL_CERT_FILE=C:\Ruby21\lib\ruby\2.1.0\rubygems\ssl_certs\DigiCertHighAssuranceEVRootCA.pem

Now you can use teachers_pet in the same command prompt (the above does not persist the environment variable, it is only valid for this session).

@micskeiz Thanks for your advice! It helped me get teachers_pet running on Windows.