Theming my own components (Alpha 9)

Bug, feature request, or proposal:
Attempting to follow the guidelines for styling my own components based on Material, but simply can't get it to work, I am doing the following in the scss but it does not work. Importing theming and palette into my scss results in $primary not being found. What could I be doing wrong ? Am I not importing correctly ? How do I correctly import theming in my scss such that I can theme my own components.
At the top of my scss
@import 'node_modules/@angular/material/core/theming/_theming';
.someClass {     background-color: md-color($primary);     color: md-color($primary, default-contrast);     // color: red; }
Then I get the following on compiling the SASS

Error: Undefined variable: "$primary"

Need Help
What is the expected behavior?
Need to be able to correctly theme my own components using material import via my scss
What is the current behavior?
Can't find $primary
What are the steps to reproduce?
Tried to pull together a plunker based on a material seed, find it here
plunker example
The plunker simply will not render if the code in myComp.component.scss remains as is, if the component theming is removed  with the import commented and simply setting the color to red, the page will render correctly ???
What is the use-case or motivation for changing an existing behavior?
Styling my own components based on material
Which versions of Angular, Material, OS, browsers are affected?
Ng 2.0 final
Material Alpha 9
Is there anything else we should know?
no

I think $primary is some kind of palette and you can't use it directly to get a value out of it.
In my code for example:
$primary: md-palette($md-blue);
To get a value out of it, you have to get a value out of the Sass Map of this palette:
background-color: map-get($primary, A100);
To find the available palettes, look into the appropriate scss file in the Material dependency folder.

@dahaupt Sorry disagree with that, I am simply am following the guide, this can be found in the docs theming md file, took the code the section "Styling your own components". Therefore this should work, problem is it is unclear how to do this properly.

@HeavenlyHost Okay, maybe I was on the wrong way. But inspecting your plunker example, your own theme is uncomplete.
Just this one import is not enough to define an own theme.
@import 'node_modules/@angular/material/core/theming/_theming';
The docs theming.md  readme describes some more stuff to do in Defining a custom theme. Currently, your sass-file has no $primary variable defined. I think in current state, you have to define your own theme in ordner to style your own components and to access those sass variables.

@dahaupt so are you saying that I need to create my own theme in order to theme my own components ? This is not my interpretation of the md file ! It reads as if all I need to do is import theming support and use the existing parameters ? If all I want to do is use an existing prebuilt theme and tap into the existing $primary palette how is this achievable. I do not agree that we should have to create a new theme, can we not simply apply an existing one and how do we do this ?

@HeavenlyHost  Yes, for the moment I think it only works the way I described it. But you are right, it should work the way you want to use it. To use the "default" theme, I think we first have to set one theme as our default theme.
The theming seems to be really new, I don't know really much more about it. Let's wait for an answer of a dev.

I've made a PR #1385 that explain a little more about theming custom components. I do not know if it is the better way of doing this but is the way I've found.

@vinagreti I did try what you suggest but I get the following...
<EMAIL_ADDRESS>
Error: It's not clear which file to import for '@import "overlay/overlay"'.
Candidates:
overlay/overlay.scss
overlay/overlay.css
Please delete or rename all but one of these files.
on line 4 of<EMAIL_ADDRESS>

@import 'overlay/overlay';

Just to be clear, I am not attempting to create a theme, but simply extract the existing $primary value from the current material theme and then have this value overridden by including a prebuilt css into my app, this way all we need to do is import a different css for a new theme in the index.html
Second I don't really want to create my own theme at this time (although long term this will happen), but I do want my custom component to inherit whatever the standard material widgets are using, is this possible ?
Third, your solution means that we would need to create our own theme, is there not a function to extract the current material theme from the core, instead of creating our own via mappings ?

@HeavenlyHost if you look at the pre-built themes you can see that they call the method @include angular-material-theme at the end of the file to apply the theme to the material components. You have to do the same, because the components have no theme by default.
In the last version, you need to apply one of the pre-built themes and you have two ways of doing this. One is importing the pre-built-theme.css directly in your app-wide style.css and the second is including the pre-built-theme.scss in your app-wide 'style.scss' (if you are using angular-cli, you have a third way that is including the pre-built-theme.scss in angular-cli.json styles list).
So, you have to apply a theme being it your custom theme or some of the pre-built ones. And in that moment, you can customize your components as well, like I showed in the theming.md.
I do not think that would be possible to you to just get the current primary variables because it is not a persistent variable and it exist only in the moment that the @include angular-material-theme($theme); is called. Because of that, you have to create a custom sass function that apply your theme to your custom components. Remember that you can use a pre-built theme instead of creating your own.
About the overlay problem, I think you may be loading the overlay css in other place and it is causing this conflict. You do not need to load any css/scss besides the theming one.
Like I said, I do not know if it is the right or better way of doing this, but is the way I've found that do not stopped me to customize my components based on the current theme, even working with multiple themes.

Are your custom components within the "APP" project as mine are consumed from an external library, think of them as assets that are making use of the Material stuff but with custom functionality. This being the case, do you believe that this should still work, or do I need to do something else ?
The thing regarding the overlays, I do not believe that I am loading the overlay stuff seperately, it fails on the SASS build ?

About overlay, I do not have this issue here. Without see your app I cannot figure out why this is happening.
About custom components. Angular creates one CSS file for each component an it have all styles the component needs to render within or without material design being used in your app. The sass functions just allow you to create theese css files using some of the material design styles and theme. So, once your component is built, you can use it anywhere, even in applications that does not use material design.
The sass functions just help you build the css file for your custom component and not styles it directly.
If you are serving your custom component as a separeted package, you will have to give to the use the power to customize your theme. As it is not in the @angular/material theme, it will not use the material theme unless you tell it to use, that is the reason why we have to create the sass function @mixin custom-input-theme($theme) for customizing our custom components.
In my point of view, you can create a standalone component, that has its own theme and give the use the possibility to customize it using material themes or any theme that you want (bootstrap, foundation...)... but you will have to tel your custom component how to use these themes.
In short, you are creating custom components that uses material theme and not custom @angular/material components. So, you will have to apply the themes somehow...

@HeavenlyHost  I think I've found the reason of the overlay problem. In the my-core-styles.scss you are importing @import '~@angular/material/core/theming/theming';. This is not necessary and you can remove it. You only need the @import ~@angular/material/core/theming/all-theme'; file.
And in your my-widget.component.scss you have to import both @import '../core/my-core-styles'; and '~@angular/material/core/theming/theming';` so you can use the variables from your custom theme and the functions from angular material that aply your theme.
I've updated the PR with a more concise example.

So I have attempted to go back to basics and simply try and create a custom theme using the documentation, building the scss with gulp-sass and node-sass. The scss file uses exactly the same code as the example i.e.

@import 'node_modules/@angular/material/core/theming/all-theme';
// Plus imports for other components in your app.
// Include the base styles for Angular Material core. We include this here so that you only
have to load a single css file for Angular Material in your app. */
@include md-core();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue.
$primary: md-palette($md-indigo);
$accent:  md-palette($md-pink, A200, A100, A400);
// The warn palette is optional (defaults to red).
$warn:    md-palette($md-red);
// Create the theme object (a Sass map containing all of the palettes).
$theme: md-light-theme($primary, $accent, $warn);
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include angular-material-theme($theme);`

unfortunately I get the same error on both gulp-sass and node-sass...

{
"status": 1,
"file"<EMAIL_ADDRESS>"line": 4,
"column": 1,
"message": "It's not clear which file to import for '@import "overlay/overlay
"'.\nCandidates:\n  overlay/overlay.scss\n  overlay/overlay.css\nPlease delete
or rename all but one of these files.\n",
"formatted": "Error: It's not clear which file to import for '@import "overla
y/overlay"'.\n       Candidates:\n         overlay/overlay.scss\n         overl
ay/overlay.css\n       Please delete or rename all but one of these files.\n
on line 4 of<EMAIL_ADDRESS>@import 'ove
rlay/overlay';\n   ^\n"
}

I simply can't build a custom theme, irrespective of custom component requirements, what is going on ?
You can test this by taking the above code and building the sass using gulp-sass v2.3.1 and node-sass v3.7.0, Material2 Alpha 9.2 and Angular 2.0 final

Can you show us your Gulpfile?

Plunker

This is your sass compilation config:
gulp.task('compile-sass', function(){
	var sourceSassFiles = [
		config.allSass
	];

	return gulp.src('./app/**/*.scss')
		.pipe(sass().on('error', sass.logError))
		.pipe(gulp.dest(config.tsOutputPath));
});

So, you are using any scss file inside app to compose your bundle. Are you sure that any of these scss files are loading the overlay css?
The message says: "It's not clear which file to import for '@import "overlay/overlay"''. Candidates: overlay/overlay.scss & overlay/overlay.css. Please delete or rename all but one of these files."
Somehow you are importing overlay/overlay.CSS and it is not made by<EMAIL_ADDRESS>file because it imports only Scss files and not CSS.
I'll suggest you to see all your scss files to see if in one of them are importing the overlay and also look in your index and html and component files to see if you are not importing the overlay.CSS from on of them.
Maybe you can send me your app so I can look at it to see if a can help you.

I think you need to define the extension that the gulp will search for. If you look the error, you can see this message:
It's not clear which file to import for '@import "overlay/overlay"''. Candidates: overlay/overlay.scss & overlay/overlay.css. Please delete or rename all but one of these files.
What it says is that when you call import for '@import "overlay/overlay" the sass compiller does not know if it should load scc or scss file. You need to somehow set your gulp to use only scss files.

Did you try it in node-sass, you don't need to worry about Gulp, as stated it fails to build even using this ???

I did not try to run the sass task. I've just looked at your Gulpfile and the output error so I've seen that the error is that your compiler does not know if it needs to compile the scss or the css version of the overlay file.
Now, you need to figure out how to configure your sass task to search only for scss files. If you can do this, the conflict will stop.

Also believe this to be related #887

I believe that this is a problem with libsass and is not being fixed officially until v4.0, so the work arround I found was to provide an importer function and massage the file paths to use scss instead of css as follows...

gulp.task('compile-sass', function(){
var sourceSassFiles = [
config.allSass
];
var sassimport = function(url, previous){
var filepath = url;
if (!filepath.includes(".scss") &&
!filepath.includes(".css")){
filepath = filepath + ".scss";
}
return {file: filepath};
};
return gulp.src(sourceSassFiles)
.pipe(sass({importer: sassimport}).on('error', sass.logError))
.pipe(gulp.dest(config.tsOutputPath).on('end', function(){callback()}));
});

click here for importer info

Running into the same overlay issue with node-sass. The problem is that if you don't specify an extension in an @import statement, and there is both a .css and .scss file in the folder, the problem will occur. Since the overlay.css is empty (except for a sourcemap statement), is that file necessary?

Why is the .css needed in the first place? Angular includes the component css in each component and by importing the _theming.scss you generate your own themed .css with all the styles.
Isnt it possible to just remove those from the build?

It is meant for those who are not using sass.

I have a sketch-editor.component.(ts|html|scss|spec.ts). I'm following the theming tutorial and I created sketch-editor.component.theme.scss with the sketch-editor-theme($theme) mixin.
In styles.scss I imported the sketch-editor.component.theme.scss and I included the function. I got this error:
ERROR in ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles.scss
Module build failed:
    $result: map_merge($result, (
            ^
      (50: #ede7f6, 100: #d1c4e9, 200: #b39ddb, 300: #9575cd, 400: #7e57c2, 500: #673ab7, 600: #5e35b1, 700: #512da8, 800: #4527a0, 900: #311b92, A100: #b388ff, A200: #7c4dff, A400: #651fff, A70
0: #6200ea, contrast: (50: rgba(0, 0, 0, 0.87), 100: rgba(0, 0, 0, 0.87), 200: rgba(0, 0, 0, 0.87), 300: white, 400: white, 500: rgba(255, 255, 255, 0.87), 600: rgba(255, 255, 255, 0.87), 700: r
gba(255, 255, 255, 0.87), 800: rgba(255, 255, 255, 0.87), 900: rgba(255, 255, 255, 0.87), A100: rgba(0, 0, 0, 0.87), A200: white, A400: rgba(255, 255, 255, 0.87), A700: rgba(255, 255, 255, 0.87)
), default: #673ab7, lighter: #d1c4e9, darker: #512da8, default-contrast: rgba(255, 255, 255, 0.87), lighter-contrast: rgba(0, 0, 0, 0.87), darker-contrast: rgba(255, 255, 255, 0.87), "50-contra
st": rgba(0, 0, 0, 0.87), "100-contrast": rgba(0, 0, 0, 0.87), "200-contrast": rgba(0, 0, 0, 0.87), "300-contrast": white, "400-contrast": white, "500-contrast": rgba(255, 255, 255, 0.87), "600-
contrast": rgba(255, 255, 255, 0.87), "700-contrast": rgba(255, 255, 255, 0.87), "800-contrast": rgba(255, 255, 255, 0.87), "900-contrast": rgba(255, 255, 255, 0.87), "A100-contrast": rgba(0, 0,
 0, 0.87), "A200-contrast": white, "A400-contrast": rgba(255, 255, 255, 0.87), "A700-contrast": rgba(255, 255, 255, 0.87), "contrast-contrast": null) isn't a valid CSS value.
      in<EMAIL_ADDRESS>(line 30, column 14)
 @ ./src/styles.scss 4:14-159
 @ multi styles

How can I solve this issue? I'm using the deeppurple-amber theme.
Thanks

The problem with overlay is fixed in #1544- other than that, I think everything else should be covered by https://github.com/angular/material2/blob/master/docs/theming-your-components.md

@jelbourn
Link is broken

@crosshopes New link for the theming guide is at:
https://github.com/angular/material2/blob/master/guides/theming-your-components.md.
Also available here:
https://material.angular.io/guide/theming-your-components


scancode-toolkit 32 breaks this tool

Hi,
I was just about to try this tool and it instantly failed:
Traceback (most recent call last):
  File "/home/mauch/.local/bin/ros_license_toolkit", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/mauch/local_install/src/ros_license_toolkit/bin/ros_license_toolkit", line 42, in <module>
    sys.exit(main(args=sys.argv[1:]))
  File "/home/mauch/local_install/src/ros_license_toolkit/src/ros_license_toolkit/main.py", line 80, in main
    packages = get_packages_in_path(parsed_args.path)
  File "/home/mauch/local_install/src/ros_license_toolkit/src/ros_license_toolkit/package.py", line 212, in get_packages_in_path
    repo: Optional[Repo] = Repo(os.path.abspath(path))
  File "/home/mauch/local_install/src/ros_license_toolkit/src/ros_license_toolkit/repo.py", line 83, in __init__
    if is_license_text_file(scan_results):
  File "/home/mauch/local_install/src/ros_license_toolkit/src/ros_license_toolkit/common.py", line 24, in is_license_text_file
    for _license in scan_results["licenses"]:
KeyError: 'licenses'

A bit debugging revealed that the text that is searched for doesn't exist at all in the scan output. So I tried using an older version of scancode-toolkit (31.2.6) and it suddently worked.
scancode-toolkit v32.0.4 produces another output on a BSD-3-Clause LICENSE file:
{'detected_license_expression': 'bsd-new', 'detected_license_expression_spdx': 'BSD-3-Clause', 'license_detections': [{'license_expression': 'bsd-new', 'matches': [{'score': 100.0, 'start_line': 1, 'end_line': 25, 'matched_length': 213, 'match_coverage': 100.0, 'matcher': '1-hash', 'license_expression': 'bsd-new', 'rule_identifier': 'bsd-new_577.RULE', 'rule_relevance': 100, 'rule_url': 'https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_577.RULE'}], 'identifier': 'bsd_new-5be47247-8ec7-7f95-1b90-0aaa3275e0c2'}], 'license_clues': [], 'percentage_of_license_text': 100.0}

For now things work for me with scancode 31.2.6 installed, but since the setup.py doesn't specify a version, this might make other people run into this / will lead to problems in future when newer scancode versions should be supported.

Thank you very much for taking the time to report the issue and the investigation. :100:

@ct2034 thanks for the quick response. I am confused that you created #18 and closed it deleting the branch without merging it. Is there a reason for that?

Thanks for the heads-up. I guess I can respond quickly but not also correctly. This is why I can never have free lunch. :(


New eslint rule proposal: newline before expect statement

This is a proposal for a new eslint rule that we have found as a team helps with readability in our jest tests. It is similar to newline-before-return but for expect statements. A newline is required between a line with an expect statement on it, and a line with setup code before it.
Examples that satisfy this rule:
it('has all the setup in a before block etc', () => {
  expect(result).toEqual('foo')
})

let foo
it('requires some setup code', () => {
  foo = someFunc('bar')

  expect(foo).toEqual('foo')
})

it('has more code in a test', () => {
  foo = someFunc('bar')
  const subResult = foo.prop

  expect(subResult).toEqual('foo')
  expect(subResult.prop).toEqual('foo')
})

We will not be adding style related lint rules to Jest. Please feel free to build your own lint rules and share them with the community.

Just to clarify, we are not interested in adding style related lint rules because they tend to be very subjective. We do not want to impose any one code style on Jest's users.

@eddiesholl If you do create a package with style rules, I'd love to see it (especially if they are autofixable)!


Add SAP Concur to USERS.md

Signed-off-by: Dale Ragan<EMAIL_ADDRESS>Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[ ] All code is covered by unit and/or runtime tests where feasible.
[ ] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[ ] Provide a title or release-note blurb suitable for the release notes.
[x] Thanks for contributing!

Add SAP Concur to USERS.md

Coverage decreased (-0.03%) to 42.548% when pulling db17ef8b4c6471b4fd8551a33679f1a020315d16 on dragan:docs/add-sap-concur-user into 3c25373901605acb9d8615ae2f0ba68e5a78ac18 on cilium:master.


Add notes on problems using GitLab for Continuous Integration

Since a while you need a creditcard to run gitlab-ci. We should add notes on how to work around this when teaching the lesson with GitLab.

@luisaforozco you are the expert on this right? Would you be able to pick it up? Or at least drop some notes here?

For the lesson that we thought we decided to move to Github.
Other possible solutions that we had in mind were:

Letting the organization create the gitlab runners in their machines (from an university for example) and then add all participants to that organization, granting them access to use the gitlab runner.
If there are not university machines for gitlab runners, maybe one could use amazon machines?
Every participant could host the gitlab runner in their own machine? -> This requires quite some effort for the setup.

Thank you, @luisaforozco. This is very helpful. I put together the information above and some extra information from our conversation. Do you agree with the following description?
Teaching CI/CD with GitLab requires access to runners. The available options are:

Use public instance. To gain access to runners, learners need to add their credit card number to their account. We cannot make it a requirement for participating in training.
Use institutional instance. Runners are not available by default and must be enabled per user account. There are two options for setting up runners:
a. Connecting to the local compute (cloud, cluster etc.)
b. Connecting to one of the cloud providers (Azure, Amazon EC2, Google Cloud)
Set up local runners on learners’ laptops. That would require considerable preparation time.


What permissions do I need to review "Firewalls and virtual networks" on an Event Hub?

I noticed a behavior, when a user who has read access to an Event Hub, but no access to the virtual networks associated with "Firewalls and virtual networks", they are unable to review the configuration.  Is this because the user doesn't have read access to the virtual networks?  Is this behavior by design?
Thank you

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

ID: 07cec477-f584-400f-889c-9a5403f34bad
Version Independent ID: f777fdfd-2f5a-56b9-574f-ae6d2b19f130
Content: Azure Virtual Network FAQ
Content Source: articles/virtual-network/virtual-networks-faq.md
Service: virtual-network
GitHub Login: @KumudD
Microsoft Alias: kumud

@DaFitRobsta Thanks for your Question.
One of engineer from Networking area will review your question and get back on this.

@DaFitRobsta , Appreciate your patience. Based on this doc there does seem to be specific permissions covered under Microsoft.EventHub/*. So, an Event Hub Data Owner should be able to work with networks on an Event Hub.

@DaFitRobsta , We are closing this issue for now. If there are further questions regarding this matter, please reply and we will gladly continue the discussion.


ConvertFrom-Json does not convert Newtonsoft.Json specific metadata properties in root object

Steps to reproduce
> '{"$id": 1, "$type": "System.String", "id": "value"}' | ConvertFrom-Json

Add $id and $type properties to a json object
Pipe object to ConvertFrom-Json Cmdlet
Notice that $id and $type properties are missing from resulting PSCustomObject

Expected behavior
ConvertFrom-Json does not ignore properties when deserializing into generic PSCustomObject, regardless of their name.
> '{"$id": 1, "$type": "System.String", "id": "value"}' | ConvertFrom-Json

$id $type         id
--- -----         --
  1 System.String value

Actual behavior
> '{"$id": 1, "$type": "System.String", "id": "value"}' | ConvertFrom-Json

id
--
value

Additional Notes

Issue does not occur when metadata properties are deeper in the hierarchy.
Other Newtonsoft.Json metadata properties include $values and $ref.

Environment data
> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.3
PSEdition                      Core
GitCommitId                    v6.1.0-preview.3
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

I can repro this. It also repros with -AsHashtable and it does not repro on nested objects, only root.
('{"a":{"$id": 1, "$type": "System.String", "id": "value"}}' | ConvertFrom-Json).a

result:
$id $type         id
--- -----         --
  1 System.String value


Improve JoltPhysics

fix debug_renderer and profile option and enable Windows ARM support

CI failing on VS 2019 ARM64 is expected, JoltPhysics requires at least VS 2022 for ARM64


Position not set on Item click when switch tab in  Android device.

Hi, I am using your plugin and I have one problem. I am setting position of Carousel View on clicking some button. But when I am switching from another tab and try to click first time PositionSelected method not firing. But if I click on another button then it works fine. Look at the following scenario in below image.

Now in Android If I am switching tab and get back to this tab again Date number clicked not changing position. "PositionSelected" method is not calling.

This control has been merged into Xamarin.Forms master branch. Please, wait for it to be released as part of Xamarin.Forms and submit any issues there https://github.com/xamarin/xamarin.forms/tree/feature-carouselview. Thanks


Retry failed jobs

The e2e and unit tests are not stable enough. Save developers time by retrying failed jobs automatically before failing the build.
Example run - unit tests failed in first attempt, succeeded in the second attempt:
https://github.com/RamenDR/ramen/actions/runs/11580608689/job/32239498144

I'd rather not auto retry so that we can catch and post analysis for failures and enable improving the tests/flakes. This way PRs may get a 1 in 3 (or n) chance of a passing and failures (flake or otherwise) is not analyzed and ignored.

I'd rather not auto retry so that we can catch and post analysis for failures and enable improving the tests/flakes. This way PRs may get a 1 in 3 (or n) chance of a passing and failures (flake or otherwise) is not analyzed and ignored.

I agree with Shyam. Let the retries be manual.


Ability to deploy from build

Prerequisites

[x] I am running the latest version. (up upgrade)
[x] I searched to see if the issue already exists.
[x] I inspected the verbose debug output with the -v, --verbose flag.
[x] Are you an Up Pro subscriber?

Description
Would be great (especially for CI) to be able to separate the build and deploy steps in the Up tool. "Build once, deploy many". Also great for doing things like running e2e tests on the actual thing that's getting deployed, rather than building it again.
Opens up some great possibilities of having an asset that can put in S3 and used at a later date.
It's currently possible to create a zip, so think it's not too much work to have Up take that zip as an input for the deploy step?

Totally not against the zip thing, but one other feature I wanted was "stage promotion". That way you could deploy up staging then if everything looks good, just up promote staging production or similar to use the exact same build.
Having both wouldn't be too bad, maybe a bit redundant but do you think one has a benefit over the other for your use-cases?

Promotion sounds fantastic.
I see value in both tbh, I think they serve subtly different purposes 🙂

FWIW, we implemented build-to-S3-then-deploy=from-zip CI workflow ourselves.

Using Up? Sounds exactly what we're after! Mind sharing any details?

@mhemmings Yep, or I guess sort of: we build the build zips ourselves and put them on S3 (using Gulp), and have a separate deploy target that takes the build from S3, unpacks it, and feeds it to up. That means that technically we end up with two copies of the "build" on S3, one ours and one ups, but we don't mind. S3 is cheap, and It's actually been useful to be able to compare, say, trimmed node_modules between our and up`s copies.
Not to downplay your feature request by any means, BTW. If we could prepare the original zip using up, we probably would.

@agurtovoy just jumping in to mention you can do up build > out.zip, but we're missing up --zip out.zip and/or this promotion type feature

a promotion feature would be really great!

@tj Just a thought, reckon this is possible to do (hack) at the moment by overriding some hooks to not build anything but take a zip as an asset to deploy?

@mhemmings hmm not that I can think of, the zip portion is somewhat hard-coded in that sense


Implement Cloneable whereever Applicable

I didn't change the ItemMeta#copy() function as that is more API-breaking than the rest of the changes. The old Copy methods were deprecated.
My Reasoning behind using Cloneable (and then overriding Object#clone()) is that Cloneable is a relatively widely-accepted API to signify that the Object may be cloned. It is also may weaken some of the ambiguity beween Position#copy(Vector) or Position#copy(Position) and Position#clone() for example.

In fact, it was using #clone() at first but I decided to switch to #copy() instead in order to be able to create our own "Copiable" interface later on.
https://stackoverflow.com/questions/4081858/about-java-cloneable
https://www.artima.com/intv/bloch.html#part13

Makes sense


Compiling on windows with VC2015

This needs more work to detect VC vs MINGW and i only got the compiler going, bindings still fails but it's getting late.. I'll work on this some more tomorrow
Compile with
scons p=windows godotpath=..\..\godot3-git\bin\
(godotpath being optional but i thought it was a nice addition to make that setable)
scons p=windows target=bindings godotpath=..\..\godot3-git\bin\
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /WX /dll /out:bin\godot_cpp_bindings.dll /implib:bin\godot_cpp_bindings.lib /LIBPATH:C:\Users\bastiaan.olij\Desktop\Development\Godot\godot3-git\bin /LIBPATH:bin godot.windows.tools.64.lib godot_cpp_core.lib
LINK : warning LNK4001: no object files specified; libraries used
LINK : error LNK1218: warning treated as error; no output file generated
scons: *** [bin\godot_cpp_bindings.dll] Error 4001
scons: building terminated because of errors.

Not sure if I understand this step because it already created the DLL so what is the bindings step supposed to do?
Also should this be a DLL? doesn't it make more sense this would output a static library that you compile your object into the final DLL? Seems a bit overkill to end up with two DLLs?

Ah! I forgot generate_bindings=yes
Now I get it :)

Oh awesome!
The bindings are split into two parts: the C++ "core" and the bindings. The core library is just the wrapped GDNative core types. The bindings are autogenerated classes that use MethodBind internally and stuff 😄
The bindings depend on the core library, but the core library is useable on its own

@karroffel yeah I finally got that last bit just before I went to bed, I had just missed that generate bindings flag so it fell flat on its face :)
Still not sure why these output dynamic libraries though, obviously I'm not deep enough into this yet so lightbulb still needs to go on but I would say that building these as static libraries to link into your actual GDNative module and export that as a dynamic library makes sense.
Now it seems you'll end up with multiple dlls to deploy with potentially conflicting ones if I'm using GDNative modules made by separate people (I'm assuming most will just download binaries from the asset store in due time).

@BastiaanOlij I think @RichyHBM made fixes that supersede this, is that correct?

I think for the windows sections they do

I've been preoccupied with my little ARKit thingy the past few days so I'll have to test @RichyHBM changes on my laptop but it looks to me they should have the same effects as my changes.
If anything falls over I'll do another PR :)


Feature/mpo avoid left right anchor

removed left/rightAnchor functions as leading/trailing should be used

Thanks 👍


Add animated Loader for images

Solves #2
Add an animated icon (based on the App's favicon) for the IOTD and Search pages.
I created a LoadingImage and DateImage to abstract the image loading animation for every future image. Suggestions and code optimization are welcome 😀

It'll be great if you can :star: the repo if you liked it .


jdbc catalog

Whether the connection of jdbc catalog can be added, such as mysql, oracle, sqlserver, pg and other catalogs.

starrocks has already supported it.


Ensure container height larger than items

When hiding / showing items it happens sometimes that the container's height changes faster than the items' opacities. This causes items to get "cut off" at the bottom. I removed the fade effect to make this issue more visible.
I'm using a flexbox layout.
My Configuration:
{
    animation: {
        effects: 'stagger(50ms) scale(0.5)',
        duration: 40000,
        easing: 'ease',
        perspectiveOrigin: '50% 0',
        animateChangeLayout: true,
        animateResizeTargets: true
    },
    controls: {
        enable: false
    },
    layout: {
        display: 'block',
        containerClassFail: 'empty'
    },
    selectors: {
        target: '.feed-item'
    }
}

The best solution to this problem is to apply a min-height to your container to ensure that elements are never "cut off"

I can't really do that, this page has dynamic content. This would cause the page to on occasions have a way larger height than necessary, and on other occasions the min-height might not be enough and I'd still have this issue. I hope you can consider reopening this issue.

Thanks for the additional information - that's very useful. Does your project require overflow: hidden; on your container?

It does, yeah.

Would you mind sending me a link to the page (if its live)?

Unfortunately I can't, this was client work for a campaign site, and the campaign has ended so we took the site down.

@CupOfTea696 Would be curious to find out what you did to overcome the problem …?

@tsawitzki I don't have a solution. The site went live with the bug.

I might have a similar issue. When I change the page on my news section the whole mixitup container seems to disappear for a split second. I tried adding min-height to both the mixitup container and the parent div but nothing works.
Here's the video of the issue:
Google drive link

@Kwapi can you give some information on how you specified the min-height? Did you use % or vh units? Maybe in case of % there is no relation as to what the min-height refers to?
Maybe you need to wrap something around the whole mixitup container and specify the min-height there? In your video even the whole footer moves up, so I was thinking there is some issue with the general html/css architecture maybe?

Hi @Kwapi - this isn't related to the issue above, but is more likely a markup structure issue. Would you be able to share a link to your project?

@tsawitzki @patrickkunka
I answered your questions and moved the issue to here


setup new rules

since i believe standart chess rules are illogical and unsatisfactory/ i want to develop new rules for non stalemate chess.
imitation is simple: i should have been enabled to capture my own pieces to gather positional advantage or avoid king mated because stalled by own pieces.
Also avoid stalemate that my opponent should capture his own pieces to move so if no other move. stalemate could becounted as a lost/
is it too complex for your code??

Sounds like an idea for a variant. You need to allow for capturing your own men. This would mess up alot of game variant engines. Most variant engines allow for specialized piece movement like fairymax. Not for specialized rules. If you always allow capturing your own men, forking chess.js would be relatively easy. However AI's need to be aware of these new possible moves. You could still have a statemate at the end... two kings or insufficient material :(

two kings or insufficient material is not stalemate\ it is a legal draw not like stalemate/

dude please, all traditional chess rules are faulty,
This is a great step for humanity,
perform this task if you can,
Earth Life depend on this,

I played by these rules and the dynamics were fun. Like 3-check variant.
Your pieces can sack your own pawns for quick tactical play. Game should be
called "Collateral damage". I'm working on moding chess.js to support the
rules.
On Sun, Jul 16, 2017 at 3:48 AM GuiltyKing<EMAIL_ADDRESS>wrote:

dude please, all traditional chess rules are faulty,
This is a great step for humanity,
perform this task if you can,
Earth Life depend on this,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jhlywa/chess.js/issues/155#issuecomment-315592091,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB0A16Ar9Tta6dlHLgchgHAR6Sxt7-1Sks5sOcA8gaJpZM4OLzGz
.

talking about unlogical rules/
all pawns should only promote to pieces which pieces they took place.
But promoting queen and king are not allowed due to royality principles. how many queen and king admin a state? imagine promoting 8 kings to mate seperately/ why they have let too many queens at a game while not king???
it is very well know that all seconds have fight back their own land at history.
let chess be logical. not a nonsense wood pushing rule game.

i know u cant mass with this. it is not easy change all algorythms.


Import manga series?

Feature Description
Hello, my kaizoku had been deleted on accident and when i rebuilt it with the stack I lost all my series.
Solution you would like
Any way to import series at all?
Alternatives you have considered
No response
Additional context
No response

if you meant to add the series with the downloaded chapters inplace, it is already implemented. Just add the series, point to the downloaded location, kaizoku would not redownload and only check for downloaded chapters.


build wheels for python 3.7

Hi Matt,
This PR has appveyor and travis build binary wheels for python 3.7.

It's because this is a PR. If you merged this then Travis will decrypt the password and all would be well (I think).


Fix Config Engine Import Bug

This PR fixes an import/compilation bug that occurs when using the generator. Below are two examples from both Aave V3 + Aave V2
Aave V2 Proposal compilation error when running make test-contract
 --> src/20240207_AaveV2EthereumAMM_2345/AaveV2EthereumAMM_2345_20240207.sol:4:1:
  |
4 | import {AaveV2ConfigEngine, AaveV2EthereumAMMAssets} from 'aave-address-book/AaveV2EthereumAMM.sol';
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

make: *** [test-contract] Error 1

Aave V3 Proposal compilation error when running make test-contract
Compiler run failed:
Error (2904): Declaration "AaveV3ConfigEngine" not found in "lib/aave-helpers/lib/aave-address-book/src/AaveV3Ethereum.sol" (referenced as "aave-address-book/AaveV3Ethereum.sol").
 --> src/20240207_AaveV3Ethereum_3245/AaveV3Ethereum_3245_20240207.sol:4:1:
  |
4 | import {AaveV3ConfigEngine, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

make: *** [test-contract] Error 1

thanks for the pr! i had a closer look and while your fix would have worked for this specific case it would have caused issues with other IAaveV3.* style imports. Also there was another issue with AMM pool. Both should be fixed in #213

Thanks for the message @sakulstra! Ill go ahead and close this PR


[WIP] web version clipboard loading and saving

WIP PR to implement the features suggested in issue #160.
The code in its current state works perfectly with Ctrl+C and Ctrl+V and with the "Save to Clipboard" menu option. I am not sure if it is possible to implement the "Load from Clipboard" feature in a functional manner, so it may be necessary to add a text popup, which the user can manually copy. Or perhaps the copy/paste shortcuts would be enough with a instructions in the UI on how to use them.

@yishn could you take a look at this, and tell me what the preferred implementation would be?

Hello @C0DEHERO, thank you for your work! I thought this was WIP, so I didn't comment.
There are certain drawbacks when hacking into the browser 'copy' and 'paste' events like this. For example, when you're writing a comment, you can't copy and paste into the comment box anymore. The browser will intercept the actions and try to copy/load the SGF. This is not good. This applies to all text boxes.
I thought of using clipboard.js for copying the SGF to the clipboard. As for loading SGF from the clipboard, I see no other alternative than to provide a text box and let the user paste the contents into it.  The most simple way (but not very user-friendly) is to use a prompt() box, but it will work.

Oh, right. I totally forgot about comment copy/pasting. It would of course be possible to check if the clipboard content is a valid SGF and then decide whether to call the loading function or to just pass the event on. I wasn't sure if it would be okay to use clipboard.js, but since it is, I'll use that instead.

I thought this was WIP, so I didn't comment.

My bad. I should've explicitly asked for feedback in the original comment. I figured it'd be better to ask rather than finish a full implementation that you wouldn't like.

No sweat, it's a good thing you asked!

So, this code works, but I'm not sure it's the nicest. Clipboard.js wants to its own event handler, so I had to add a class to the 'save to clipboard' button in menu.js unless I wanted to query ul.popupmenu.show li and then check for the textContent of the selected button, which would have been a lot uglier. So this is probably the better implementation. I also don't like the click: () => "", but I can't see how to remove the need for an empty callback function without modifying menu.js more than I probably should for just one button.


Port to Python 3

This is a port of Sushi from Python 2.7 to 3. All tests pass for me (Arch, Python 3.7), but I did not test this on any other system or version because opencv is usually only installed for your system Python version and I don't have VMs lying around. It should work down to 3.5, however, which is the latest still supported.
Things to note, in no particular order:

Python 2 support is removed, because unicode/str is a hassle.
Please verify the macOS installation instructions.
I didn't actually run this besides the tests, because I never used it. This was requested by people I know.
I made slight style adjustments to satisfy a very basic flake8 config (file included), most notably adding whitespace around operators.
No idea whether this will work on Travis CI for all specified versions (let's see what it does for this PR). Solved.
Now uses setuptools, which is the recommended tool by the PyPA.
Also uses a proper package structure and relative imports instead of having all source files in the root.
I did not attempt to build a Windows binary, nor do I plan to.

Please make use of this as you want. Python 2 will be EOL'd in 3 months and porting this to a more recent version wasn't that much work.

Thanks for this, I'm getting "sushi.common.SushiError: File does not start with RIFF id". When running the original Sushi (Python 2), it processes the subtitles without any issue.

He forgot to decode the byte strings or add the byte prefix.

Could you give an example invocation so I can try to reproduce (and add a test case, maybe)? Does it happen with any files or only with specific ones?

https://github.com/tp7/Sushi/blob/eb359e045ef4345539d9dd056e14f4bbcca90979/sushi/wav.py#L40
chunk.getname() returns bytes so every comparison has to be updated to compare against bytes not string.
Or you create a variable of chunk.getname() and decode that then use that to compare.

Thanks for the pointer. https://github.com/tp7/Sushi/pull/36/commits/8573e31392ce97392a156023c6c07e3f06c85ccc should fix this.

One minor fix is needed (otherwise it appears to work OK):
diff --git a/sushi/__init__.py b/sushi/__init__.py
index 524aaff..7847ea8 100644
--- a/sushi/__init__.py
+++ b/sushi/__init__.py
@@ -405,7 +405,7 @@ def calculate_shifts(src_stream, dst_stream, groups_list, normal_window, max_win
                 idx += 1
                 continue

-        left_audio_half, right_audio_half = np.split(tv_audio, [len(tv_audio[0]) / 2], axis=1)
+        left_audio_half, right_audio_half = np.split(tv_audio, [len(tv_audio[0]) // 2], axis=1)
         right_half_offset = len(left_audio_half[0]) / float(src_stream.sample_rate)
         terminate = False
         # searching from last committed shift```

Hello @FichteFoll
I have this issue trying to use your branch:
sushi.py", line 9, in <module>
    from itertools import takewhile, izip, chain
ImportError: cannot import name 'izip' from 'itertools' (unknown location)

It seems from https://stackoverflow.com/a/32659581 that in Python 3 the built-in zip does the same job as itertools.izip in 2.X; maybe you could switch?

Hello, it's maybe an extra-fix, but can you deal in this port with error like
  File "sushi/__main__.py", line 139, in parse_args_and_run
    run(args)
  File "sushi/__init__.py", line 635, in run
    calculate_shifts(src_stream, dst_stream, search_groups,
  File "sushi/__init__.py", line 430, in calculate_shifts
    shift = new_time - original_time
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'

(like issues #33, #32)
Thanks

I don't fully grasp the issue, but it seems it appears when the target audio is shorter than the source subtitles due to missing scenes. It's really not an issue I'm trying to solve here and should be fixed elsewhere, imo.

I published my fork under the name sushi-sub on pypi, so you can install it with pip, since @tp7 seems to be AWOL.
https://pypi.org/project/sushi-sub/
I do not intend to maintain the package other than keeping it running, but I will accept PRs to the master branch. I'm also looking for a tester on Windows to see if it can actually be used there and whether my installation intructions are correct.

Tbh I thought about merging this PR but then I'm really against merging the styling changes alongside the py3 support - those are your own preferences and I've no idea why you decided to mix everything into a single PR.
At some point I'll probably get around to cherry-pick some of the comments from here, just not right now. Separating it into a different project might be the best idea.

If by "styling changes" you're referring to https://github.com/tp7/Sushi/pull/36/commits/0d28fb5a7d07592719b88bb868a727ac3ca5deb7 (which are really just following PEP8 outside of the line length, see https://github.com/tp7/Sushi/pull/36/commits/424d8e050ceeea9ac583ab5af4cf83f1f37bdca9, but I agree that my personal preference aligns with that), then I can understand that. I don't particularly see a strong argument not to merge the addition of a couple spaces, but that's why I made it into separate commits in the first place so they could be easily reviewed and reverted or not-cherry-picked.
I can drop these two commits from the PR, but if you think there might be other things you don't agree with, I'll just wait. If you'd like to maintain the package on pypi then I would be more than happy to hand that over to as well, since I don't want to maintain a fork. I just made it usable with Python 3.

The python package for this PR works perfectly fine on Windows, with the exception(s) of needing opencv-python installed (I believe this one's present in most Linux distro repositories) and not printing colored text for warnings.

https://github.com/tp7/Sushi/blob/eb359e045ef4345539d9dd056e14f4bbcca90979/sushi/demux.py#L21
universal_newlines use in windows per default "Windows-1252" encoding-page.
This ends in UnicodeError if there are some special characters in the file.
I delete the option universal_newlines=True and changed in Line 24 return err to return err.decode('utf-8').
This works for me. This also should work in linux.
Maybe there is another better way to fix this.

Fixed and included in 0.6.2, thanks for the report.


Experimental parameters should not be hard coded in the package

For example the fraction of data used for training is a parameter that the user (in the jupyter notebook) might wish to change, and he/she shouldn't have to go into the package code to change that parameter.

Refactor code such that we have an ActiveLearning class.

Closed by 1d74fbf4f94580b9b19d9303903bfc54a0df8f29


Merges upstream repo changes

To keep upstream changes in-sync with our fork.

Closing, upstream repository has changed significantly


PyCharm is missing gcc

Describe the bug
When running PyCharm and you run something in debug mode a popup happens that asks if you want to install Cython. The issue is that when installing the extension the PyCharm package has no gcc which causes it to fail.
To Reproduce
Steps to reproduce the behavior:

Open PyCharm
Install Cython extension

Expected behavior
The plugin should install with no issues.
Screenshots

Notify maintainers
@edwtjo
Metadata

system: "x86_64-linux"
host os: Linux 5.4.100, NixOS, 21.05pre273435.0aeba64fb26 (Okapi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.10
channels(root): "nixos-21.05pre273435.0aeba64fb26, home-manager"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
attribute:
- jetbrains.pycharm-professional
- jetbrains.pycharm-community # Not sure the extension is available on the community version
module:

Try to reinstall or reset setting it should be fine

I never got it to work but this issue is resolved since it's now part of PyCharm.
https://www.jetbrains.com/help/pycharm/cython.html#prereq

PyCharm provides initial Cython support out of the box. PyCharm recognizes .pyx, .pxd, and .pxi files, and allows you to edit them. You can also compile these files into .so files using the Cython package.

Try to reinstall or reset setting it should be fine

I never got it to work but this issue is resolved since it's now part of PyCharm.
https://www.jetbrains.com/help/pycharm/cython.html#prereq

PyCharm provides initial Cython support out of the box. PyCharm recognizes .pyx, .pxd, and .pxi files, and allows you to edit them. You can also compile these files into .so files using the Cython package.


Make challenges composable

At the moment I believe Rally is limited to running a single track at a time per host. In order to create complex and more realistic loads in order to accurately simulate real production workloads, tracks run the risk of quickly becoming very complex and difficult to reuse efficiently. Combining workloads from multiple tracks currently means that a completely new track need to be created.
As more complex tracks simulating specific workloads are developed by the community, it would be useful if the track repositories were treated more as modules, so that it would be possible to create tracks/challenges that import from multiple existing tracks. This would make it easier to reuse work done by the community and reduce the time it takes to configure a new benchmark configuration.

Another concrete use case for this: Somebody wants to write a new track but reuse data from an existing one.


vTaskDelay inaccurate (IDFGH-6964)

I would like to understand how does vTaskDelay work exactly. I am having issues with time sensitive tasks. For my project, I need to create a task that would repeat itself precisely every 2 seconds. +-1ms is acceptable but not more than that.
The tick rate is configured to default 100hz value.
EXPERIMENT1
static void TIMER_TEST_TASK(void* parameters)
{
    static int counter = 0;
    for(;;)
    {
        counter++;
        int64_t task_execution_start = esp_timer_get_time()/1000; // get current time required for the task delay
        ESP_LOGW("TEST","time in miliseconds=%lli",task_execution_start);

        ESP_LOGW("TEST","PRINT STATEMENT FOR ADDITIONAL DELAY ");
        ESP_LOGW("TEST","PRINT STATEMENT FOR ADDITIONAL DELAY ");
        ESP_LOGW("TEST","PRINT STATEMENT FOR ADDITIONAL DELAY ");
        ESP_LOGW("TEST","PRINT STATEMENT FOR ADDITIONAL DELAY ");
        ESP_LOGW("TEST","PRINT STATEMENT FOR ADDITIONAL DELAY ");
        if(counter == 5 ){
            ESP_LOGW("TEST","PRINT STATEMENT FOR ADDITIONAL DELAY counter = 5 ");
            counter = 0;
        }

        int64_t task_execution_end = esp_timer_get_time()/1000;
        int64_t timestamp_difference = (task_execution_end - task_execution_start);
        ESP_LOGW("TEST","task execution end = %lli ms",task_execution_end);
        ESP_LOGW("TEST","timestamp difference = %lli \n",timestamp_difference);

    vTaskDelay(2000/portTICK_PERIOD_MS);
    }
}

As you can see from the function above, I capture the time when the task is started and when the task is ended. I then perfrom 2000ms delay.
The logs:
W (3674) TEST: time in miliseconds=2968
W (3674) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3674) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3684) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3694) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3694) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3704) TEST: task execution end = 3000 ms
W (3704) TEST: timestamp difference = 32

W (5714) TEST: time in miliseconds=5008
W (5714) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5714) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5714) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5724) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5724) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5734) TEST: task execution end = 5030 ms
W (5734) TEST: timestamp difference = 22

W (7744) TEST: time in miliseconds=7038
W (7744) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7744) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7744) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7754) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7754) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7764) TEST: task execution end = 7060 ms
W (7764) TEST: timestamp difference = 22

W (9774) TEST: time in miliseconds=9068
W (9774) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (9774) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (9774) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (9784) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (9784) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (9794) TEST: task execution end = 9090 ms
W (9794) TEST: timestamp difference = 22

W (11804) TEST: time in miliseconds=11098
W (11804) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (11804) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (11804) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (11814) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (11814) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (11824) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY counter = 5
W (11824) TEST: task execution end = 11127 ms
W (11834) TEST: timestamp difference = 29

W (13834) TEST: time in miliseconds=13128
W (13834) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (13834) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (13834) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (13844) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (13844) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (13854) TEST: task execution end = 13150 ms
W (13854) TEST: timestamp difference = 22

W (15864) TEST: time in miliseconds=15158
W (15864) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (15864) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (15864) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (15874) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (15874) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (15884) TEST: task execution end = 15180 ms
W (15884) TEST: timestamp difference = 22

W (17894) TEST: time in miliseconds=17188
W (17894) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (17894) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (17894) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (17904) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (17904) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (17914) TEST: task execution end = 17210 ms
W (17914) TEST: timestamp difference = 22

W (19924) TEST: time in miliseconds=19218
W (19924) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (19924) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (19924) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (19934) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (19934) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (19944) TEST: task execution end = 19240 ms
W (19944) TEST: timestamp difference = 22

W (21954) TEST: time in miliseconds=21248
W (21954) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (21954) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (21954) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (21964) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (21964) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (21974) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY counter = 5
W (21974) TEST: task execution end = 21277 ms
W (21984) TEST: timestamp difference = 29

W (23984) TEST: time in miliseconds=23278
W (23984) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (23984) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (23984) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (23994) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (23994) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (24004) TEST: task execution end = 23300 ms
W (24004) TEST: timestamp difference = 22

W (26014) TEST: time in miliseconds=25308
W (26014) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (26014) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (26014) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (26024) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (26024) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (26034) TEST: task execution end = 25330 ms
W (26034) TEST: timestamp difference = 22

W (28044) TEST: time in miliseconds=27338
W (28044) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (28044) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (28044) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (28054) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (28054) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (28064) TEST: task execution end = 27360 ms
W (28064) TEST: timestamp difference = 22

W (30074) TEST: time in miliseconds=29368
W (30074) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (30074) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (30074) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (30084) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (30084) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (30094) TEST: task execution end = 29390 ms
W (30094) TEST: timestamp difference = 22

W (32104) TEST: time in miliseconds=31398
W (32104) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (32104) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (32104) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (32114) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (32114) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (32124) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY counter = 5
W (32124) TEST: task execution end = 31427 ms
W (32134) TEST: timestamp difference = 29

W (34134) TEST: time in miliseconds=33428
W (34134) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (34134) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (34134) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (34144) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (34144) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (34154) TEST: task execution end = 33450 ms
W (34154) TEST: timestamp difference = 22

W (36164) TEST: time in miliseconds=35458
W (36164) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (36164) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (36164) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (36174) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (36174) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (36184) TEST: task execution end = 35480 ms
W (36184) TEST: timestamp difference = 22

W (38194) TEST: time in miliseconds=37488
W (38194) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (38194) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (38194) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (38204) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (38204) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (38214) TEST: task execution end = 37510 ms
W (38214) TEST: timestamp difference = 22

W (40224) TEST: time in miliseconds=39518
W (40224) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (40224) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (40224) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (40234) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (40234) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (40244) TEST: task execution end = 39540 ms
W (40244) TEST: timestamp difference = 22

W (42254) TEST: time in miliseconds=41548
W (42254) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (42254) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (42254) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (42264) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (42264) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (42274) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY counter = 5
W (42274) TEST: task execution end = 41577 ms
W (42284) TEST: timestamp difference = 29

W (44284) TEST: time in miliseconds=43578
W (44284) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (44284) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (44284) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (44294) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (44294) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (44304) TEST: task execution end = 43600 ms
W (44304) TEST: timestamp difference = 22

W (46314) TEST: time in miliseconds=45608
W (46314) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (46314) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (46314) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (46324) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (46324) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (46334) TEST: task execution end = 45630 ms
W (46334) TEST: timestamp difference = 22

W (48344) TEST: time in miliseconds=47638
W (48344) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (48344) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (48344) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (48354) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (48354) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (48364) TEST: task execution end = 47660 ms
W (48364) TEST: timestamp difference = 22

Lets look at the first 3 logs:
W (3674) TEST: time in miliseconds=2968
W (3674) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3674) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3684) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3694) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3694) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (3704) TEST: task execution end = 3000 ms
W (3704) TEST: timestamp difference = 32

W (5714) TEST: time in miliseconds=5008
W (5714) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5714) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5714) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5724) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5724) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (5734) TEST: task execution end = 5030 ms
W (5734) TEST: timestamp difference = 22

W (7744) TEST: time in miliseconds=7038
W (7744) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7744) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7744) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7754) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7754) TEST: PRINT STATEMENT FOR ADDITIONAL DELAY
W (7764) TEST: task execution end = 7060 ms
W (7764) TEST: timestamp difference = 22

The program starts at 2968 ms, the task ends at 3000ms. Since I have 2000ms delay, I expect the next task to start at 5000ms but there is 8ms error. Is this normal? Would it help to set the tick rate to 1000hz instead of 100
If I want my task to repeat precisely every 2000ms regardless of how long the task itself takes to execute, what is the best method?

@krupis vTaskDelay is not very accurate. It depends on other tasks getting scheduled, interrupts, etc. If you want to be more accurate, you should use an actual timer:

If you have some longer-running work to do, probably the esp_timer component is best, it schedules work in it's own task according to a hardware timer. It is still some imprecise due to the scheduling of callbacks inside a task, but you won't have accumulating latency anymore.
If you want to have the least latency, you should probably use the General Purpose Timer. I haven't used it myself but according to the description, you register user interrupts with it, hence you would have instant response but have a lot of restrictions because your code runs inside an ISR.

@krupis vTaskDelay is not very accurate. It depends on other tasks getting scheduled, interrupts, etc. If you want to be more accurate, you should use an actual timer:

If you have some longer-running work to do, probably the esp_timer component is best, it schedules work in it's own task according to a hardware timer. It is still some imprecise due to the scheduling of callbacks inside a task, but you won't have accumulating latency anymore.
If you want to have the least latency, you should probably use the General Purpose Timer. I haven't used it myself but according to the description, you register user interrupts with it, hence you would have instant response but have a lot of restrictions because your code runs inside an ISR.

Thank you for pointing me in the right direction. I have copy and paste all my task functions inside the timer callback function and everything seemed to work fine at first. I have created a timer as following:
        const esp_timer_create_args_t periodic_timer_args = {
            .callback = &periodic_timer_callback,
            /* name is optional, but may help identify the timer when debugging */
            .arg = (void*) this,
            .name = "periodic"
    };
    esp_timer_handle_t periodic_timer;
    ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));
    ESP_ERROR_CHECK(esp_timer_start_periodic(periodic_timer, 2000000));

