text:
[4.0.0-beta.18] @ionic/angular/dist/index"' has no exported member 'Content' (and 'Segment')

Bug Report
Ionic version:

[x] 4.x
Current behavior:

Considering the following code:

home.page.ts (line 3)

import { Content } from '@ionic/angular';

login.page.ts (line 2)

import { Content } from '@ionic/angular';

network-home.page.ts (line 7)

import { Segment, NavController } from '@ionic/angular';

And running the build command:
ionic cordova build android --prod

I get the following error message:
ERROR in src/app/core/pages/home/home.page.ts(3,10): error TS2305: Module '"/Users/tassiovale/Documents/develop/15158-ui-residential-routers/Code/03.LPI/intelbras-lpi/node_modules/@ionic/angular/dist/index"' has no exported member 'Content'.
src/app/core/pages/login/login.page.ts(2,10): error TS2305: Module '"/Users/tassiovale/Documents/develop/15158-ui-residential-routers/Code/03.LPI/intelbras-lpi/node_modules/@ionic/angular/dist/index"' has no exported member 'Content'.
src/app/modules/network/pages/home/network-home.page.ts(7,10): error TS2305: Module '"/Users/tassiovale/Documents/develop/15158-ui-residential-routers/Code/03.LPI/intelbras-lpi/node_modules/@ionic/angular/dist/index"' has no exported member 'Segment'.

Expected behavior:

The project is built successfully
Steps to reproduce:

npm i
ionic cordova build android --prod

Other information:

package.json

{
  "name": "lpi",
  "version": "0.0.1",
  "author": " ",
  "homepage": " ",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^7.0.0",
    "@angular/core": "^7.0.0",
    "@angular/forms": "^7.0.0",
    "@angular/platform-browser": "^7.0.0",
    "@angular/platform-browser-dynamic": "^7.0.0",
    "@angular/router": "^7.0.0",
    "@ionic-native/core": "5.0.0-beta.21",
    "@ionic-native/splash-screen": "5.0.0-beta.21",
    "@ionic-native/status-bar": "5.0.0-beta.21",
    "@ionic/angular": "^4.0.0-beta.17",
    "@ionic/ng-toolkit": "^1.0.8",
    "@ionic/schematics-angular": "^1.0.6",
    "@ngx-translate/core": "^11.0.0",
    "@ngx-translate/http-loader": "^4.0.0",
    "cordova-android": "7.1.4",
    "cordova-browser": "5.0.4",
    "cordova-ios": "4.5.5",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.2.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.5.0",
    "core-js": "^2.5.4",
    "lodash": "^4.17.11",
    "rxjs": "^6.3.3",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.10.0",
    "@angular-devkit/build-angular": "~0.10.0",
    "@angular-devkit/core": "~7.0.0",
    "@angular-devkit/schematics": "~7.0.0",
    "@angular/cli": "~7.0.0",
    "@angular/compiler": "~7.0.0",
    "@angular/compiler-cli": "~7.0.0",
    "@angular/language-service": "~7.0.0",
    "@ionic/angular-toolkit": "~1.2.0",
    "@types/node": "~10.12.0",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "puppeteer": "^1.9.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.1.6"
  },
  "description": "Interfaces Product Line",
  "config": {
    "ionic_webpack": "./config/webpack.config.js"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-sqlite-storage": {}
    },
    "platforms": [
      "android",
      "browser",
      "ios"
    ]
  }
}

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.5.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.18
   @angular-devkit/build-angular : 0.10.7
   @angular-devkit/schematics    : 7.0.7
   @angular/cli                  : 7.0.7
   @ionic/angular-toolkit        : 1.2.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none
   Cordova Plugins       : no whitelisted plugins (0 plugins total)

System:

   Android SDK Tools : 26.1.1 (/Users/tassiovale/Library/Android/sdk)
   NodeJS            : v8.9.4 (/usr/local/bin/node)
   npm               : 6.5.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.1 Build version 10B61

use IonContent or IonSegment etc.

Looks by design. See PR #16618 which addresses #16550. Many Ionic exports are now prefixed with Ion to avoid conflicting names. One common conflict was with @angular/core's Input, e.g.

Yep, all components are now prefixed: https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md#angular-prefixed-ion--components

authors: CFT-Chris manucorporat peterpeterparker tassiovale


text:
Events not emitted?

Bug Report
Ionic version:
[x] 4.x
Current behavior:
I was porting an old app developed with Ionic v1 to Ionic v4 and I started working using some beta. Everything was going fine, but as soon as v4 was officially released, suddenly many events in my app stopped working.
Events was simple (click)s in custom components, (ion-change) in a ion-select, or also a custom event published by a custom component. The callbacks associated to the events are just not called.
Expected behavior:
I expect callbacks registered to the events to be called when the event occurs.
Steps to reproduce:
I was able to reproduce the problem with a really basic example. This make me suspect there is something wrong in my specific installation, because it is so damn basic that virtually every v4 app out there could have this problem.
BTW:

I start a new blank project with ionic start testApp blank
cd testApp
ionic serve
Open the home.page.html created by ionic and add a simple footer

<ion-header>
  ...
</ion-header>

<ion-content padding>
  ...
</ion-content>

<ion-footer>
    <ion-toolbar>
        <ion-buttons slot="end">
            <ion-button (ion-click)="doIt()">
                <ion-icon name="calendar"></ion-icon>
            </ion-button>
        </ion-buttons>
    </ion-toolbar>
</ion-footer>

Add the doIt() method in home.page.ts

export class HomePage {
  doIt() {
    console.log('called');
  }
}

Wait until recompilation is done

Click on the calendar icon in the toolbar and... nothing is written in console

However if I add a button, it works:

<ion-content padding>
  <ion-button (click)="doIt()">Test me</ion-button>
</ion-content>

Related code:
The really strange thing is that in the real application I have a side menu in app.component.html like this:
<ion-menu side="start">
    <ion-content>
        <ion-list>
            <ion-item>
                <ion-label (click)="openModal1()">
                    Modal1
                </ion-label>
            </ion-item>

           <ion-item>
                <ion-label (click)="openModal2()">
                    Modal2
                </ion-label>
            </ion-item>
        </ion-list>
    </ion-content>
 </ion-menu>

with the two methods openModal1() and openModal2() defined in app.component.ts like this:
export class AppComponent {
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private modalController: ModalController
  ) {
    this.initializeApp();
  }

  initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
  }

  async openModal1() {
    const modal = await this.modalController.create({
      component: Modal1
    });
    return await modal.present();
  }

  async openModal2() {
    const modal = await this.modalController.create({
      component: Modal2
    });
    return await modal.present();
  }
}

The first entry works, so openModal1() runs and the modal opens (there I have the same issue but with an ion-change event of a ion-select, which is not fired), but the second enty does not: openModal2() is never called when I click on the second item.
Ionic info:
Ionic:

   ionic (Ionic CLI)             : 4.10.3 (/Users/marco/n/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.4.0

System:

   NodeJS : v10.14.1 (/Users/marco/n/bin/node)
   npm    : 6.8.0
   OS     : macOS Mojave

Hi there,
Thanks for the issue. When using Angular, you need to bind click events using (click) not (ion-click) as you wrote here:
<ion-footer>
    <ion-toolbar>
        <ion-buttons slot="end">
            <ion-button (ion-click)="doIt()">
                <ion-icon name="calendar"></ion-icon>
            </ion-button>
        </ion-buttons>
    </ion-toolbar>
</ion-footer>

Can you verify whether or not you are still seeing this issue when using (click) instead of (ion-click)? Thanks!

Hi Liam,
Thank you for your answer. I did copy&past wrong. My code always used (click), both the full app and the test one. I tried to replace with (ion-click) to see whether it could work.
However I can confirm that both (click) and (ion-click) does not work.
Thank you again!

Thanks for the follow up. I tried following the steps you listed in your original post, but am unable to reproduce the issue you are describing. Can you provide a repository with the code required to reproduce this issue?
Thanks!

Of course!
https://github.com/mpallante/ionic4-test
The code in this repo gives me the issue.
Now that you can't reproduce it, I'm quite sure there is something wrong in my computer, but I don't understand what. Maybe some node package? I'm pretty sure I didn't change anything except upgrade the real app from Ionic4-beta (can't remember what beta) to released v4.

Thanks for the follow up. When I click the button on the home page, the click event is firing, and I see called logged to the console.
Can you send over your user agent string? You can call window.navigator.userAgent from the dev tools console to see this.

Of course:
"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
I'm using Chrome 72.0.3626.119, with iPhone 6/7/8 simulation on.
But but... Something strange just happened: I disabled "toggle device toolbar" button in the inspector, going back to classic desktop browser view. I then tried to click on the button on the footer toolbar and... it worked!
Then I switched back to iPhone simulation, tried again and... still works!
Could it be a Chrome issue, then? I'm going back to check the real app, to see if this little trick works, and report back asap.

Liam, I can confirm that it is not a Ionic-related issue, but a Chrome one.
I tried my real app once again and now it seems to work. Both the (click) and (ionChange) events that were not working now work flawlessy. Moreover, after the switch from iPhone simulation to classic browser and back, it seems I never have the issue again.
At this point, I think we can close this issue. Sorry for the bother!

source: gharchive/issue

authors: liamdebeasi mpallante

repo: ionic-team/ionic

license: MIT

license_type: permissive

license_source: github-api


text:
AlertController - option to limit selected checkboxes