I could see right away that the timestamp is much more accurate. And the my callback function is started every 2 seconds.
I would like to ask a few questions

Since using this timer and callback method is much more accurate, what is the difference between this method and using RTOS tasks? What are the drawbacks of using this periodic timer ?
Can I assign priorities to timer? What if I have multiple timers that all need to fire every 2 seconds
Inside my timer callback, if certain scenario is met, I want to create an rtos task. For example. after 60 seconds upon power up, I want to start led_blink_task. I have noticed that tasks are not created when xTaskCreate is being called from within the timer_callback. Is there any specific reason?

The differences are described here https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/esp_timer.html
With esp_timer no, you can't. esp_timer uses one HW timer for all events. If you require multiple low-latency timers, you need to setup multiple HW timers (General Purpose Timer) and assign them different interrupt priorities.
In general, the timer callback should be fast - just passing signals to lower priority tasks that will do what you need. Anyway, it should be possible to create a task within timer callback, I'll have a look

@krupis FreeRTOS delay accuracy can be affected by the FreeRTOS tick resolution, and the priority of the task executing the delay. For applications that require very accurate delays, please try esp_timer or one of the General Purpose HW timers.


gitter: remove (unmaintained upstream, probably useless now)

Description of changes
Remove the gitter package: no more upstream release in a while, upstream tells people to just use a Matrix client these days. My understanding is that this is the client for the Gitter backend pre-Matrix-migration, which doesn't exist anymore, so nobody should have a use case for it anymore.
cc @colonelpanic8
Things done

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

ref #254798


set >30m zero temps when needed for low minGuardBG

Up until now, minGuardBG < threshold has always set 30m zero temps, even when more than 30m of zero temping would be required to bring BG back up to target.  This sets longer zero temps (30-120m) as needed in those situations.
I also realized that since we added minGuardBG, low glucose suspend mode can only be triggered if BG < threshold but BG is predicted to be >= threshold in 5 minutes.  Rather than continue to special-case that corner case, I set minGuardBG = bg initially (so minGuardBG should always be <= bg), and consolidated the old bg < threshold code into the minGuardBG < threshold case.

I think this is ready to merge if no objections.


nodeport does not work with OVS/OVN 2.9

The fix is posted for review here:
https://mail.openvswitch.org/pipermail/ovs-dev/2018-March/345487.html
The fix should come with OVS 2.9.1
CC: @alinbalutoiu

Thanks @shettyg !
cc: @aserdean

Hello,
I have also been experiencing issues when trying to enable nodeport on the minion nodes using OVS2.9. For example when trying to ping from a pod to the external world only every second packet is received.  After removing -nodeport from the ovnkube it started working as expected.
Correct me if I am wrong but without the -nodeport setting it is not possible to expose and internal service to the outside world?
Kind Regards,
Mihail Velikov

@mihail-velikov
Your observations could be because of a different bug. Let me try and narrow the issue down. So, without -nodeport set, can your pods reach external world when they initiate the connection?