Ionic version:  (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ...  (check one with "x")
[ ] bug report
[x] feature request
Current behavior:
There is no option to limit the number of selected checkboxes in an AlertController.
Expected behavior:
It is a quite common task to let user select maximum x elements of a list. Would be great if the AlertController could support this by setting a "maxSelectable". Also requiring at least x selected elements is often needed so also "minSelectable" would be great. If maxSelectable is set to 3 and 3 checkboxes have been ticked, the others should be disabled until user unticks one checkbox. In case of minSelectable, if set to > 0, the OK button should be disabled until one element is selected.

I inspected some source codes of Ionic and somehow found something strange:
I thought I could simulate this by setting the "disabled" property of the input as soon as some checkboxes update, so I checked what happens when a checkbox is selected:
cbClick(checkedInput: any) {
    if (this.enabled) {
      checkedInput.checked = !checkedInput.checked;

      if (checkedInput.handler) {
        checkedInput.handler(checkedInput);
      }
    }
}

In case the input has a handler assigned, it will execute it, which would be great, since I could check the number of selected items and disable all which are not yet selected. However, checkedInput can never have a handler property, since its of type AlertInputOptions which does not allow this property, so Typescript always complains if I add a handler property.
export interface AlertInputOptions {
    type?: string;
    name?: string;
    placeholder?: string;
    value?: string;
    label?: string;
    checked?: boolean;
    disabled?: boolean;
    id?: string;
}

Seems like there is some inconsistency here?

Ok I found a workaround for simulating the maxSelectable attribute. Anyway it would be nice to have this built in. Seems like there is no way for minSelectable right now, but I will handle this in the upper forms "Done" button for now.
In case somebody also needs this before it gets implemented, you can achieve the same like this. Using some type casting allows attaching the "handler" property to the input. Please be aware that you need to reference alert.data.input instead of the original objects you pass into it, since the component creates a copy of each AlertInputOptions instead of referencing it.
Here is my workaround:
let optionHandler = (data : AlertInputOptions) => {
            let countChecked = alert.data.inputs.filter((option : AlertInputOptions) => {
                return option.checked;
            }).length;

            alert.data.inputs.forEach((option : AlertInputOptions) => {
                option.disabled = !option.checked && countChecked >= MAX_SELECTABLE_TAGS;
            });
        };
        this.tags.forEach((tag: Tag) => {
            alert.addInput(<AlertInputOptions>{
                type: 'checkbox',
                value: tag.id.toString(),
                label: tag.name,
                checked: this.selectedTagIds.indexOf(tag.id) !== -1,
                handler: optionHandler
            });
        });

I'll try your implementation thanks

Any idea on how to implement it with the HTML file? I placed the above code in my .TS file and what about the HTML File? thank you

authors: Screeze Trokal


text:
Use a framework method to get the Program Files (x86) path.

And do the same with the cartesian product of two lists.

No longer applicable with the #88 rewrite

source: gharchive/pull-request

authors: Krzysztof-Cieslak teo-tsirpanis

repo: ionide/dotnet-proj-info


text:
Αλλαγή καθηγητή στο μάθημα Αναγνώριση Προτύπων

Σχετικό Issue
closes issue#307
Σχετικό Pull Request
https://github.com/ioniodi/all_collections/pull/46
Συνεργάτες
Οι συνεργάτες θα κάνουν σχόλια ή θα αξιολογήσουν τις αλλαγές: @p19loli @p2019044
Προτεινόμενες Αλλαγές
-- Προσθήκη Καθηγητή στο φάκελο _people
-- Αλλαγή καθηγητή στο μάθημα Αναγώριση Προτύπων
..
Υπενθυμίσεις

[x] Έχω ανοίξει από πριν issue για τον καλό συντονισμό του project, το οποίο έχει πάρει το πράσινο φως με την αντίστοιχη ετικέτα
[x] Έχω ενημερώσει το issueNo παραπάνω με τον αριθμό του αντίστοιχου θέματος, ώστε να κλείσει αυτόματα με την αποδοχή αυτού του αιτήματος
[x] Έχω δημιουργήσει branch για τις αλλαγές

@TaniaStoupi θα πρέπει να γίνουν πολλές αλλαγές για να περάσει το pull request (π.χ. το closes issue δεν είναι σωστά δομημένο, το αρχείο .gitmodules δεν πρέπει να βρίσκεται εδώ κ.λπ.)

authors: TaniaStoupi diogenisAl

repo: ioniodi/sitegr

license: Unlicense


text:
Any ideas on subspacing components with render props?

I have certain components that have render props. Here's an example:
<SubspaceProvider mapState={state => state.myTable} namespace="MY_TABLE">
  <Table
    rows={[...]}
    renderRow={data => {
      return (
        <TableRow>
          <FooCell foo={data.foo}>
          <BarCell bar={data.bar}>
        </TableRow>
      );
    }}
  />
</SubspaceProvider>

My table component is in a subspace, so that it has a reducer which can handle its own selection logic, but those rows are being rendered inside the subspace, and they need to have their parents redux context.
Right now I subspace each row using subspace((_, rootState) => rootState), but this clearly sucks. For one thing it makes the strong assumption that the parent state selector is the root state selector, which is rather limiting. For a second, there's no way to do anything similar with action namespaces.
Do the authors have any thoughts as to how this might be supported, or if it is worth supporting?

I am aware that the obvious answer is that if the parent component itself does the rendering the components will be in its subspace, which is by far the cleanest thing from subspace's perspective. There are however plenty of good reasons to use render props, and in this case it's indispensable to the table patterning.

Seems like it should be easy enough to copy the rootStoreEnhancer patterning to create something like a parentStoreEnhancer, and then offer some sort of container that grabbed parentStore and used it for everything (getState and dispatch)

Hey @conartist6,
As you are aware, this is not something that is currently supported.
This sounds a bit similar to the desired outcome of #83.  In that proposal, you could mark a SubspacProvider with a transparent={true} prop and any children subspaces would skip it and use its parent as the parent store.  This feature would be ideal for components that need a bit of state for their own purposes but doesn't make sense to introduce a whole extra layer to the state tree.
The main difference that I can see between the scenario in the #83 and your is that the children you are passing as render props aren't necessarily wrapped in SubspaceProviders themselves.  You could fake it with something like:
<SubspaceProvider mapState={state => state.myTable} namespace="MY_TABLE" transparent={true}>
  <Table
    rows={[...]}
    renderRow={data => {
      return (
        <SubspaceProvider mapState={state => state}>  // because it's parent is `transparent` the state would be the the state you want
          <TableRow>
            <FooCell foo={data.foo}>
            <BarCell bar={data.bar}>
          </TableRow>
        </SubspaceProvider>
      );
    }}
  />
</SubspaceProvider>

I'm not a big fan of this as faking the subspace structure is what led to the #83 proposal in the first place.
Your suggestion of adding a parentStoreEnhancer and effectively a reverse subspace is interesting.  The parentStoreEnhancer is something that has existed in many branches before as it's almost been required a few times during development, so I'm more than happy for something like that to exist.  The reverse subspace container (ParentSpaceProvider?) is not something I've considered before, but on the surface, it sounds like an ok escape hatch in these situations. I'm imagining something like:
<SubspaceProvider mapState={state => state.myTable} namespace="MY_TABLE">
  <Table
    rows={[...]}
    renderRow={data => {
      return (
        <ParentSpaceProvider>
          <TableRow>
            <FooCell foo={data.foo}>
            <BarCell bar={data.bar}>
          </TableRow>
        </ParentSpaceProvider>
      );
    }}
  />
</SubspaceProvider>

Or perhaps Table would use it internally when calling the render prop?
As you suggested, parentStoreEnhancer would be more or less the rootStoreEnhancer but just sticking the store into a parentStore key.  The ParentSpaceProvider component would also be very similar to the SubspaceProvider component, but instead of creating a subspace to pass down the context, it would just grab the parentStore off the store and pass that down (probably falling back to the original store if there is not parentStore value).
Feel free to think up a better name for ParentSpaceProvider.
I guess my only concern is whether or not this actually fits with design goals of the library.  This introduces some knowledge into the child component that it exists within a subspace.  In the case of render props, this is less of a concern as the parent is specifying which of its children belong to the subspace and which don't but the existence of the component means that it will be abused by people wanting to just traverse up and down the tree at will to find the exact piece of state they're after.  One could argue that this is already possible with the rootStore parameter of the mapState function (to traverse down at least), so maybe this is not a big issue.
I'd be interested get @jpeyper's take on it.  He's usually pretty good at whether something feels right in these situations.  He's on holiday at the moment and may not get to this soon though, so if you want to take a run at it in the meantime and get a PR up, I think it should be fine.

I wrote the PR and I should have time to polish it up and submit it today. The second example in your response above is almost exactly what I wrote in the documentation for what I called ParentSubspaceProvider. I agree that in the example Table shouldn't know that it's in a subspace, which means that the render prop would definitely have the parent provider at its top level.

Are you ever truely on holiday in this world?
My feeling is that you hit the nail on the head, this doesn't fit the design goals.
But those design goals are utopia, and in the same vein as global actions, sometimes the child needs to be subspace aware. In these scenarios, it

Sorry, accidental close. My phone and holiday brain are a bit clunky.

Thanks @jpeyper, that reflects my thoughts quite nicely as well.  @conartist6, consider this the green light on the feature.  Can't wait to see a PR 😄

authors: conartist6 jpeyper mpeyper

repo: ioof-holdings/redux-subspace

license_source: bigquery


text:
Using multi stage build to keep the docker image clean

https://docs.docker.com/develop/develop-images/multistage-build/

Pull Request Test Coverage Report for Build 514

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

Totals

Change from base Build 512:
0.0%

Covered Lines:
5793

Relevant Lines:
5831

💛  - Coveralls

repo: iot-uca/back-end

license: mit


text:
Added ability to check balance from tips (when initiating/sending/preparing transfer)

see #80

@paulhandy please add the missing documentation for the patches.

Merged and updated in #112. Thanks for the help!

authors: kwek20 paulhandy pinpong


text:
🛑 备用KMS激活服务器 01 is down

In 3e92391, 备用KMS激活服务器 01 (s11.ikms.eu.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 备用KMS激活服务器 01 is back up in 47429a4 after 10 minutes.

repo: iougemini/ikms-uptime


text:
🛑 备用KMS激活服务器 01 is down

In 3baf9d9, 备用KMS激活服务器 01 (s11.ikms.eu.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 备用KMS激活服务器 01 is back up in 81d2be6 after 18 minutes.


text:
🛑 备用KMS激活服务器 01 is down

In 32282f1, 备用KMS激活服务器 01 (s11.ikms.eu.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 备用KMS激活服务器 01 is back up in 0f6641a after 19 minutes.


text:
iovisor/gobpf VS cilium/ebpf

Could someone tell the difference between iovisor/gobpf and cilium/ebpf?

https://networkop.co.uk/post/2021-03-ebpf-intro/
After read this link, you will get a better understanding.

repo: iovisor/gobpf


text:
improve e2e load tests (continued)

Load tests need to be improved:

[ ] make configuration accessible and documented
[ ] run this on CI
[ ] minimize test run time (resort to polling instead of waiting X time)
[ ] test for data loss more thoroughly
[ ] extract performance metrics
[ ] impose thresholds on performance metrics

@jimpick could you take this one?

repo: ipfs-shipyard/peer-pad


text:
Fixed static analysis complaints and other warnings.

I did a run with clang-modernize as well as -Wall and -Wextra, and this is what it caught.

:+1: would be nice to have crow compile without warnings

Thank you for your work. I applied this manually.

authors: Chaosteil ipkn pwnall

repo: ipkn/crow


text:
🛑 Lovely (img) is down

In da48b31, Lovely (img) (https://img.lovely.link/v1/invitation/profile?title=title&text1=text1&text2=text2&text3=text3&avatar=https%3A%2F%2Frandomuser.me%2Fapi%2Fportraits%2Fwomen%2F67.jpg&rating5=0) was down:

HTTP code: 504
Response time: 10355 ms

Resolved: Lovely (img) is back up in 689179f.

repo: iplanwebsites/up


text:
🛑 NowBoarding (tokyo) is down

In 99743c5, NowBoarding (tokyo) (https://tokyo.nowboarding.club/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NowBoarding (tokyo) is back up in 75185a0 after 5 minutes.


text:
Rich validation errors

So far EOF validation implementations return their own error code it is rather difficult to match them one-to-one.
Here is an idea to extend the return type to a tuple:

error code (8 bits) (as it is now)
error category (8 bits)
element index (32 bits?)

The error category is "more standardized" way of informing at what phase of validation the error happened. E.g. header, body, type section, code section, subcontainer.
The index informs at which element the error happened. We need to find a global or category-based recursive indexing.
First of all, we need to find a convenient method of numbering all subcontainers.

This is the categorization currently used in the EOF validation fuzzer.
EOFErrCat get_cat(evmone::EOFValidationError err) noexcept {
  using enum evmone::EOFValidationError;
  switch (err) {
  case invalid_prefix:
  case eof_version_unknown:
  case header_terminator_missing:
  case type_section_missing:
  case code_section_missing:
  case data_section_missing:
  case section_headers_not_terminated:
  case zero_section_size:
  case incomplete_section_size:
  case incomplete_section_number:
  case too_many_code_sections:
  case too_many_container_sections:
  case invalid_type_section_size:
    return EOFErrCat::header;
  case invalid_section_bodies_size:
    return EOFErrCat::body;
  case invalid_first_section_type:
  case inputs_outputs_num_above_limit:
  case max_stack_height_above_limit:
  case toplevel_container_truncated: // ?
    return EOFErrCat::type;
  case undefined_instruction:
  case truncated_instruction:
  case invalid_container_section_index:
  case stack_underflow: // stack?
  case unreachable_instructions:
  case invalid_code_section_index:
  case invalid_rjump_destination:
  case callf_to_non_returning_function:
  case invalid_dataloadn_index:
  case no_terminating_instruction:
  case invalid_non_returning_flag:         // ?
  case invalid_max_stack_height:           // stack?
  case stack_height_mismatch:              // stack?
  case stack_overflow:                     // stack?
  case stack_higher_than_outputs_required: // stack?
  case incompatible_container_kind:
  case jumpf_destination_incompatible_outputs:
    return EOFErrCat::code;
  case unreferenced_subcontainer:
  case eofcreate_with_truncated_container:
  case ambiguous_container_kind:
    return EOFErrCat::subcont;
  case unreachable_code_sections:
    return EOFErrCat::ref;
  case container_size_above_limit:
    return EOFErrCat::other;
  case success:
    assert(!"success");
    __builtin_trap();
  case impossible:
    assert(!"impossible");
    __builtin_trap();
  }
}

This starts to move into specifying an implementation instead of a data structure.  Besu layout parsing integrates the header parsing and header content parsing, so it always gets order different than evmone.  EEST accepted multiple error codes in https://github.com/ethereum/execution-spec-tests/pull/759, which besu has adapted our error codes to include.

So if they fail for different categories it's a fuzz break?

That's the intention. If we cannot make it work there is no point in standardizing it.

authors: chfast shemnon

repo: ipsilon/eof


text:
pip installation doesn't work a second time

So, I use Dropbox to sync my Jupyter setup between machines. Unfortunately, using the pip install approach on the second machine failed to successfully set up iPy-nb-ex:
> pip install --upgrade https://github.com/ipython-contrib/IPython-notebook-extensions/archive/master.zip --user
Collecting https://github.com/ipython-contrib/IPython-notebook-extensions/archive/master.zip
  Downloading https://github.com/ipython-contrib/IPython-notebook-extensions/archive/master.zip (9.5MB)
    100% |████████████████████████████████| 9.5MB 155kB/s
Requirement already up-to-date: …
Requirement already up-to-date: …
Requirement already up-to-date: …
Installing collected packages: Python-contrib-nbextensions, setuptools
  Found existing installation: Python-contrib-nbextensions alpha
    Uninstalling Python-contrib-nbextensions-alpha:
      Successfully uninstalled Python-contrib-nbextensions-alpha
  Running setup.py install for Python-contrib-nbextensions ... done
Successfully installed Python-contrib-nbextensions-alpha setuptools-20.3.1

Unfortunately, I still get:

Just reporting this, in case there's a way to fix this behavior (i.e. allow subsequent invocations of the pip install command to ‘fix’ broken or incomplete installations).
Meanwhile, and related: is there a sanctioned way to vendor these things into a git repository / config repo / dotfiles repo? Might I suggest that maybe the various extensions should be versioned separately, so they can be submoduled?

Hi there. Sorry to hear it's causing problems. Exactly what the problem is here will likely depend on what exactly

I use Dropbox to sync my Jupyter setup between machines

means. What exactly is sync'ed on Dropbox? I'm thinking mainly of the fact that the nbextensions configuration page (/nbextensions url) is provided by a server extension, which must obviously exist on the server machine, but that the main jupyter server is told to use the extension by its config file(s). So, it will make a difference whether those config files are part of your Dropbox sync. If they are, then you may find a slightly trickier situation on your hands - because the config file is modified by the setup.py installer (via the configure_nbextensions.py script) to add the server extension's location to the python path. Thus, if your config files are sync'ed, you'll need the path to the server extension to be the same on each of you machines, or the jupyter server won't be able to import the extension.
I realize that this is a bit of a ridiculous way of arranging things, and have been working on a proper pip package (i.e. one which will avoid ugly hacks like having to alter sys.path), but I'm still fiddling with it for now (it's my trav branch if you really want a look, but I'm still altering its history, so I'd advise not relying on anything there).

To list all config files in use by jupyter notebook, you can use the following python snippet
import os
from jupyter_core.paths import jupyter_config_path

for p in jupyter_config_path():
    for ext in '.py', '.json':
        conf_path = os.path.join(p, 'jupyter_notebook_config' + ext)
        if os.path.exists(conf_path):
            print(conf_path)

Obviously, if your python libraries are dropbox sync'ed, then the installation on the second machine is likely to do nothing, as the code will already be in place. Also, based on the log of your install, I'm not sure that the configure_nbextensions.py script actually got run - it's supposed to print a bunch of output, although the fact that it's run through pip may strip/redirect some of that. Anyway, if that's the case, then it's possible that you could fix your issue by simply running that configure_nbextensions.py script...

It's also possible (likely?!) that this was actually just a result of my stupid bug from #569, and thus a duplicate of #579, and should now have been fixed by #580...

Might I suggest that maybe the various extensions should be versioned separately, so they can be submoduled?

Versioning each separately - yes that would, in many ways, make sense. There are a few extensions which have been grafted in from other repos, notably scratchpad, latex_envs and highlighter come to mind. The main downside would be distributing the work of fixing issues across many small repositories, along with the fact that at the moment we don't have a good way of managing dependencies. We will possible shortly switch to python packages, to align with notebook 4.2, and in future presumably move to npm along with notebook 5, and although git submodules might be ok, I've not used them enough to be comfortable setting that up from scratch.

closing as outdated, given our new installation method


text:
IPython Markdown not working when saving as HTML

When i save a notebook as HTML which call a code variable inside a markdown, it does not show it correctly as shown in the figure below

Same thing happens when using nbconvert to pdf.

@clayms if you run nbconvert with the debug flag, you should hopefully be able to see which preprocessors are being used - there should be a pre_pymarkdown.PyMarkdownPreprocessor preprocessor which does the variable substitution? It should be configured in one of the install scripts (see configure_nbextensions.py#L142), but it's possible that config gets confused by being set in other places, since the preprocessors are a list, so the whole list can get replaced ratehr than being appended to.
@Shaun1818 apologies for the late reply. How are you saving as html? Using the File > Download as... > HTML (.html) menu item? Can you get debug-level logging, e.g. running the server with the --debug flag?

@Shaun1818, Thanks to @juhasch and reading instructions more thoroughly, downloaded  pre_pymarkdown.py  and put in my PYTHONPATH folder, which for me is the Anaconda folder.
I think this issue can also be closed now, same as the referenced issue on nbconvert repo.

@clayms ah, thanks, didn't notice it was a link to a specific issue! (https://github.com/jupyter/nbconvert/issues/320 in case anyone else is as lazy as me 😄)


text:
Zugangsbeschränkung Code: Falsche Meldung

Es ist eine Zugangsbeschränkung mittels Code für einen Block angelegt.
Wird bei der Codeabfrage kein Code eingegeben und ich klicke über die Navileiste auf "weiter", kommt die Meldung: Es müssen erst alle Audio-Dateien vollständig abgespielt werden und auf allen Seiten bis ganz nach unten gescrollt werden. Es müssen erst alle Teilaufgaben bearbeitet werden.

Das passiert, wenn man beide Restrictions angeschaltet hat:
      <Restrictions>
        <CodeToEnter code="aaa">HAH</CodeToEnter>
        <DenyNavigationOnIncomplete response="ON" presentation="ON" />
      </Restrictions>

Ich würde ja sagen, genau betrachtet, ist die Meldung genau richtig Denn genau das hindert einem am weiter navigieren: Erst muss die Aufgabe ja zu ende bearbeitet werden. Es kommt nun hinzu, dass sie dafür wiederum freigeschaltet werden muss. Aber die Freischaltung an hindert einen nicht am navigieren - würde man nur CodeToEnter haben, könnte man an dieser Stelle weitergehen.

Ja klingt sinnvoll.

repo: iqb-berlin/testcenter-frontend


text:
Compatibility fixes and a standalone mockhsm example

This branch contains a small series of compatibility fixes needed to create a standalone mockhsm example application. I used this standalone application to test a Go based library I've developed.
There's four types of fixes:

warnings from a newer clippy version (1.78)
correct the key=value\n in the HTTP /status endpoint
RSASSA-PSS signature support in mockhsm
allow device-info outside an authenticated session

Additionally, I tested this using a new examples/mockhsm.rs which exports the mockhsm via HTTP. I thought it might be useful for others, but this commit could easily be reverted if not desired.

the rsa implementation partially reimplements https://github.com/iqlusioninc/yubihsm.rs/pull/493

I think this can be rebased and some commits should now conflict.

authors: baloo nholstein


text:
Pass env variable instructing CI to write Bazel cache

So it turns out that the postsubmit jobs were never actually writing to
the remote cache here. How were they still getting cache hits then?
Because until last week, the Kokoro postsubmit jobs were still
writing that cache. So given that they were running concurrently with
the GitHub jobs, we had a pattern that was totally consistent with
GitHub actions postsubmit jobs writing the cache: an initial build that
is slow followed by fast builds from a populated cache. The last Kokoro
build of the TF integration binaries was for
https://github.com/iree-org/iree/commit/e4dc88c3d1, so everything up to
that point was cached. When we next upgraded LLVM and invalidated a big
chunk of the cache, we no longer had anything writing it and builds
became very slow as they got no cache hits. Even more fun, I had ruled
out infrastructure issues because I could revert back to the old commit
and get a fast TF build, but of course that's just because the old
stuff was still cached!
This is basically impossible to test on presubmit because those runners
aren't allowed to write to the cache and I've put a lot of effort into
making it impossible to run presubmits to touch any postsubmit stuff.
(probably) fixes https://github.com/iree-org/iree/issues/10237

That's pretty amazing - great find :)

authors: GMNGeoffrey benvanik

repo: iree-org/iree


text:
Log compile and run commands on successful model tests too.

This pulls in my change at https://github.com/nod-ai/SHARK-TestSuite/pull/227 to add more logging to these test jobs. Now when a test runs and --log-cli-level=info is set, it will log the compile and run commands as they are launched. Previously these were only logged on test failure.
Sample logs: https://github.com/iree-org/iree/actions/runs/8973823928/job/24645200447?pr=17290#step:11:40
============================= test session starts ==============================
platform linux -- Python 3.11.9, pytest-8.2.0, pluggy-1.5.0
rootdir: /mnt/share/amdsharks/actions-runner-iree/_work/iree/iree
plugins: xdist-3.6.1, timeout-2.3.1, retry-1.6.2, reportlog-0.4.0
timeout: 1200.0s
timeout method: signal
timeout func_only: False
collected 2 items / 1 deselected / 1 selected

SHARK-TestSuite/iree_tests/pytorch/models/sdxl-scheduled-unet-3-tank/model.mlirbc::gpu_rocm_real_weights
-------------------------------- live log call ---------------------------------
INFO     root:conftest.py:393 Launching compile command:
cd /mnt/share/amdsharks/actions-runner-iree/_work/iree/iree/SHARK-TestSuite/iree_tests/pytorch/models/sdxl-scheduled-unet-3-tank && iree-compile model.mlirbc --iree-hal-target-backends=rocm --iree-rocm-target-chip=gfx90a --iree-opt-const-eval=false --iree-codegen-transform-dialect-library=/mnt/share/amdsharks/actions-runner-iree/_work/iree/iree/build_tools/pkgci/external_test_suite/attention_and_matmul_spec.mlir --iree-global-opt-propagate-transposes=true --iree-global-opt-enable-fuse-horizontal-contractions=true --iree-flow-enable-aggressive-fusion=true --iree-opt-aggressively-propagate-transposes=true --iree-opt-outer-dim-concat=true --iree-vm-target-truncate-unsupported-floats --iree-llvmgpu-enable-prefetch=true --iree-opt-data-tiling=false --iree-codegen-gpu-native-math-precision=true --iree-codegen-llvmgpu-use-vector-distribution "--iree-preprocessing-pass-pipeline=builtin.module(iree-preprocessing-transpose-convolution-pipeline, util.func(iree-preprocessing-pad-to-intrinsics))" -o model_gpu_rocm_real_weights.vmfb
INFO     root:conftest.py:407 Launching run command:
cd /mnt/share/amdsharks/actions-runner-iree/_work/iree/iree/SHARK-TestSuite/iree_tests/pytorch/models/sdxl-scheduled-unet-3-tank && iree-run-module --module=model_gpu_rocm_real_weights.vmfb --device=hip --parameters=model=real_weights.irpa --module=sdxl_scheduled_unet_pipeline_fp16_rocm.vmfb --input=1x4x1[28](https://github.com/iree-org/iree/actions/runs/8973823928/job/24645200447?pr=17290#step:11:29)x128xf16=@inference_input.0.bin --input=2x64x2048xf16=@inference_input.1.bin --input=2x1280xf16=@inference_input.2.bin --input=1xf16=@inference_input.3.bin --expected_output=1x4x128x128xf16=@inference_output.0.bin --expected_f16_threshold=0.8f --flagfile=real_weights_data_flags.txt
PASSED

============================== slowest durations ===============================
[34](https://github.com/iree-org/iree/actions/runs/8973823928/job/24645200447?pr=17290#step:11:35).50s call     SHARK-TestSuite/iree_tests/pytorch/models/sdxl-scheduled-unet-3-tank/model.mlirbc::gpu_rocm_real_weights

(2 durations < 0.005s hidden.  Use -vv to show these durations.)
=========================== short test summary info ============================
PASSED SHARK-TestSuite/iree_tests/pytorch/models/sdxl-scheduled-unet-3-tank/model.mlirbc::gpu_rocm_real_weights
======================= 1 passed, 1 deselected in 34.54s =======================

Whoops, this didn't land last week. Going to need to rebase it.


text:
catch processing errors and emit them as events

Previously, if the server received a malformed packet, the request processing would throw an uncaught error which can end up killing the node process.
Instead, add a try ... catch handler around the Request / Response processing and trigger an error event which can be caught and handled gracefully. Include an error message, the actual Error object, and the connection info in the event callback so aid debugging and make it possible to log where the bogus requests are coming from.

Thank you for this PR! Unfortunately, I am no longer a maintainer in this GitHub account, but I have merged your branch in my own fork, github.com/jhs/dnsd and I have included it in the v0.9.6 release.

Thanks for the quick turnaround. Will your fork be the authoritative repository for this package going forward in case I have other changes to suggest? I assume so given that you updated the npm metadata as such but I just wanted to be sure.

Yes, my fork is the official one. I started the project when I was in the iriscouch organization however I am no longer there. But I still maintain many of the projects here.

authors: demmer jhs

repo: iriscouch/dnsd


text:
Look for tools under GOROOT/bin correctly

Fixes #42

So fancy.
I'm starting to think self.gopath should be accessible as an array, since it's split all over the damned place.

authors: ironcladlou pmorie

repo: ironcladlou/GoTools


text:
Doesnt work with new Chrome

Hi I tried the latest library it doesn't work with new Chrome, works on FF and Safari.
An older version is linked here https://www.cssscript.com/touch-enabled-image-zoom-plugin-javascript/ and it works just fine.
Could you help with fixing the compatibility with Chrome?

Hi @jeremyrperry, here is the public URL of what I am facing. You need to try this on mobile though, as on desktop this works just fine --even in mobile resolutions.
Link1: https://codepen.io/swarad07/full/yZoxJy
This pen has the library source from the master branch of this repo. On Android - Chrome 71.0.357 - OnePlus 6T this doesnt work.
Link2: https://codepen.io/swarad07/full/QYMVLP
This pen has the source from https://www.cssscript.com/demo/touch-enabled-image-zoom-plugin-javascript/. This works just fine in all browsers, desktop as well as mobile.

Also on IE11 the ES6 syntax doesnt work for zoom function declaration.
If you change it to below where you initialize the arguments inside rather than inline as it should be for ES5, it works.
  var classNames = classNames || {};
  var settings = settings || {};```

resolved by pull request by @jeremyrperry in https://github.com/ironexdev/zoom/issues/2

repo: ironexdev/zoom


text:
Hotfix/remove typed logs

I just deleted the line that prints a lot of logs and version bump.

Coverage remained the same at 95.533% when pulling 6c6e0b267237c766dfe6fdcf5af24357abdcd5de on Pcosmin:hotfix/remove-typed-logs into 247410c24047b91fbd61e428aa4187aff80a5996 on ironmussa:master.

authors: Pcosmin coveralls

repo: ironmussa/Optimus


text:
Next/Link causing app to unmount

Describe the bug
For some reason if you use a next/link component and click the same link twice, the entire app will unmount and mount itself, causing some parts of my application to behave weirdly. Upon further inspection, clicking a link your already on will set the locale key on App to null (which is probably what's causing the issue). It seems that this only happens in production (im using vercel).
next-i18next.config.js
module.exports = {   i18n: {     defaultLocale: "en-US",     locales: ["en-US", "sv-SE"],   }, };
Occurs in next-i18next version
10.1.0
Steps to reproduce
I have created a minimal setup repo that's deployed to vercel
Expected behaviour
The app should not unmount if you click on a next/link component twice.
Screenshots
Everything fine

Until you click on the same link again

And what is router.locale?

And what is router.locale?

router.locale stays the same, checked it.

Just to be sure, i made another branch where i removed turborepo, so now its basically a fresh nextjs project with an extremely basic next-i18next configuration, problem still persists. vercel deployment

look like we have a same problem, this issue also happen when use router.push/replace

@JonahLund Can you link to the repo without turborepo?

@JonahLund Can you link to the repo without turborepo?

https://github.com/JonahLund/next-i18next_link_bug/tree/no-monorepo-test

How do I build and run this application in production mode? Can you remove the turbo dependency?

How do I build and run this application in production mode? Can you remove the turbo dependency?

I removed turborepo in the repo i linked, so its just a basic nextjs project, build using yarn run build, i deployed it using vercel.

Update: No need to deploy to vercel. I tested it with a production build locally, the problem still persists. So this is a global issue. Testing the prod build locally: yarn run build, and yarn run start.

Thanks for your help! I have been able to identify the issue. It's this useMemo call. When the same locale is passed multiple times, useMemo is not called, and thus locale remains equal to its instantiated value of null.
@JonahLund Would you be willing to work on a PR for this bug fix?

Thanks for your help! I have been able to identify the issue. It's this useMemo call. When the same locale is passed multiple times, useMemo is not called, and thus locale remains equal to its instantiated value of null.
@JonahLund Would you be willing to work on a PR for this bug fix?

Great! Yeah can do a PR to fix the issue.

I also seem to be getting this issue when running the dev server

authors: JonahLund hengwangsay isaachinman sharpn


text:
Example on how to use customDetectors

Specifically I want to set the language from a query string variable called locale

This information is readily available via i18next documentation and previous discussions in this repository.

This information is readily available via i18next documentation and previous discussions in this repository.

Then perhaps should not state this option to be next-i18next specific, no? Creates confusion.
"This table contains options which are specific to next-i18next. All other i18next options can be passed in as well."

@Fritiof Not sure exactly what you mean. The customDetectors array just allows you to push detectors per environment. See here. There's no proprietary logic otherwise.

authors: Fritiof cesarvarela isaachinman


text:
NPM On WIndows: Default shell is bash and not cmd

npm explore opens a bash shell and not a cmd shell, should be a cmd shell on windows

Fixed on 1aaf566b3d51a6485fe28f45134367c4b88cd13b

authors: isaacs markcowl

repo: isaacs/npm


text:
set_by_lua_block invalid syntax

I'd like to report that using set_by_lua_block syntax is unrecognized.
server {
  set_by_lua_block $res { return 32 + math.cos(32) }
}

is example straight from ngx-lua documentation.
nginx plugin 0.1.3
lua plugin 1.0.91-145-162

@Deadleg this still does not work when it appears in a file that is later included. So for example:
server {
  include file.conf
}

set_by_lua_block $res { return 32 + math.cos(32) }

I understand it the context can't be known, but location and other keywords work just fine.

repo: ishchenko/idea-nginx

license: WTFPL


text:
Issue 180

Change file upload mechanism to prevent reloading the page

Thanks!

authors: ColdHeat nategraf

repo: isislab/CTFd


text:
Automatically generate missing field handlers for fields that take an id parameter

For fields, like pet(id), that both take an id parameter and have a concrete type, we can automate the creation of a missing field handler.
Steps (roughly):

generate the createIsographEnvironment function in iso.ts, or in another file, but iso.ts is probably fine
the user adds a directive. Unfortunately, the user can't modify an existing field with new directives in a schema extension, so the user can modify the parent type

extend type Query @hasFieldWithStrongId(field: "user", param: "id")

have a struct that implements Deserialize with those fields (field, param), and deserialize it from the schema extension
generate the createIsographEnvironment function
this function should still accept a missingFieldHandler, which is called either before or after the built-in one. I would probably say after.

For fields like node, which do not have a concrete type, maybe we can use the missing field handler for the combination of the node + the refinement to a concrete type, or have some special syntax for that. IDK.

repo: isographlabs/isograph


text:
🛑 AgrocomercialCagir.isolucion.co is down

In 2ed8a96, AgrocomercialCagir.isolucion.co (https://AgrocomercialCagir.isolucion.co) was down:

HTTP code: 0
Response time: 0 ms

Resolved: AgrocomercialCagir.isolucion.co is back up in f8eb196.

repo: isolucionco/EstadoIsolucionHosting


text:
🛑 CYPDELR.isolucion.co is down

In 00be017, CYPDELR.isolucion.co (https://CYPDELR.isolucion.co) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CYPDELR.isolucion.co is back up in b79ae92.


text:
🛑 Upedagogicanacional.isolucion.co is down

In 3fbd8f0, Upedagogicanacional.isolucion.co (https://Upedagogicanacional.isolucion.co) was down:

HTTP code: 500
Response time: 28631 ms

Resolved: Upedagogicanacional.isolucion.co is back up in 1f3f284.

Resolved: Upedagogicanacional.isolucion.co is back up in adfb876.

Resolved: Upedagogicanacional.isolucion.co is back up in 960dc70.


text:
Add test cases for problem matcher logic

    > This looks great!

Thanks.

Do you think it would be possible to add a job to the test workflow that asserts the regex in isort-matcher.json matches against an expected file?

Could we compromise on merging this as is and creating an issue in the project assigned to me, then I'll try and do a more general helper action to test problem matchers, as the point you raise is valid for the others I use elsewhere too?

If isort's error message ever changed, this should be sufficient to let us know an additional pattern would need to be added.

If it was ever going to be changed, it would be beneficial to encourage them to add a separator between the filename and the error message, especially if they started to add additional error messages in future...
Originally posted by @peternewman in https://github.com/isort/isort-action/issues/66#issuecomment-1339510399

FYI @peternewman; Doesn't seem like I can assign you.

That was my plan all along! Mwahahaha!
More seriously, I think you just need to make people members of the org with read access to the repo to be able to assign them, that works for me on another org. I have a secret team called foo-contributors and add people to that.
Although maybe having replied to this issue will be sufficient now? Again it seems like it from past experience, unless it's the issue reporter that's the required state.

authors: jamescurtin peternewman

repo: isort/isort-action


text:
Question: window-length pros and cons

Hi,
RaCon is great. I was wondering if there were pros and cons to the --window-length parameter, which is 500bp by default. I tested 5kb -- so I know it gets a lot slower with length, but I was hoping there would also be some arguments that favor using a longer window such as 5kb.
Also, between minimap2 and RaCon there is clearly an ultra-fast gap-filling solution. I am toying around w/ the 2 tools in a kind of clunky way to do so. Do you have any recommendations for that?
Best,
John

Hi John,
longer window lengths should yield a bit higher accuracy, although there is no guarantee (I have a comparison somewhere, will update the comment next week). The speed downgrades more when the length of the longest sequence in a window multiplied with the maximal absolute value from the alignment scoring matrix exceeds the size of 16bit signed integer (~32k). 32bit integers are then used instead to avoid overflows in SIMD instructions. You can try window length 1500 with default scoring parameters.
If I understood correctly, you are trying to use minimap2 and racon to fill gaps of unfinished assemblies with TGS data? Or is it something else?
Best regards,
Robert

Hi Robert,
Thanks for the tips.
As for gap-filling -- yes I was able to accidentally fill small gaps using minimap2 and RaCon. It then occurred to me that Minimap2 and RaCon could be combined to have the same functionality (I think) as the commonly-used PBJelly2 gap-filler. Heck -- PBJelly2 could probably be updated w/ these 2 programs b/c now it uses BLASR and PBDagCon.
Best,
John

If miminap2 was able to map a whole read over a short gap (without break points), then racon will probably fill the gap. Otherwise, you have to fill the gap with any reads before polishing so that other reads can map to it.

authors: JohnUrban rvaser

repo: isovic/racon


text:
Добавление времени трека

При разработке бота столкнулся с проблемой, что не отдается продолжительность трека. Возможно ли это добавить в библиотеку?

логов нет, но юзер выбрал трек длиной 43 минуты, и забило ОЗУ на полную.

логов нет, но юзер выбрал трек длиной 43 минуты, и забило ОЗУ на полную.

Может возникла проблема не с длительностью, а скачиванием/получением трека по ссылке такой длины?
В таком случае, проблемы с ОЗУ на Вашей стороне. Ведь запрос к ВК на получение ответа не может вызвать утечку памяти

тогда, есть возможность просто добавить вместе с скачиванием, или получении треков любой имеющийся функции?

тогда, есть возможность просто добавить получение времени вместе с скачиванием, или получении треков любой имеющийся функции?

В классах Service/ServiceAsync имеются методы для получения треков по запросу. Каждый из этих методов возвращает список объектов Song, в котором есть свойство duration, к которому Вы можете обратиться.

@ayonovdenizs решили проблему?

да, спасибо за ответ

authors: ayonovdenizs issamansur

repo: issamansur/vkpymusic


text:
config.include not respected when paths are not in cwd, namely symlinked files

Expected Behavior
config.include paths override test-exclude lib's explicit ignore of parent paths, ../
Observed Behavior
Any file not in cwd is ignored.
Bonus Points! Code (or Repository) that Reproduces Issue
https://github.com/istanbuljs/test-exclude/blob/master/index.js#L60
Forensic Information
Operating System: OSX 10.10.5
Environment Information:
The caveat comes in here: I am using bazel build system to execute nyc. Bazel achieves fast reproducible builds partly by symlinking required files from a tmp directly under /private/tmp. This means any relFile path will start with ../ for any build done in bazel.
At the moment, I forked the repo with a patch just to move forward, but I would love suggestion and happy to make acceptable changes upstream if necessary
node & npm versions:
v4.6.0
2.15.9

@giannic thanks for reporting this; I'd love to figure a way to better support some common edge-cases like symlinks ... while still preventing weird files from being instrumented, e.g., files outside your project ... seems like there are quite a few edge-cases that would need to be worked through.

I have a different, though probably still not very common use case, where I use multiple test frameworks for some setup examples. Basically, I have a directory structure like this:
tap-nyc
    test
        index.spec.js
    package.json
src
    index.spec.js

Using tap-nyc as the working directory, running nyc tap ./test/**/*.spec.js passes the test, but no files are discovered by nyc since it's outside the current working directory, even if I've explicitly asked for the source files to be included using config.include.

authors: Wedvich bcoe giannic

repo: istanbuljs/nyc

license: isc


text:
How to use this in travis?

Please use the template provided below, when reporting bugs:
package.json
{
...
	"scripts": {
		"_mocha": "_mocha \"spec/*.spec.js\"",
		"test": "npm run test-cov",
		"test-cov": "nyc --require @babel/register --exclude dist/** --exclude spec/** --reporter text npm run -s _mocha"
	},
	"devDependencies": {
		"@babel/core": "^7.0.0-beta.34",
		"@babel/plugin-transform-runtime": "^7.0.0-beta.34",
		"@babel/preset-env": "^7.0.0-beta.34",
		"@babel/register": "^7.0.0-beta.34",
		"coveralls": "^3.0.0",
		"eslint": "^4.12.1",
		"mocha": "~4.0.1",
		"nyc": "^11.4.0"
	},
...
}

> nyc --require @babel/register --exclude dist/** --exclude spec/** --reporter text npm run -s _mocha

internal/child_process.js:323

    throw errnoException(err, 'spawn');

    ^

Error: spawn EACCES

    at _errnoException (util.js:1024:11)

    at ChildProcess.spawn (internal/child_process.js:323:11)

    at ChildProcess.wrappedSpawn [as spawn] (.../node_modules/nyc/node_modules/spawn-wrap/index.js:92:15)

    at exports.spawn (child_process.js:502:9)

    at module.exports (.../node_modules/nyc/node_modules/foreground-child/index.js:39:15)

    at Object.<anonymous> (.../node_modules/nyc/bin/nyc.js:65:3)

    at Module._compile (module.js:635:30)

    at Object.Module._extensions..js (module.js:646:10)

    at Module.load (module.js:554:32)

    at tryModuleLoad (module.js:497:12)

Expected Behavior
No errors
Observed Behavior
Bonus Points! Code (or Repository) that Reproduces Issue
Forensic Information
Operating System: the operating system you observed the issue on.
Environment Information: information about your project's environment, see instructions below:

run the following script:

sh -c 'node --version; npm --version; npm ls' > output.txt

share a gist with the contents of output.txt.

https://travis-ci.org/epoberezkin/ajv-merge-patch/builds/312396270

Strange but the same works in https://travis-ci.org/mysticatea/cpx


text:
not show selected items

I was wanting to use the select shown as a button with an icon (ie no labels)
is this possible ? max-labels=0 still shows "(x)" where x = number of selected items. All I want to do is to have an icon on the button instead of a text label
is there an option for this ..

Hi @jmls ,
There's no option for that, but if I recall correctly, there are some PRs which do that.

Is there any way to show just the number of items selected, to not show the labels or icons?

Hi @ataurrahim ,
Sorry for the late reply. If you see the manual and set "max-labels"=0, it will only show the number of items selected ("Total=XX").

Thanks @isteven

authors: ataurrahim isteven jmls

repo: isteven/angular-multi-select


text:
Add an icon for the reporting security vulnerabilities page

Add an icon for the reporting security vulnerabilities page

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

Needs approval from an approver in each of these files:

OWNERS

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

/cc @wattli

/cc @geeknoid

authors: istio-testing lei-tang


text:
Ensure kubectl explain works with Istio CRDs

Describe the feature request
kubectl explain allows you to look up documentation for any Kubernetes resource and its fields. This helps tremendously, since you don't need to use a browser to look up the information. Currently, kubectl explain does not work for Istio CRDs.
To make this work, the CRD's spec field should be properly structured instead of being just a map[string]interface{}, so this is not a simple task.

Apparently there's a tool that can automate the generation of the CRD from code https://github.com/kubernetes/kubernetes/issues/59154

I was able to generate YAML in the openAPIV3Schema format for our objects with protoc -I. -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/Users/snible/go/src/istio.io/istio/vendor/github.com/gogo/protobuf --swagger_out=logtostderr=true:. <.protoc file> after installing github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger.  Unfortunately I haven't been able to test it because I lack a K8s 1.14 cluster with CustomResourcePublishOpenAPI feature gate.

I can test it.  Please send me the generated CRDs.

This is somewhat hand-edited, but try
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: destinationrules.networking.istio.io
  labels:
    app: istio-pilot
    chart: istio
    heritage: Tiller
    release: istio
spec:
  group: networking.istio.io
  names:
    kind: DestinationRule
    listKind: DestinationRuleList
    plural: destinationrules
    singular: destinationrule
    categories:
    - istio-io
    - networking-istio-io
  scope: Namespaced
  version: v1alpha3
  validation:
    openAPIV3Schema:
      type: object
      properties:
        host:
          type: string
          description: |-
            REQUIRED. The name of a service from the service registry. Service
            names are looked up from the platform's service registry (e.g.,
            Kubernetes services, Consul services, etc.) and from the hosts
            declared by [ServiceEntries](/docs/reference/config/networking/v1alpha3/service-entry/#ServiceEntry). Rules defined for
            services that do not exist in the service registry will be ignored.

            *Note for Kubernetes users*: When short names are used (e.g. "reviews"
            instead of "reviews.default.svc.cluster.local"), Istio will interpret
            the short name based on the namespace of the rule, not the service. A
            rule in the "default" namespace containing a host "reviews will be
            interpreted as "reviews.default.svc.cluster.local", irrespective of
            the actual namespace associated with the reviews service. _To avoid
            potential misconfigurations, it is recommended to always use fully
            qualified domain names over short names._

            Note that the host field applies to both HTTP and TCP services.
        traffic_policy:
          description: |-
            Traffic policies to apply (load balancing policy, connection pool
            sizes, outlier detection).
        subsets:
          description: |-
            One or more named sets that represent individual versions of a
            service. Traffic policies can be overridden at subset level.
        export_to:
          type: array
          items:
            type: string
          description: |-
            A list of namespaces to which this destination rule is exported.
            The resolution of a destination rule to apply to a service occurs in the
            context of a hierarchy of namespaces. Exporting a destination rule allows
            it to be included in the resolution hierarchy for services in
            other namespaces. This feature provides a mechanism for service owners
            and mesh administrators to control the visibility of destination rules
            across namespace boundaries.

            If no namespaces are specified then the destination rule is exported to all
            namespaces by default.

            The value "." is reserved and defines an export to the same namespace that
            the destination rule is declared in. Similarly, the value "*" is reserved and
            defines an export to all namespaces.

            NOTE: in the current release, the `exportTo` value is restricted to
            "." or "*" (i.e., the current namespace or all namespaces).

The original CRD from istio 1.1.1
>kubectl explain destinationrules --recursive
kubectl explain destinationrules --recursive
KIND:     DestinationRule
VERSION:  networking.istio.io/v1alpha3

DESCRIPTION:
     <empty>

This is from the updated CRD
>kubectl explain destinationrules --recursive
KIND:     DestinationRule
VERSION:  networking.istio.io/v1alpha3

DESCRIPTION:
     <empty>

FIELDS:
   apiVersion	<string>
   export_to	<[]string>
   host	<string>
   kind	<string>
   metadata	<Object>
      annotations	<map[string]string>
      clusterName	<string>
      creationTimestamp	<string>
      deletionGracePeriodSeconds	<integer>
      deletionTimestamp	<string>
      finalizers	<[]string>
      generateName	<string>
      generation	<integer>
      initializers	<Object>
         pending	<[]Object>
            name	<string>
         result	<Object>
            apiVersion	<string>
            code	<integer>
            details	<Object>
               causes	<[]Object>
                  field	<string>
                  message	<string>
                  reason	<string>
               group	<string>
               kind	<string>
               name	<string>
               retryAfterSeconds	<integer>
               uid	<string>
            kind	<string>
            message	<string>
            metadata	<Object>
               continue	<string>
               resourceVersion	<string>
               selfLink	<string>
            reason	<string>
            status	<string>
      labels	<map[string]string>
      managedFields	<[]Object>
         apiVersion	<string>
         fields	<map[string]>
         manager	<string>
         operation	<string>
         time	<string>
      name	<string>
      namespace	<string>
      ownerReferences	<[]Object>
         apiVersion	<string>
         blockOwnerDeletion	<boolean>
         controller	<boolean>
         kind	<string>
         name	<string>
         uid	<string>
      resourceVersion	<string>
      selfLink	<string>
      uid	<string>
   subsets	<>
   traffic_policy	<>

https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ says that kubectl explain works on custom resources in Kubernetes 1.14 if --feature-gates=CustomResourcePublishOpenAPI=true.  Removing myself because I don't have a Kubenetes 1.14 to experiment with.

working on adding the openapi schema we generated to our CRDs. Assigning it to me for now.

Discussed with Ed that we would like to add description fields to the cmd output. Detailed description for top-level APIs, doc links for sub-fields, as crds are size-limited by kube api server to add the full description for all fields. https://github.com/kubernetes/kubernetes/issues/82292

CRD schemas are merged into master and release 1.4. https://github.com/istio/istio/pull/16320 kubectl explain should be able to retrieve schemas from the API server. Closing it now. We will discuss if there is any improvements needed in the next UX WG meeting.

Reopen the issue. With the upcoming release (supporting k8s 1.13, 1.14, 1.15), not every user will be able to use kubectl explain on their cluster given publishing CRDs to api server feature is only beta starting 1.15.
In Istio 1.6 where k8s 1.15, 1.16 and 1.17 are supported, we can make this work for all users.
Relevant PR is https://github.com/istio/istio/pull/18188.

fixed by https://github.com/istio/api/pull/1422

authors: esnible jasonwzm luksa mingfang

repo: istio/istio


text:
Disabling Observability data generation for specific micro-services in the Mesh

Describe the feature request
Currently Istio pushes the same Telemetry and Tracing configurations to the Envoy Sidecars and we can only control the Telemetry and Tracing configuration as a whole.
However, in a real world scenario, there could be micro-services with different perf requirements (including the data flow through the sidecars as they have an impact on the actual round-trip time) in the same Mesh. Therefore, there is a requirement to disable Telemetry and Tracing (and possibly other functionality) for specific micro-services.
In the current project I am working on, we have a mix of micro-services in the same cluster, where some of them have tight Perf Requirements (I would prefer to disable some of the unwanted functionality in these micro-service sidecars while having mTLS and some other features) while the majority of micro-services require most of the awesome benefits provided by Istio.
I do understand that this might complicate the design of Istio. However, I would like to explore the possibility of introducing such a capability.
Describe alternatives you've considered

Discarding Telemetry at Mixer level could be a solution to reducing the collected data. However it would not address switching off the Observability data generation as per the micro-service level Perf Requirements.

/cc @mandarjog
/cc @douglas-reid
I can imagine a knob on services that can control mixerfilter telemetry collection at the proxy. This works better than pod-bound knobs due to client-side telemetry cost spread across many pods for a service. We can attach the control to a virtual service / service.

See https://github.com/istio/istio/pull/11398 for a PR that includes a knob for controlling the performance stats collection by Envoy.  This is not related to the mixer telemetry; it is an additional knob for observability vs performance.

I'd like to add that istio policy has a pod-level annotations for control. Since we generally do not enable client-side policy checks, that is probably sufficient. Gateways run as separate pods, and also accept the policy control annotation.

authors: esnible kyessenov nadundesilva


text:
Does Mixerv2 support denier?

istio 1.4.2
does mixerv2 support denier?
https://preliminary.istio.io/zh/docs/ops/configuration/telemetry/in-proxy-service-telemetry/

The denier is replaced by the new authorization policy in 1.5. The mixer v1 denier is deprecated in 1.5. For mixer v2 (maybe you're actually referring to the WASM), I don't think it will support the mixer v1 denier, you can implement your own denier logic in WASM though.

There is no mixer v2 :) Telemetry v2 does not support authorization in either 1.4 or 1.5 (it's telemetry, not policy). Envoy upstream allows you to implement a custom extension for authorization flows that are not supported by istio (see for example, https://github.com/mandarjog/proxy/tree/jwt_header_sample/extensions/jwt_header).

authors: kyessenov lurenjia528 yangminzhu


text:
error unmarshalling config dump response from Envoy

(NOTE: This is used to report product bugs:
To report a security vulnerability, please visit https://istio.io/about/security-vulnerabilities/
To ask questions about how to use Istio, please visit https://discuss.istio.io
)
Bug description
I follow the canary upgrade procedure described here, however i've used profile to generate istio manifest. I'm upgrading from 1.5.2 to 1.6.5 My profile:
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  addonComponents:
    grafana:
      enabled: true
      k8s:
        podAnnotations:
          cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
    kiali:
      enabled: true
      k8s:
        podAnnotations:
          cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
  components:
    ingressGateways:
      - enabled: true
        k8s:
          replicaCount: 2
          podAnnotations:
            cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
    pilot:
      k8s:
        hpaSpec:
          minReplicas: 2
        replicaCount: 2
        podAnnotations:
          cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
  meshConfig:
    accessLogEncoding: JSON
    accessLogFile: "/dev/stdout"
    accessLogFormat: |
      {
        "log_type": "access_log",
        "start_time": "%START_TIME%",
        "route_name": "%ROUTE_NAME%",
        "method": "%REQ(:METHOD)%",
        "path": "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%",
        "original_url": "%REQ(X-ENVOY-ORIGINAL-URL)%",
        "response_code": "%RESPONSE_CODE%",
        "response_flags": "%RESPONSE_FLAGS%",
        "bytes_received": "%BYTES_RECEIVED%",
        "bytes_sent": "%BYTES_SENT%",
        "duration": "%DURATION%",
        "upstream_service_time": "%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%",
        "x_forwarded_for": "%REQ(X-FORWARDED-FOR)%",
        "x_credential_username": "%REQ(X-CREDENTIAL-USERNAME)%",
        "x_request_id": "%REQ(X-REQUEST-ID)%",
        "user_agent": "%REQ(USER-AGENT)%",
        "request_id": "%REQ(X-REQUEST-ID)%",
        "authority": "%REQ(:AUTHORITY)%",
        "upstream_host": "%UPSTREAM_HOST%",
        "upstream_cluster": "%UPSTREAM_CLUSTER%",
        "upstream_local_address": "%UPSTREAM_LOCAL_ADDRESS%",
        "downstream_local_address": "%DOWNSTREAM_LOCAL_ADDRESS%",
        "downstream_remote_address": "%DOWNSTREAM_REMOTE_ADDRESS%",
        "requested_server_name": "%REQUESTED_SERVER_NAME%",
        "istio_policy_status": "%DYNAMIC_METADATA(istio.mixer:status)%",
        "upstream_transport_failure_reason": "%UPSTREAM_TRANSPORT_FAILURE_REASON%"
      }
    defaultConfig:
      proxyMetadata:
        TERMINATION_DRAIN_DURATION_SECONDS: "60"
    enableAutoMtls: false

  values:
    global:
      proxy:
        excludeIPRanges: "10.60.1.0/24,10.40.10.0/24"
      tracer:
        zipkin:
          address: "jaeger-operator-jaeger-collector.monitoring:9411"

    pilot:
      keepaliveMaxServerConnectionAge: 40m
      traceSampling: 10

Command to generate manifest:
./bin/istioctl manifest generate --set profile=default --set revision=v165 -f my_profile.yaml > manifest_1_6_5.yaml
kubectl apply -f manifest_1_6_5.yaml

When i label my namespace as follows:
$ kubectl label namespace test-ns istio-injection- istio.io/rev=v165
and restart one pod i try to check if upgrade worked with command:
istioctl proxy-config endpoints ${pod_name}.test-ns --cluster xds-grpc -ojson | grep hostname
And i get following error:
Error: error unmarshalling config dump response from Envoy: unknown field "locality" in envoy_admin_v3.HostStatus
Affected product area (please put an X in all that apply)
[ ] Configuration Infrastructure
[ ] Docs
[X] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Expected behavior
See istio revision reference
Steps to reproduce the bug
Described above
Version (include the output of istioctl version --remote and kubectl version and helm version if you used Helm)

/bin/istioctl version --remote
client version: 1.6.5
pilot version: 1.5.2
pilot version: 1.5.2
istiod version: 1.6.5
istiod version: 1.6.5
data plane version: 1.6.5 (3 proxies), 1.5.2 (33 proxies)

kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.8", GitCommit:"ec6eb119b81be488b030e849b9e64fda4caaf33c", GitTreeState:"clean", BuildDate:"2020-03-12T21:00:06Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.8", GitCommit:"ec6eb119b81be488b030e849b9e64fda4caaf33c", GitTreeState:"clean", BuildDate:"2020-03-12T20:52:22Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

How was Istio installed?
With manifest generated via istioctl
Environment where bug was observed (cloud vendor, OS, etc)
k8s installed via kops
Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.

uhhh i used istioctl 1.5.2 to execute the command "istioctl proxy-config endpoints" that's why it was broken. When i switched to istioctl v1.6.5 it returns correct output.

I see the same thing.  It works with master (future 1.7) and 1.6.4.  When I tried with 1.5.4 client it didn't work.
We strive to make istioctl backwards and forwards compatible by a version with data planes.  It isn't always possible or easy to make the CLI flexible enough to work with future versions.  Unless you object I will close this and suggest the 1.5.x CLI will not work with 1.6.x sidecar.

authors: esnible jdomag


text:
Istio operator fails to reconcile ingress gateway service when gateway spec doesn't contain override for ports

Bug description
After upgrading Istio operator to 1.8.1 from 1.7.5 it fails to reconcile existing custom ingress gateway service.
Operator logs:
2020-12-14T16:23:31.486226Z    info    installer    Updating Service/istio-system/istio-ingressgateway-private (istio-controlplane/)
 2020-12-14T16:23:31.486518Z    error    klog    Observed a panic: &runtime.TypeAssertionError{_interface:(*runtime._type)(0x28a9640), concret
 goroutine 1013 [running]:
 k8s.io/apimachinery/pkg/util/runtime.logPanic(0x295da80, 0xc0022d76b0)
     k8s.io/apimachinery@v0.19.3/pkg/util/runtime/runtime.go:74 +0xa6
 k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
     k8s.io/apimachinery@v0.19.3/pkg/util/runtime/runtime.go:48 +0x89
 panic(0x295da80, 0xc0022d76b0)
     runtime/panic.go:969 +0x1b9
 istio.io/istio/operator/pkg/helmreconciler.saveNodePorts(0xc00000f520, 0xc00000f560, 0x0, 0x0)
     istio.io/istio/operator/pkg/helmreconciler/common.go:164 +0x396
 istio.io/istio/operator/pkg/helmreconciler.applyOverlay(0xc00000f520, 0xc003178028, 0x4, 0x4)
     istio.io/istio/operator/pkg/helmreconciler/common.go:130 +0x386
 istio.io/istio/operator/pkg/helmreconciler.(*HelmReconciler).ApplyObject.func1(0x0, 0x507b17)
     istio.io/istio/operator/pkg/helmreconciler/apply.go:210 +0x270
 k8s.io/client-go/util/retry.OnError.func1(0xcf1089, 0xc00317ced0, 0xc00327f6b8)
     k8s.io/client-go@v0.19.3/util/retry/util.go:51 +0x3c
 k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection(0xc00327f6d8, 0xcf6900, 0x0, 0x0)
     k8s.io/apimachinery@v0.19.3/pkg/util/wait/wait.go:211 +0x69
 k8s.io/apimachinery/pkg/util/wait.ExponentialBackoff(0x989680, 0x4000000000000000, 0x0, 0x3, 0x0, 0xc00327f6d8, 0xc00317a548, 0x0)
     k8s.io/apimachinery@v0.19.3/pkg/util/wait/wait.go:399 +0x55
 k8s.io/client-go/util/retry.OnError(0x989680, 0x4000000000000000, 0x0, 0x3, 0x0, 0x2f7f478, 0xc00327f920, 0x0, 0xcf0ea6)
     k8s.io/client-go@v0.19.3/util/retry/util.go:50 +0xa6
 k8s.io/client-go/util/retry.RetryOnConflict(...)
     k8s.io/client-go@v0.19.3/util/retry/util.go:104
 istio.io/istio/operator/pkg/helmreconciler.(*HelmReconciler).ApplyObject(0xc00180e190, 0xc003178028, 0xc003178000, 0x2e70eb0, 0xf)
     istio.io/istio/operator/pkg/helmreconciler/apply.go:191 +0x7a5
 istio.io/istio/operator/pkg/helmreconciler.(*HelmReconciler).ApplyManifest(0xc00180e190, 0x2e70eb0, 0xf, 0xc00305a000, 0x7b81, 0x0, 0x0, 0x0,
     istio.io/istio/operator/pkg/helmreconciler/apply.go:105 +0xc2f
 istio.io/istio/operator/pkg/helmreconciler.(*HelmReconciler).processRecursive.func1(0xc002bb5450, 0xc00180e190, 0x2e70eb0, 0xf, 0xc002bb5440,
     istio.io/istio/operator/pkg/helmreconciler/reconciler.go:192 +0x413
 created by istio.io/istio/operator/pkg/helmreconciler.(*HelmReconciler).processRecursive
     istio.io/istio/operator/pkg/helmreconciler/reconciler.go:169 +0x19f[]
 - Processing resources for Ingress gateways.panic: interface conversion: interface {} is nil, not []interface {} [recovered]
     panic: interface conversion: interface {} is nil, not []interface {}

Gateway spec from operator config:
- enabled: true
  k8s:
    service:
      loadBalancerSourceRanges:
      - x.x.x.x/32
    serviceAnnotations:
      service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
      service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
      service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
      service.beta.kubernetes.io/aws-load-balancer-type: nlb
  label:
    istio: private
  name: istio-ingressgateway-private

Looking at the code from stacktrace I see that it tries to copy ports from overlay, but it contains no override for ports. I have only override for loadBalancerSourceRanges through k8s.service.loadBalancerSourceRanges.
https://github.com/istio/istio/blob/f1aa586d3a2d0abd922d50077465ed96c53ff108/operator/pkg/helmreconciler/common.go#L129
https://github.com/istio/istio/blob/f1aa586d3a2d0abd922d50077465ed96c53ff108/operator/pkg/helmreconciler/common.go#L163
Could be a duplicate of https://github.com/istio/istio/issues/26507.
I can workaround this by specifying ports when loadBalancerSourceRanges is also present, but that is not expected.
Expected behavior
If there is no override for ports in overlay then don't try to save or require ports.
Version
1.8.1
How was Istio installed?
Istio operator helm chart (without istioctl).
Environment where the bug was observed (cloud vendor, OS, etc)
AWS EKS 1.18

I'm curious whether it is working before you upgrade istio operator from 1.8.1 to 1.7.5.
I'm asking because you're customize the ingressgateway name to istio-ingressgateway-private, so the ports part is required. If you change the ingressgateway name to default one: ``istio-ingressgateway`, it should be working.

drive by comment: I am not familiar with the code, but as I user I would expect the config yaml in the issue to work. Port should not be required

AFAIK, that's one of the differences between the build-in gateway and customized gateway.
We don't specify the ports in values.yaml or profile for customized gateway, that's why we need to manually specify the ports.

@morvencao It was working before. I downgraded back to 1.7.5 and it says that spec.ports is required as you mentioned. Not sure how we avoided that on 1.7.5🤔 I worked around it by specifying default ports explicitly and it even works on 1.8.1.
We run multiple ingress gateways in multi-tenant cluster. I expect every gateway service to use default ports if not mentioned otherwise. It seems like it is indeed a current behavior as far as you don't specify anything under k8s.service in gateway config like source ranges as it doesn't trigger service overlay 😄 Maybe we can make overlay fallback to default ports if these are nil.

This seems like a bug possibly introduced in recent versions of istio. I applied the config to Istio Operator with version 1.7.3 and it worked fine without having to specify the ports explicitly as is the case in recent version.

Istio-1.7.x also doesn't support this:
~/istio-1.7.3/bin/istioctl install -f iop-173.yaml
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
✔ Istio core installed
✔ Istiod installed
- Processing resources for Ingress gateways.                                                                                2020-12-23T04:17:34.522243Z	error	installer	failed to create "Service/istio-system/istio-ingressgateway-private": Service "istio-ingressgateway-private" is invalid: spec.ports: Required value
✘ Ingress gateways encountered an error: failed to create "Service/istio-system/istio-ingressgateway-private": Service "istio-ingressgateway-private" is invalid: spec.ports: Required value
- Pruning removed resources

you need to either set ports with service.ports k8s setting or with legacy helm values:

service.ports k8s settings:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  components:
    ingressGateways:
    - namespace: istio-system
      name: istio-ingressgateway-private
      enabled: true
      label:
        istio: private
      k8s:
        ports:
        - port: 15021
          targetPort: 15021
          name: status-port
          protocol: TCP
        - port: 80
          targetPort: 8080
          name: http2
          protocol: TCP
        - port: 443
          targetPort: 8443
          name: https
          protocol: TCP
        - port: 15012
          targetPort: 15012
          name: tcp-istiod
          protocol: TCP
        - port: 15443
          targetPort: 15443
          name: tls
          protocol: TCP

helm values:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  values:
      istio-ingressgateway:
        name: istio-ingressgateway-private:
        ports:
        - port: 15021
          targetPort: 15021
          name: status-port
          protocol: TCP
        - port: 80
          targetPort: 8080
          name: http2
          protocol: TCP
        - port: 443
          targetPort: 8443
          name: https
          protocol: TCP
        - port: 15012
          targetPort: 15012
          name: tcp-istiod
          protocol: TCP
        - port: 15443
          targetPort: 15443
          name: tls
          protocol: TCP

Found the root cause, the ports was override when applying k8s overlay, fixed this in https://github.com/istio/istio/pull/29787

authors: howardjohn morvencao neelakansha85 svrakitin