Yes, when i skip the "-nodeport" parameter for the ovnkube command on the worker node the network works as expected.
When I add the parameter - the network still works internally ( i can ping the other hosts internal IPs and such) but for example when I try to ping external IP I get around 70% packet loss. At first the behavior is to get reply for every second packet (example , sequence number 2-4-6-8). After around 30 second I lose my ssh session. While I am still able to ping the external IP the ssh session times out.

@mihail-velikov
Are you running the python ovn-k8s-gateway-helper? Till #258 gets in, we have a requirement that we run the python ovn-k8s-gateway-helper for -nodeport to work.
e.g:
https://github.com/openvswitch/ovn-kubernetes/blob/master/vagrant/provisioning/setup-k8s-minion.sh#L96

No, I have only tried to use the golang implementation as described in the READ.me file. I want to understand if the problem I am experiencing is the same as the one for which this issue was opened.
The python code is working as expected in our previous setup.

No, I have only tried to use the golang implementation as described in the READ.me file. I want to understand if the problem I am experiencing is the same as the one for which this issue was opened.

The problem you are experiencing is not because of this bug. This bug does make OVS 2.9.0 untenable. You should use 2.8.1 (For e.g: https://github.com/openvswitch/ovn-kubernetes/blob/master/vagrant/provisioning/setup-minion.sh#L67)
And for your particular problem, you will have to use the  python ovn-k8s-gateway-helper in addition to ovnkube till we get #258 in.

Ok, I will try tomorrow with 2.8.1 and the ovn-k8s-gateway-helper. Thanks

#258 got merged. So you likely don't need to use the python code anymore. Just ovnkube will do - the only difference after commit 258 is that ovnkube on nodes will not exit when -nodeport is provided - so you will have to run it in background.

Hello @shettyg,
It seems that the pull request that got merged fixed our problems with the intermittent network connectivity that I mentioned. The ping tests that I was doing are working as expected.
Still I am not able to expose the service to the outside world. I can see:
<IP_ADDRESS> is my datacenter network
<IP_ADDRESS> is my openvswitch network
Mar 28 06:24:35 lnx-4 ovn-nbctl: ovs|00001|nbctl|INFO|Called as ovn-nbctl set load_balancer 4d48a81d-2649-48b8-b6ce-9373238f6f61 "vips:\"<IP_ADDRESS>:31492\"=\"<IP_ADDRESS>:80\""
Mar 28 06:24:35 lnx-4 ovn-nbctl: ovs|00001|nbctl|INFO|Called as ovn-nbctl set load_balancer cb7f2526-7042-4a4e-bc9b-dca9ba3802a5 "vips:\"<IP_ADDRESS>:80\"=\"<IP_ADDRESS>:80\""

From inside the openvswitch network connecting to the internal service works as expected:
[06:25:41] root@lnx-5:[~]: telnet <IP_ADDRESS> 80
Trying <IP_ADDRESS>...
Connected to <IP_ADDRESS>.
Escape character is '^]'.
^]

From my machine:
➜  ~ telnet <IP_ADDRESS> 31492
Trying <IP_ADDRESS>...
telnet: Unable to connect to remote host: Operation timed out
➜  ~ ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>): 56 data bytes
64 bytes from <IP_ADDRESS>: icmp_seq=0 ttl=61 time=1.506 ms
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=61 time=1.050 ms
^C
--- <IP_ADDRESS> ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.050/1.278/1.506/0.228 ms
➜  ~ telnet <IP_ADDRESS> 22
Trying <IP_ADDRESS>...
Connected to <IP_ADDRESS>.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
^C
Connection closed by foreign host.

For these test I am still running openvswitch 2.9.0. I will try now with 2.8.1 and I will let you know how it goes.
Thank you.
Kind Regards,
Mihail Velikov

Hello again,
I have tested with openvswitch 2.81 and ovnkube only and everything works properly! Thanks a lot!
I will start working on the windows nodes now :)
Kind Regards,
Mihail Velikov

@mihail-velikov
From what I understand, Windows needs OVS 2.9. Since gateways are not installed on Windows nodes, that should be okay.

@mihail-velikov for the Windows node you could use the following guide from the official kubernetes docs. The doc will be sent upstream, but at moment you can find them here: https://github.com/alinbalutoiu/kubernetes.github.io/commit/92a12e605199070088b42b3a711b082a0fdc9cc1

@mihail-velikov what is your WIndows Server version? Run from cmd/powershell: wmic os get buildnumber

@alinbalutoiu - here is the build number
BuildNumber
14393
Also please note that on the windows node I am running openvswitch 2.7. Another thing that I found is that when I install the cloudbase openvswitch package it automatically adds a ovs-watcher service. I have since disabled this service and rebooted the machine but it didn't help.

That would be Windows Server 2016 RTM, we are trying now to update the old way that we used to do the things on that version.
You need this line in kubernetes: https://github.com/alinbalutoiu/kubernetes/commit/a994cb531a9e7cd01091997b1daa34e4f7941881#diff-e6e2181e7a7b69ff9cebf666c4ae1989R142
And this update to the CNI which adds the support for Windows Server 2016 RTM in this repo: https://github.com/alinbalutoiu/ovn-kubernetes/commit/5972e7bb30be0d70644cf44d7289edc13502b982
This would be the way that I'd recommend to go on Windows Server 2016 RTM. If you just want to deploy for testing you can use the old CNI from the upstream docs https://kubernetes.io/docs/getting-started-guides/windows/
Unfortunately on this specific Windows version there is a limitation and you cannot have the custom IP/MAC that OVN will assign to you, that will be managed by docker on Windows. There is also the limitation of one container per pod. In the newer Windows versions they added more flexibility and we can manage the container network endpoints from the CNI, thus controlling the IP/MAC address.

@alinbalutoiu - thanks a lot for the information.
Could you just confirm that on Windows 1709 I can use this installer file for OVS?
https://cloudbase.it/downloads/openvswitch-hyperv-2.7.0-certified.msi
The alternative is to compile openvswitch 2.9 from source and see if it works.
Thank you.
Kind Regards,
Mihail Velikov

@mihail-velikov please use https://cloudbase.it/downloads/openvswitch-hyperv-installer-beta.msi if all possible (it has a few bug fixes).
Note on 1709 you will require Hyper-V feature to install and run it properly (they broke backwards compatibility between RTM and RS3). I am still investigating how to add support for it.

Hello all,
In the past days I have tried to use Windows 1709 following these instructions:
https://github.com/alinbalutoiu/kubernetes.github.io/blob/92a12e605199070088b42b3a711b082a0fdc9cc1/docs/getting-started-guides/windows/index.md
Unfortunately I am not able to run it properly and it fails. As the machine does not have network connectivity I have attached several screenshots from the console:
https://imgur.com/a/lhwHG
Any ideas would be greatly appreciated :)
Kind Regards,
Mihail Velikov

It seems I have been installing Docker incorrectly - I was using the commands for Windows 2016 instead the ones for the insider build. I will try now with the correct ones to see if it makes a difference.
Kind Regards,
Mihail Velikov

Hi @mihail-velikov , there is a small mistake in the script, sorry about that. Can you change the single quotes to double quote? The variable does not get replaced in powershell if it's between single quotes and you can see that in ovs-vsctl show. It adds "$INTERFACE_ALIAS" under br-ex instead of adding the physical interface.
Replace '$INTERFACE_ALIAS' with "$INTERFACE_ALIAS" in the command ovs-vsctl --no-wait add-port br-ex '$INTERFACE_ALIAS'.
I will also update the documentation, thanks!

Hello @alinbalutoiu
I have tried that without luck:
https://imgur.com/a/LtzdH
It seems that the br-ext adapter does not get created for some reason. Also my IP address on my Ethernet interface is manually configured and not through DHCP - do I need to set this up on the bridge?
THank you.
Kind Regards,
Mihail Velikov

@mihail-velikov weird. Do you have Hyper-V feature installed on 1709?
@mihail-velikov can you also show the command for ovs-dpctl show also mind sharing the vswitchd.logs?

@aserdean - agree -it is quite strange :)
ovs-dpctl show:
https://imgur.com/a/sjbZN
hyper-v feature:
https://imgur.com/a/Jxq3e
ovs-vswitchd.log
https://imgur.com/a/gA50X
other info:
https://imgur.com/a/sKrP4

Here is my install procedure:
##disable the firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
##Install Hyper-V
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools
##Remove docker if exists
Stop-Service docker
Uninstall-Package docker
Uninstall-Module DockerMsftProvider
##Install docker for windows preview
Install-Module -Name DockerProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerProvider -RequiredVersion Preview
Restart-Computer -Force
##Install openvswitch
mkdir C:\ovs
cd C:\ovs
Start-BitsTransfer  https://cloudbase.it/downloads/openvswitch-hyperv-installer-beta.msi
cmd /c 'msiexec /i openvswitch-hyperv-installer-beta.msi ADDLOCAL="OpenvSwitchCLI,OpenvSwitchDriver,OVNHost" /qn'
##Put this script ins a file and run it
$INTERFACE_ALIAS="Ethernet"
Stop-Service ovs-vswitchd -force; Get-VMSwitch -SwitchType External | Disable-VMSwitchExtension "Cloudbase Open vSwitch Extension"
Get-VMSwitch -SwitchType External | Set-VMSwitch -AllowManagementOS $false
Ignore the error from the first command
Get-VMSwitch -SwitchType External | Set-VMSwitch -AllowManagementOS $false
ovs-vsctl --no-wait --may-exist add-br br-ex
ovs-vsctl --no-wait add-port br-ex "$INTERFACE_ALIAS"
Get-VMSwitch -SwitchType External | Enable-VMSwitchExtension "Cloudbase Open vSwitch Extension"; sleep 2; Restart-Service ovs-vswitchd
Clone the MAC Address of $INTERFACE_ALIAS on br-ex
$MAC_ADDRESS=$(Get-NetAdapter "$INTERFACE_ALIAS").MacAddress
$FAKE_MAC_ADDRESS=$MAC_ADDRESS.Substring(0,15)+"99"
Set-NetAdapter -Name "$INTERFACE_ALIAS" -MacAddress $FAKE_MAC_ADDRESS -Confirm:$false
Set-NetAdapter -Name br-ex -MacAddress $MAC_ADDRESS -Confirm:$false
br-ex will get all the interface details from the DHCP server now
Enable-NetAdapter br-ex

Get-Vmswitchextension *
Get-vmswitch *

Here is the result:
https://imgur.com/a/FCmb2

Can you disable the extension:
Disable-vmswitchextension *
And run:
Enable-VMSwitchExtension "Cloudbase Open vSwitch Extension"
and show me the output pls?

I wanted to test something so I restored the machine to a known good state. I will redeploy it and provide detailed logs and screenshots.

Thanks!

Ok, I have redeployed, replayed all steps and here are the logs :)
Here is the status after the packets are installed:
https://imgur.com/a/yAZGs
After running docker network create:
https://imgur.com/a/WAOB4
After running the configuration steps:
https://imgur.com/a/eAmCb
Openvswitch logs after install:
https://imgur.com/a/bxFGA
Network configuration:
https://imgur.com/a/pIAwF
Let me know if you need anything else :)

Sorry I didn't notice you had two vSwitches.
I'll add some more information on the topic:
OVS works only when enabled on a single vSwitch and only one Hyper-V vSwitch forwarding extension can be enabled at a time.
Mind trying something a bit simpler (Hyper-V route)? Here is a step by step instruction:
PS C:\Users\Administrator> Get-VMSwitch

Name SwitchType NetAdapterInterfaceDescription
---- ---------- ------------------------------
nat  Private

PS C:\Users\Administrator> Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet0                 Intel(R) PRO/1000 MT Network Connection      11 Up           00-0C-29-58-55-ED         1 Gbps

PS C:\Users\Administrator> ovs-vsctl.exe show
2fb03ee8-51e3-4272-a8a1-30e3ea5454eb
PS C:\Users\Administrator> New-VMSwitch -Name test -NetAdapterName Ethernet0 -AllowManagementOS $false

Name SwitchType NetAdapterInterfaceDescription
---- ---------- ------------------------------
test External   Intel(R) PRO/1000 MT Network Connection

PS C:\Users\Administrator> Get-VMSwitchExtension -Name "open vswitch extension" *

Id                  : 583CC151-73EC-4A6A-8B47-578297AD7623
Name                : Open vSwitch Extension
Vendor              : The Linux Foundation (R)
Version             : 2.9.90
ExtensionType       : Forwarding
ParentExtensionId   :
ParentExtensionName :
SwitchId            : 19f1eb28-41f3-4c71-88a9-e3407ad89808
SwitchName          : test
Enabled             : False
Running             : True
CimSession          : CimSession: .
ComputerName        : WIN-I44SFKIGO35
IsDeleted           : False

PS C:\Users\Administrator> ovs-dpctl.exe show
2018-04-03T11:33:10Z|00001|netlink_socket|ERR|fcntl: The system cannot find the file specified.
2018-04-03T11:33:10Z|00002|dpif|WARN|failed to enumerate system datapaths: Invalid argument
PS C:\Users\Administrator> Enable-VMSwitchExtension "open vswitch extension" test

Id                  : 583CC151-73EC-4A6A-8B47-578297AD7623
Name                : Open vSwitch Extension
Vendor              : The Linux Foundation (R)
Version             : 2.9.90
ExtensionType       : Forwarding
ParentExtensionId   :
ParentExtensionName :
SwitchId            : 19f1eb28-41f3-4c71-88a9-e3407ad89808
SwitchName          : test
Enabled             : True
Running             : True
CimSession          : CimSession: .
   : Media disconnected
   Connection-specific DNS Suffix  . : localdomain
PS C:\Users\Administrator> ping -t google.com

Pinging google.com [<IP_ADDRESS>] with 32 bytes of data:
Reply from <IP_ADDRESS>: bytes=32 time=53ms TTL=128
Reply from <IP_ADDRESS>: bytes=32 time=51ms TTL=128

Ping statistics for <IP_ADDRESS>:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 51ms, Maximum = 53ms, Average = 52ms
Control-C
PS C:\Users\Administrator>

Another thing to add is that OVS requires vmports to be named the same on the host (w/o the "vEthernet(" prefix). I.e.:
PS C:\Users\Administrator> Get-VMNetworkAdapter -ManagementOS

Name IsManagementOs VMName SwitchName MacAddress   Status IPAddresses
---- -------------- ------ ---------- ----------   ------ -----------
br0  True                  test       00155D1D830F {Ok}

PS C:\Users\Administrator> Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
br0                       Hyper-V Virtual Ethernet Adapter             15 Up           00-15-5D-1D-83-0F         1 Gbps
Ethernet0                 Intel(R) PRO/1000 MT Network Connection      11 Up           00-0C-29-58-55-ED         1 Gbps

The steps ##Clone the MAC Address of $INTERFACE_ALIAS on br-ex are required on cloud providers or any other environment that doesn't allow MAC address spoofing.
I hope that explains things a bit.
Now in your case it looks like the extension hasn't been properly initialized.
Mind running:
Disable-vmswitchextension *
Get-VMSwitch -SwitchType External | Enable-VMSwitchExtension "Cloudbase Open vSwitch Extension"
And verify via:
ovs-dpctl show if the extension was properly initialized?

@mihail-velikov I think you're hitting the same issue as the other guys. I have also updated the other issue with more details and a fix on it and updated the documentation: https://github.com/openvswitch/ovn-kubernetes/issues/287#issuecomment-378029996

Hello @aserdean,
No luck - no change after running the commands.
This is terribly familiar to me. I think I had the same issue when I initially tried to use 1709 with OVS.
The problem was that when you install docker it adds a second vmswitch that is used for its default "nat" network. This network can NOT be delete in 1709 because the powershell commandlets were removed. I will try to find the article I read about this.
Thanks a lot!
Kind Regards,
Mihail Velikov
but can be in 2016 RTM.
and that causes OVS not to work. Unfortunately they remove the functionality

@mihail-velikov to remove the default nat network you can run the following:
Stop-Service docker
# Get the ID of the nat network, you can use Get-HNSNetwork
Get-HNSNetwork -Id <hns_id> | Remove-HNSNetwork
cmd /c 'echo { "bridge" : "none" } > C:\ProgramData\docker\config\daemon.json'
Start-Service docker

On Windows Server RTM you have Get-ContainerNetwork and Remove-ContainerNetwork instead of the ones from above.

@alinbalutoiu  - First I tried the command with the pipe. Just to make sure it was executing correctly I got the ID of the switch by hand and then run the second command and replaced the ID manually. There was no difference though.

I have tried the following:

Restored the machine to a known good state

Stopped the firewall

Installed hyper-v

installed docker

rebooted

removed the default docker nat network

rebooted

Install openvswitch

rebooted

get-vmswitch was returning empty result

manually created a new vmswitch as per @aserdean recommendation
New-VMSwitch -Name test -NetAdapterName Ethernet -AllowManagementOS $false

get-vmswitch now shows the "test" switch

run:
$INTERFACE_ALIAS="Ethernet"
Stop-Service ovs-vswitchd -force; Get-VMSwitch -SwitchType External | Disable-VMSwitchExtension "Cloudbase Open vSwitch Extension"
Get-VMSwitch -SwitchType External | Set-VMSwitch -AllowManagementOS $false
Get-VMSwitch -SwitchType External | Set-VMSwitch -AllowManagementOS $false
ovs-vsctl --no-wait --may-exist add-br br-ex
ovs-vsctl --no-wait add-port br-ex "$INTERFACE_ALIAS"
Enable-VMSwitchExtension "Cloudbase Open vSwitch Extension" test; sleep 2; Restart-Service ovs-vswitchd

still ovs-dpctl gives the same error message as before

Hello @aserdean
Please excuse me for my late reply. Here is the output of the commands:

In the mean time I will download the latest insider preview version of Windows and run it in a virtulbox on my local machine to try and execute the same steps.
Let me know if you need anything else.
Thank you.
Kind Regards,
Mihail velikov

Hello again,
So I did a bit of testing:

Downloaded the latest windows insider build - 17623 (windows 2019)
Installed it locally
Removed the firewall
Installed hyper-v
Restarted the machine
Downloaded the  https://cloudbase.it/downloads/openvswitch-hyperv-installer-beta.msi and installed the package
restared the machine
Run ovs-vsctl.exe -V
2.7.4
Tried to manually add a new virtual switch using this commands:
New-VMSwitch -Name test -NetAdapterName Ethernet -AllowManagementOS $false
The switch was added
Enabled the "Cloudbase Open vSwitch Extension" for the switch test
It reported as enabled and running
run ovs-dpctl show but it still reported that:
netlink_socket|ERR|fcntl: The system cannot find the file specified.
dpif|WARN|failed to enumerate system datapaths: Invalid argument

One thing I noticed is that in the steps provided by @aserdean , the name of his extension and version is different - the name is "Open vSwitch Extension" and the version was 2.9.90
In my case the name is "Cloudbase Open vSwitch Extension" and the version is 2.7.4
Any thoughts?
Kind Regards,
Mihail Velikov

Hello again,
I have tried the same steps as above with the only difference that instead of using this package:
https://cloudbase.it/downloads/openvswitch-hyperv-installer-beta.msi
I used this one:
https://cloudbase.it/downloads/openvswitch-hyperv-2.7.0-certified.msi
This works successfully and the br-ex interface is created and working.
I guess there is some kind of a problem with the beta installer for openvswitch.
Thank you.
Kind Regards,
Mihail Velikov

Thanks a lot for the work @mihail-velikov .
I'll deploy the latest insider preview and will look into it this week.
We added some ansible playbooks to ease up deployments: https://github.com/openvswitch/ovn-kubernetes/pull/302 .
Do you mind trying them out?

Hey @aserdean,
It seems I forgot to post a reply.  I have written our own ansible code for provisioning our cluster due to some limitation that we have in our datacenters.
Btw I have already moved our cluster to windows 2019 preview and testing the stability, so .. wish me luck :)
Kind Regards,
Mihail Velikov

The original issue is fixed with the released OVS 2.9.1


Doesn't work in Windows

$ graphene
> module load -l /c/Windows/System32/rtPKCS11ECP.dll -n 123
Error Win32 error 126
at Error (native) PKCS11::Load:136
Help:
loads a specified PKCS#11 module
--lib          -l     Path to library
--name         -n     Name of module
Commands:
?              Prints help information

That error means either:
A) the path you specified to the library was incorrect
B) the path was correct but a dependency of the file you specified is missing.

FYI for anyone else that may come along this trail of breadcrumbs, for me on windows no matter how i specified the full path the the dll it would not load. however, completely omitting the path and just specifying the name of the dll allowed it to load successfully.
 graphene module load -n 123 -l "acpkcs211.dll"


Need to remove signing server and text changes required for the button.

Right now the Assisted Keys section talks about the 2 keys on our servers. As part of our move to miniscript, going forward we will only show IK here. Corresponding change has been given in design. The signing server screen needs to be removed from the flow.
Reference: https://bithyve-workspace.slack.com/archives/C037SN606P2/p1732853499697639

Verified this issue on keeper app v 1.3.1(432)