New page for Magma Dev Conf Recap

Added new page under community
Features 7 youtube videos-6 + feature
Still needs a separate CSS cleanup once approved

Signed-off-by: Jimmy McArthur<EMAIL_ADDRESS>

Here's a link to the preview of the page: https://60400978897f260008880aaf--magma-website.netlify.app/community/magma-dev-conference-recap-2021/


JSON: no longer getting proposals within double quotes

When I am inside quotes, I am no longer getting suggestions:

duplicate to #10184


[Guide] How to create a read-only user with RBAC

We don't yet have a guide for RBAC - are we going to have an overview, or just make this an example how-to and go into detail in the reference doc?

I think I answered my own question - this should be an example guide and go into detail in the ref doc, nvm!


Moya 10.0.1 installation via Carthage is not working

Cartfile:
github "Moya/Moya" ~> 10.0

Cartfile.resolved:
github "Moya/Moya" "10.0.1"

Error:
*** Building scheme "Moya" in Moya.xcodeproj
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -project /Users/emdos/Development/eMdOS/Playground/Carthage/Checkouts/Moya/Moya.xcodeproj -scheme Moya -configuration Release -derivedDataPath /Users/emdos/Library/Caches/org.carthage.CarthageKit/DerivedData/9.2_9C40b/Moya/10.0.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath ./ SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO (launched in /Users/emdos/Development/eMdOS/Playground/Carthage/Checkouts/Moya)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/m7/7xddbtzx2rz52pdm6n_ybgv40000gn/T/carthage-xcodebuild.h549xk.log

I uninstall Swiftlint and I'm still able to fetch Moya (11.0) properly with Carthage.

Any update when this will be resolved?

@shwetachitlangia Are you facing the same error regarding Swiftlint? @lucas34 was apparently able to fetch Moya without SwiftLint installed. Would love some feedback on this from Moya Carthage users

I just released Moya 11.0.2 with the patch for this. Please re-open if the problem continues


[Dialog][AlertDialog] Encapsulation issue when nesting them

Bug report
Current Behavior
When nesting AlertDialog and Dialog they control each other.
Expected behavior
They should only control their own respective content.
Reproducible example
https://codesandbox.io/s/tender-smoke-4rz00?file=/src/App.js
Suggested solution
Isolate different contexts should do the trick.
Additional context
This is similar to #681, same exact problem I think.

Closing as duplicate of https://github.com/radix-ui/primitives/issues/681

Oh yeah good point, that's another problematic combination.


Improve release process

At the moment the distribution is published as a Maven package during the creation of the GitHub release. This makes access to the distribution Zip hard to download from CLI tools. We want to publish the distribution as a GitHub release asset instead
Rename the release title to use the tag name instead.

fixed with #27


feat: add pinning strategy to the configuration

Improve UX for users that want a different pinning strategy in pixi add.
With this pr users can set the strategy they want:

semver: 1.2.3 ->  >=1.2.3, <2 and 0.1.0 -> >=0.1.0, <0.2
no-pin: 1.2.3 -> *
pin-exact-version: 1.2.3 -> ==1.2.3
pin-minor: 1.2.3 -> >=1.2.3, <1.3
pin-major: 1.2.3 -> >=1.2.3, <2
pin-latest-up: 1.2.3 -> >=1.2.3

Users can set it using pixi config set pinning-strategy no-pin.
The pixi add will show what it added to the toml file:
> pixi config set pinning-strategy pin-exact-version
> pixi add starship
Added starship ==1.19.0

Still missing:

[x] Documentation

Looks good at first glance.
I've opened https://github.com/prefix-dev/pixi/issues/1562 since I feel that pin-major should be the default.

@Hofer-Julian it should now implement this. In another pr we can also add it to the cli.
I was thinking this might also be a project specific configuration setting. so maybe adding it to the manifest aswell? 🤔

@Hofer-Julian it should now implement this. In another pr we can also add it to the cli.
I was thinking this might also be a project specific configuration setting. so maybe adding it to the manifest aswell? 🤔

Awesome, thanks @ruben-arts!
Being able to set the default in the manifest sounds good to me

Cant you already have a pixi config local to the project? Similar to a .cargo/config.toml?

Cant you already have a pixi config local to the project? Similar to a .cargo/config.toml?

Yes that is possible, was just a braindump as it might be a conflict prone file. But might not be that bad.

Cant you already have a pixi config local to the project? Similar to a .cargo/config.toml?

Yes that is possible, was just a braindump as it might be a conflict prone file. But might not be that bad.

I actually wasn't aware of that one. In that case I'd prefer the config :)

Would by nice if you can also have a pixi add --pinning-strategy ..!

@baszalmstra, yes!, I would like to merge this first


Roll Packages from 188a8468f557 to a5cfa609362a (13 revisions)

https://github.com/flutter/packages/compare/188a8468f557...a5cfa609362a
2023-07-12<EMAIL_ADDRESS>Roll Flutter from 65ff3cb9b45c to 3ec96a8a4a5d (5 revisions) (flutter/packages#4415)
2023-07-12<EMAIL_ADDRESS>[image_picker] Roll dependancies to avoid error (flutter/packages#4431)
2023-07-12<EMAIL_ADDRESS>[in_app_pur]: Bump com.android.billingclient:billing from 6.0.0 to 6.0.1 in /packages/in_app_purchase/in_app_purchase_android/android (flutter/packages#4422)
2023-07-12<EMAIL_ADDRESS>[file_selector] Avoids using path_provider in web example app. (flutter/packages#4445)
2023-07-12<EMAIL_ADDRESS>[rfw] Add some more documentation for RFW (flutter/packages#4349)
2023-07-12<EMAIL_ADDRESS>[ci] Enable LUCI legacy analysis (flutter/packages#4435)
2023-07-11<EMAIL_ADDRESS>[webview_flutter_wkwebview] NSError.toString (flutter/packages#4441)
2023-07-11<EMAIL_ADDRESS>[ci] Remove unused Chromium setup (flutter/packages#4437)
2023-07-11<EMAIL_ADDRESS>[flutter_plugin_tools] Reimplements the excerpt system inline in the tool, rather than relying on a separate package. (flutter/packages#4417)
2023-07-11<EMAIL_ADDRESS>[ci] Remove webview_flutter implementation opt outs for custom analysis (flutter/packages#4438)
2023-07-11<EMAIL_ADDRESS>[palette_generator] Add web support to unit tests (flutter/packages#4440)
2023-07-11<EMAIL_ADDRESS>[tool] Conditionalize color on stdout (flutter/packages#4436)
2023-07-11<EMAIL_ADDRESS>[go_router_builder] Cleans up builder code. (flutter/packages#4356)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Fix adding ORSSerialPort as a Swift package in Xcode

Fix adding ORSSerialPort as a Swift package in Xcode

Fixes #184


[go_router] Router cannot resolve location when launching app with deep links starting with app://

Description
My app uses deep links to link to navigate to certain routes inside the app.
I have a home page, from which the user can navigate to a details page which will then display details from the item with the id passed as a url parameter. I'm also bound to the following url format: app://details/:id
I have to support this format since legacy versions of this app all operate based on this format and old links shall remain functional.
Now, when I launch the app with app://details/12345, go router cannot resolve the route and throws the error "No routes for location /12345".
I'm using a shell route which wraps all routes with a CupertinoTabBar (the code sample below does not use shell route for simplicity, but the result is the same).
I only added a custom scheme (app) in the Info.plist file, I did not add a url name (CFBundleURLName).
How do I have to set up the router to achieve the desired behaviour? I've tried to replace the '//' with '/' in the redirect callback, but unfortunately the route parameters are empty when launching from a deep link. I've also looked at https://github.com/flutter/flutter/issues/115355, could this be related?
Steps to Reproduce and observations

Launch the app with the following commands and observe the in-app behaviour:

xcrun simctl openurl booted app://details/123456 -> Error
xcrun simctl openurl booted app://home/details/123456 -> Works as expected
xcrun simctl openurl booted app:/details/123456 -> Works and redirects to /home/details/123456
xcrun simctl openurl booted app:///details/123456 -> Works and redirects to /home/details/123456

I'm using go_router 6.4.0.

Code sample

import 'package:flutter/cupertino.dart';
import 'package:go_router/go_router.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _router = GoRouter(
    initialLocation: "/",
    routes: [
      GoRoute(
        path: "/",
        redirect: (context, state) {
          return "/home";
        },
      ),
      GoRoute(
        path: '/home',
        builder: (context, state) => const HomePage(),
        routes: [
          GoRoute(
            path: 'details/:id',
            builder: (context, state) {
              final id = state.params['id'];
              return TestPage(
                extra: id ?? 'No id provided',
              );
            },
          ),
        ],
      ),
      GoRoute(
        path: "/details/:id",
        redirect: (context, state) {
          return "/home${state.location}";
        },
      ),
    ],
  );

  @override
  Widget build(BuildContext context) {
    return CupertinoApp.router(
      routerConfig: _router,
    );
  }
}

class TestPage extends StatelessWidget {
  final String extra;
  const TestPage({
    super.key,
    required this.extra,
  });

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      navigationBar: const CupertinoNavigationBar(
        middle: Text("Details Page"),
      ),
      child: Center(
        child: Text(extra),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      navigationBar: const CupertinoNavigationBar(
        middle: Text("Home Page"),
      ),
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            CupertinoButton(
              child: const Text("Go to details page (without redirect)"),
              onPressed: () {
                context.go("/home/details/1234");
              },
            ),
            CupertinoButton(
              child: const Text("Go to test page (with redirect)"),
              onPressed: () {
                context.go("/details/1234");
              },
            ),
          ],
        ),
      ),
    );
  }
}

Logs

[✓] Flutter (Channel stable, 3.7.3, on macOS 13.0 22A380 darwin-arm64, locale
    en-DE)
    • Flutter version 3.7.3 on channel stable at
      /Users/antonstubenbord/Development/src/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (6 weeks ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/antonstubenbord/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.76.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • Anton’s iPhone (mobile)    • 00008101-00093D3E0290001E            • ios
      • iOS 16.2 20C65
    • iPhone 14 Pro Max (mobile) • 2C87B1EB-90C7-4056-B5DC-6C800AE893DC • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)            • macos                                •
      darwin-arm64 • macOS 13.0 22A380 darwin-arm64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Hi @astubenbord,
Please provide your flutter doctor -v and a minimal complete reproducible code sample along with steps to reproduce so that we can investigate this issue.
Please also provide the version of go_router you're using.
Thank you

Hi @danagbemava-nc,
sorry, I just added the information.
Thanks!

Hi @astubenbord, I believe what you're running into is the issue described in https://github.com/flutter/flutter/issues/100624.
Can you take a look and confirm if this is the case?

Hi @danagbemava-nc,
Yes, thank you, this is exactly the issue. I also tried with a custom url, and with that, it works as expected.

Hi @astubenbord, thanks for confirming.
Kindly follow up in the issue linked above for updates.
Closing from here as duplicate.
Thank you


Updated Windows.md (source for installers, arguments for cmake, VS 2019 as default, CMake 3.16+ recommended)

What do you think of splitting this up?  Let’s split out the bits not related to building and get those merged while we work on improving the build instructions.

Okay, since you think its better to merge this in this state, I don't think that its really that terrible to do that, lets get this merged and we can iterate on improving it further.


fix: corrected spelling mistake, reflected formatter's modification, and replaced complexed sentences

@hsgwa
I revised some pages to fix spelling and grammar mistake. I think that we need to hold sufficient time to revise this github pages in the future.


fix: Select onChange is being fired without explicit selection

SUMMARY
This PR fixes a bug in the Select component related to searched values that were automatically being selected without an explicit selection from the user. This happens because the onChange event is called when a value selection is made or when the input changes. This was only perceived with the introduction of autoClearSearchValue={false} in https://github.com/apache/superset/pull/23869. This PR changes the logic to only fire the onChange event when there's an actual selection by the user.
TESTING INSTRUCTIONS
I added a test to the component but we need to check the general use of selects in the application because there are wrappers that override the component behavior such as SelectControl and SelectFilterPlugin.
ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Required feature flags:
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

/testenv up

@jinghua-qa @sadpandajoe Could you help us test the PR?

Hey @michael-s-molina thanks for this. I see we are adding a bunch of logic to control how the onChange event is being triggered. Just trying to understand what's the benefit of doing this VS enforcing that the wrapper components use the onSelect / onDeselect handlers instead?

That's a great question. The difference is that the onChange event works with all selected values at once which is ideal for bulk updates such as Select All.

/testenv up

\testenv up

/testenv up

@michael-s-molina I think it makes sense to make the autoClearSearchValue an option that can be controlled from the wrappers. I am looking at the Dashboard properties to set owners. I don't think this functionality is very useful in that sense and it might be confusing as well. What do you think? Maybe we can consider that for a future iteration.
I found a small issue. When clicking on the input when there is a search value, the search value disappears. I think we need to control the target of the click.
https://github.com/apache/superset/assets/60598000/e4a29a28-b8ef-46c7-b163-37eb70304902
Another weird aspect of the Select, that has nothing to do with this PR, but that I'd like to point out. When hitting Enter on a new search value, I am expecting that the value will be added to the options, like it happens when there is no other match and the value is new. However, when the search value matches with an already selected value that is focused, hitting Enter not only does not select the search value, but deselects the focused value, which is super confusing.
https://github.com/apache/superset/assets/60598000/667783bd-bad5-4518-a704-0ce9dd030857

@michael-s-molina I think it makes sense to make the autoClearSearchValue an option that can be controlled from the wrappers. I am looking at the Dashboard properties to set owners. I don't think this functionality is very useful in that sense and it might be confusing as well. What do you think? Maybe we can consider that for a future iteration.

I exposed autoClearSearchValue as a property and now it can be overridden as you suggested.

I found a small issue. When clicking on the input when there is a search value, the search value disappears. I think we need to control the target of the click.

This is a bug with Ant Design that was fixed on version 4.24.5 which is some leap from our current 4.10.3 version. Unfortunately, we may delay this fix until Ant Design is upgraded.

Another weird aspect of the Select, that has nothing to do with this PR, but that I'd like to point out. When hitting Enter on a new search value, I am expecting that the value will be added to the options, like it happens when there is no other match and the value is new. However, when the search value matches with an already selected value that is focused, hitting Enter not only does not select the search value, but deselects the focused value, which is super confusing.

I'll deal with this bug in a follow-up to provide proper context. Thank you so much for testing.

Another weird aspect of the Select, that has nothing to do with this PR, but that I'd like to point out. When hitting Enter on a new search value, I am expecting that the value will be added to the options, like it happens when there is no other match and the value is new. However, when the search value matches with an already selected value that is focused, hitting Enter not only does not select the search value, but deselects the focused value, which is super confusing.

What's happening is that when you select an option, it gets focused and that's why when you press Enter, it gets unselected. If you use the arrow keys after selecting an item, you can see that if you focus a different option and press Enter it will get selected. So it's not related to the search value matching a selected option. One way we could improve this would be to always auto focus the next option after the selected ones but I didn't find a way to programmatically change the focus.
https://github.com/apache/superset/assets/70410625/2ad1c6ba-8cec-4659-ae1a-33dc52eb2bc9


Issue working with Gemfire 9.0+

Hi
In my previous interaction , I was informed that there are compatibility issues currently with Sink and the latest version of Gemfire(9.0+).
https://github.com/spring-cloud-stream-app-starters/gemfire/issues/8
So i decided to implement my own custom Gemfire implementation and still use it with  SCDF sink implementation. I was now able to currently get my application up and healthy. But it does not subscribe to input channel as it  #should, subsequently not reading the output of my source app.
2017-06-08T12:37:26.671-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:26.671 INFO 17 --- [ main] o.s.d.g.client.ClientCacheFactoryBean : Created new GemFire v.8.2.4 Cache [].
2017-06-08T12:37:26.809-04:00 [APP/PROC/WEB/0] [OUT] [info 2017/06/08 16:37:26.808 UTC <Cache Client Updater Thread on <IP_ADDRESS>(cacheserver-nova-0:9408):49152(version:UNKNOWN[ordinal=45]) port 40404> tid=0x2b] Cache Client Updater Thread on <IP_ADDRESS>(cacheserver-nova-0:9408):49152(version:UNKNOWN[ordinal=45]) port 40404 (<IP_ADDRESS>:40404) : ready to process messages.
2017-06-08T12:37:26.809-04:00 [APP/PROC/WEB/0] [OUT] [info 2017/06/08 16:37:26.807 UTC  tid=0x1] Pool gemfirePool started with multiuser-authentication=false
2017-06-08T12:37:26.841-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:26.840 INFO 17 --- [ main] o.s.d.g.client.ClientRegionFactoryBean : Falling back to creating Region [drugdetails] in Cache []
2017-06-08T12:37:26.921-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:26.921 INFO 17 --- [ main] o.s.d.g.client.ClientRegionFactoryBean : Created new client cache Region [drugdetails].
2017-06-08T12:37:27.002-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:27.001 INFO 17 --- [ main] o.s.d.g.client.ClientRegionFactoryBean : Falling back to creating Region [planogram] in Cache []
2017-06-08T12:37:27.003-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:27.002 INFO 17 --- [ main] o.s.d.g.client.ClientRegionFactoryBean : Created new client cache Region [planogram].
2017-06-08T12:37:30.163-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.162 INFO 17 --- [ main] o.s.i.codec.kryo.CompositeKryoRegistrar : configured Kryo registration [40, java.io.File] with serializer org.springframework.integration.codec.kryo.FileSerializer
2017-06-08T12:37:30.365-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.365 INFO 17 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-06-08T12:37:30.377-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.376 INFO 17 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'integrationMbeanExporter' has been autodetected for JMX exposure
2017-06-08T12:37:30.378-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.378 INFO 17 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name '__cloudRabbitConnectionFactory' has been autodetected for JMX exposure
2017-06-08T12:37:30.382-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.381 INFO 17 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean '__cloudRabbitConnectionFactory': registering with JMX server as MBean [org.springframework.amqp.rabbit.connection:name=__cloudRabbitConnectionFactory,type=CachingConnectionFactory]
2017-06-08T12:37:30.413-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.412 INFO 17 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'integrationMbeanExporter': registering with JMX server as MBean [org.springframework.integration.monitor:name=integrationMbeanExporter,type=IntegrationMBeanExporter]
2017-06-08T12:37:30.450-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.450 INFO 17 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel errorChannel
2017-06-08T12:37:30.450-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.450 INFO 17 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering beans for JMX exposure on startup
2017-06-08T12:37:30.454-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.454 INFO 17 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageChannel,name=errorChannel': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=errorChannel]
2017-06-08T12:37:30.514-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.513 INFO 17 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel nullChannel
2017-06-08T12:37:30.515-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.514 INFO 17 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageChannel,name=nullChannel': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=nullChannel]
2017-06-08T12:37:30.529-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.528 INFO 17 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageHandler errorLogger
2017-06-08T12:37:30.530-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.529 INFO 17 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageHandler,name=errorLogger,bean=internal': registering with JMX server as MBean [org.springframework.integration:type=MessageHandler,name=errorLogger,bean=internal]
2017-06-08T12:37:30.561-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.561 INFO 17 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2017-06-08T12:37:30.561-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.561 INFO 17 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase -2147482648
2017-06-08T12:37:30.599-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.599 INFO 17 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2017-06-08T12:37:30.599-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.599 INFO 17 --- [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'dataflow-SAPPlanogramStream_V9-datasink_v1:cloud:0.errorChannel' has 1 subscriber(s).
2017-06-08T12:37:30.599-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.599 INFO 17 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase<PHONE_NUMBER>
2017-06-08T12:37:30.599-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.599 INFO 17 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started _org.springframework.integration.errorLogger
2017-06-08T12:37:30.706-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.705 INFO 17 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-06-08T12:37:30.714-04:00 [APP/PROC/WEB/0] [OUT] 2017-06-08 16:37:30.714 INFO 17 --- [ main] com.cvs.DataSink.DataSinkApplication : Started DataSinkApplication in 14.786 seconds (JVM running for 15.547)
2017-06-08T12:37:32.110-04:00 [CELL/0] [OUT] Container became healthy
I want to believe Gemfire clients are successfully created. No error and not having a subscriber for input are not helping me here. Also is there any reason why my App's log show GemFire v.8.2.4 when my cloud cache version is 9.0.2

The problem isn't at CF-server level, but it seems to be a problem specifically in the Gemfire sink. It'd be great if you can avoid creating duplicate issues. We already have spring-cloud-stream-app-starters/gemfire#8, so let's continue to track it there - I'll update the ticket.


rst_parser module not found when compiling matlab binding

I'm trying to follow the instructions here http://seevisionc.blogspot.com/2014/03/compiling-opencv-30-with-matlab-support.html for compiling with matlab bindings. In cmake, I get errors that the rst_parser is not found. I see the hdr_parser module is in the modules/python/src2 folder but I don't see any rst_parser. Is this a separate python module? If so, where is it available ( a quick google search didn't provide any results)?

@anuppari, rst documentation has been removed from OpenCV along with rst_parser script.
You can try one of the following solutions:

remove rst_parser dependency from Matlab binding
take older version of OpenCV sources (before this commit)

It looks like gen_matlab.py in the matlab module is still heavily dependent on rst_parser. What can be used to replace it?

Could someone drop a comment on this issue, when it is solved, over in the openCV user forum in the comment area of this thread, please? I feel to still be too much beginner for bothering you here at github, because I could only mention problems I found, but not constructively add to the discussion are problem solving. Thanks to all of you who work on openCV, you are just great! Talby

if someone downloaded the earlier version of rst_parser, could you share it somewhere? i can no longer retrieve that file from old commits

@yifita @talbym  You can download rst_parser here https://github.com/Itseez/opencv/blob/d01bedbc61b7febbb0d35a5978efb4c30709af5d/modules/java/generator/rst_parser.py.
I downloaded and put it in my local corresponding folder, according to this solution [http://code.opencv.org/issues/4175]. And it works

temporary solution can be found above and PR for adding it back is suggested for the moment :)

PR merged and build just fine now! You can close this issue down!


Remove Origin Authentication.

Authenticating user's accounts with Origin's services is an unnecessary step that has caused bugs and poses a potential security risk for user's accounts in the event that the masterserver is compromised. Additionally, the removal of user authentication with Origin would help to significantly increase the size of TF2's playerbase as players would no longer need to posses a valid copy of the game to join community servers.

There are two issues with this. If no authentication is used, a route for spam attacks is opened up to attackers. The second point is invalid as the game is $5, cheaper on sites like G2A if you don't want to give EA any money.

The second point is invalid as the game is $5, cheaper on sites like G2A if you don't want to give EA any money.
I'm more concerned that EA will take Titanfall 2 off of stores soon similar to Titanfall 1, seeing how they've both been effectively abandoned by the company.

I specifically would like to be able to load up Titanfall 2 on a flash drive, and give it to people at a lan party so we could all play locally.
Although I'm under the impression that there's ways around authentication in situations similar to this.

there is - you can turn off authentication on your server and connect directly using the console

Additionally, the removal of user authentication with Origin would help to significantly increase the size of TF2's playerbase as players would no longer need to posses a valid copy of the game to join community servers.

Using Origin authentication somehow guarantees that Northstar is "only" an addition to Titanfall (a mod), and not a way to hack Titanfall, which is completely different from a legal point of view; have you ever heard of "cease-and-desist"?

I'm pretty certain having the masterserver depend on Origin/Stryder authentication was intentional; it's simpler and lowers the risk of EA sending a C&D letter to the project.

doing this would enable piracy which is not supported here, as well as bringing insecurity as pointed out by others

Basically what https://github.com/R2Northstar/Northstar/issues/114#issuecomment-1005183940 said. Origin authentication will continue as default for now.


Change Base Container to Speed Up Builds

Under Alpine Linux, most third party Python packages have to be built rather than installed from a wheel. Switching to an different base container image would greatly speed up building.

This may be as simple as running pip install --upgrade pip wheel before attempting to install any other python packages.

Ekim would know better but I believe it has something to do with the fact Alpine uses musl rather than glibc as its C standard library.

In theory there should be wheels for musl (depending on the package). Will try upgrading pip and see if it helps.

This seems to have done the trick - but we might want to change container base anyway.

How difficult would it be to roll our own? Would there be any advantage to doing so?

It seems we got the thing we wanted out of this - changing base image isn't really important otherwise.


Examples project: NULL pointer dereference from appending NULL string

After compiling and running the example project with no modifications, it is crashing with a NULL pointer dereference as a result of appending a NULL char * in ExampleTypes.cpp on line 428.
PDB: https://groups.google.com/a/chromium.org/g/chromium-dev/c/6eJ_GVhjCmE
(.\RetrieveSymbols.exe D86C58DD-F8A3-6DD3-4C4C-44205044422E 1 chrome.dll.pdb)
Crash location
methodPrototype += typeName; // Line 428: typeName=nullptr

Callstack
Examples.exe!std::_Narrow_char_traits<char,int>::length(const char * const _First) Line 398	C++
Examples.exe!std::string::append(const char * const _Ptr) Line 3170	C++
Examples.exe!std::string::operator+=(const char * const _Ptr) Line 3112	C++
Examples.exe!GetMethodPrototype(const PDB::TPIStream & tpiStream, const PDB::CodeView::TPI::Record * methodRecord, std::string & methodPrototype) Line 429	C++
Examples.exe!DisplayFields(const PDB::TPIStream & tpiStream, const PDB::CodeView::TPI::Record * record) Line 669	C++
Examples.exe!ExampleTypes(const PDB::TPIStream & tpiStream) Line 769	C++
Examples.exe!main(int argc, char * * argv) Line 153	C++

Would you mind taking a look @FaerHack?

@aswerw Can you please check if this still happens for you?
Support has been added for new types lately.

I tried it again with the latest version and this assert is firing for me:
PDB_ASSERT(false, "Unhandled special type %u", typeIndex);

If I remove the assert and return a dummy string then this assert fires:
PDB_ASSERT(referencedType != nullptr, "Neither typeName nor referencedType are set.");

PDB: https://chromium-browser-symsrv.commondatastorage.googleapis.com/chrome.dll.pdb/1D3E3E368B69641F4C4C44205044422E1/chrome.dll.pdb

Thanks for providing the a link to the 4.06 GiB chrome.dll.pdb.
I believe I have fixed all the issues encountered when running the RawPDB examples on this PDB on this branch:
https://github.com/lukekasz/raw_pdb/tree/chrome-dll-pdb-fixes
All the examples run now for me without crashing or hitting any asserts.
I will open a PR once with the changes once I've done some additional testing on others PDBs. Feel free to test it yourself :-)


[flutter_tools] treat win32 plugins as uwp plugins

To enable work on the UWP plugin template, write out the generated plugin registrants with win32 plugins.
Also performs some cleanup in plugins.dart by replacing some use of path/string manipulation with file manipulation.

just checking.. does this also fix plugin project symlinks?

We do not have the ability to build UWP on CI yet - end to end builds aren't finished yet

@clarkezone I visually inspected the example template with url_launcher added. What other setups are you using to test plugins?


FIX: Get decision path for each leaf node

Create a new notebook to produce the following:

Classification on the iris dataset including plotting the variable importances
Output of the trees as images using dot files and pyplot. Display them if possible
Now for each tree and each leaf_node obtain the decision path i.e. the collection of variables that led to that leaf node from the root node
(Optional) Get the prediction for the leaf_node

closed #14


Support for additional nesting in left navigation?

Hello!  We've been using docbox for our product documentation and it's been fantastic.  Currently heading level 1-3 gives me nav as you see in the screenshot, and heading 4 (####) results in an example section.
Any easy way to enable deeper nesting in the left bar navigation? e.g. change so #### would be indented one level further in the left nav, and change ##### to examples?

Great to hear that docbox is working for you!
In the original implementation (Mapbox’s), we limited the heading hierarchy to 1-3, and relies on sort of a 'magic number' - you can see in navigation.js logic to highlight the nearest h3
https://github.com/tmcw/docbox/blob/master/src/components/navigation.js#L14-L24
and display up to 3 levels
https://github.com/tmcw/docbox/blob/master/src/components/navigation.js#L76-L86
Tweaking this limit should be a matter of another if/else in the render call, and tweaking the references to heading.level everywhere that there's a current limit.

Thanks! Will check it out.


[FEATURE] Matrix Strategy Multi-Arch example

Is your feature request related to a problem? Please describe.

Clone of https://github.com/docker/docs/issues/16593
Describe the solution you'd like

similar to https://github.com/docker/docs/pull/17180
Describe alternatives you've considered

Additional context

This should allow us to use more runner resources for longer multiarch builds.
graph TD;
    Workflow---|amd64|runner1;
    Workflow---|arm64|runner2;
    Workflow---|arm32v5|runner3;
    Workflow---|arm32v6|runner4;
    Workflow---|arm32v7|runner5;
    Workflow---|arm64v8|runner6;
    Workflow---|i386|runner7;
    Workflow---|ppc64le|runner8;
    Workflow---|s390x|runner9;
    runner1-->Z[podman push multi-arch-image]
    runner2-->Z
    runner3-->Z
    runner4-->Z
    runner5-->Z
    runner6-->Z
    runner7-->Z
    runner8-->Z
    runner9-->Z

I was also caught with the same problem.
I am able to build multiple architectures. But not publish, it simply overwrites the tag so only one architecture is available in ghcr.io.
name: Build container images
on: [push, workflow_dispatch]

concurrency:
  group: '${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
  cancel-in-progress: true

jobs:
  build-image:
    name: Build image
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    strategy:
      matrix:
        platform: [linux/amd64, linux/arm64]

    steps:
    - name: Checkout code
      uses: actions/checkout@v3
      with:
        fetch-depth: 0
        submodules: true

    - name: cache podman
      uses: actions/cache@v3
      with:
        path: ~/.local/share/containers
        key: podman

    - name: Set up QEMU
      uses: docker/setup-qemu-action@v2

    - name: set lower case owner name
      run: |
        echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
      env:
        OWNER: '${{ github.repository_owner }}'

    - name: Container meta
      id: meta
      uses: docker/metadata-action@v4
      with:
        images: |
          ghcr.io/${{ env.OWNER_LC }}/rtfm
        tags: |
          type=semver,pattern={{version}},value=${{ inputs.version }}
          type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
          type=semver,pattern={{major}},value=${{ inputs.version }}
          type=ref,event=branch
          type=ref,event=pr
          # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
        flavor: |
          latest=${{ github.ref_name == github.event.repository.default_branch }}

    - name: Build Image
      id: build-image
      uses: redhat-actions/buildah-build@v2
      with:
        image: rtfm
        tags: ${{ steps.meta.outputs.tags }}
        labels: ${{ steps.meta.outputs.labels }}
        oci: true
        containerfiles: |
          ./Dockerfile
        platforms: ${{ matrix.platform }}

    # I guess this is the part that needs some type of resource sharing between the runners.
    - name: Push image to GHCR
      uses: redhat-actions/push-to-registry@v2
      id: push
      with:
        image: ${{ steps.build-image.outputs.image }}
        tags: ${{ steps.build-image.outputs.tags }}
        username: ${{ github.actor }}
        password: ${{ github.token }}
        registry: ghcr.io/${{ env.OWNER_LC }}

    - name: Print image url
      run: echo "Image pushed to ${{ steps.push.outputs.registry-paths }}"

Anyone has a good solution for this?

Ok, I cracked it!
Here is a working example using multiple runners to build for each architecture, that later upload their images to github temporary storage and a runner that downloads the different architecture images and merges them and publishes to GHCR.
name: Build container images
on: [push, workflow_dispatch]

concurrency:
  group: '${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'

jobs:
  build:
    name: Build image
    runs-on: ubuntu-latest
    strategy:
      matrix:
        platform: [linux/amd64, linux/arm64]

    steps:
    - name: Checkout code
      uses: actions/checkout@v3
      with:
        fetch-depth: 0
        submodules: true

    - name: cache podman storage
      uses: actions/cache@v3
      with:
        path: ~/.local/share/containers/storage
        key: podman-storage-${{ matrix.platform }}

    - name: Set up QEMU
      uses: docker/setup-qemu-action@v2

    - name: set lower case owner name
      run: |
        echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
      env:
        OWNER: '${{ github.repository_owner }}'

    - name: export architecture name (removing os prefix)
      run: |
        echo "PODMAN_ARCH=${PLATFORM#*/}" >>${GITHUB_ENV}
      env:
        PLATFORM: ${{ matrix.platform }}

    - name: Container meta
      id: meta
      uses: docker/metadata-action@v4
      with:
        images: |
          ghcr.io/${{ env.OWNER_LC }}/rtfm
        tags: |
          type=raw,value=build
        flavor: |
          suffix=-${{ env.PODMAN_ARCH }}

    - name: Build Image
      id: build-image
      uses: redhat-actions/buildah-build@v2
      with:
        image: rtfm
        tags: ${{ steps.meta.outputs.tags }}
        labels: ${{ steps.meta.outputs.labels }}
        oci: true
        containerfiles: |
          ./Dockerfile
        platforms: ${{ matrix.platform }}

    - run: skopeo copy containers-storage:ghcr.io/${{ env.OWNER_LC }}/rtfm:build-${{ env.PODMAN_ARCH }} oci-archive:/tmp/${{ env.PODMAN_ARCH }}-oci.tar

    - name: Upload digest
      uses: actions/upload-artifact@v3
      with:
        name: rtfm-build-${{ env.PODMAN_ARCH }}
        path: /tmp/${{ env.PODMAN_ARCH }}-oci.tar
        if-no-files-found: error
        retention-days: 1

  upload:
    name: Upload images
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    needs: build
    steps:

    - name: Download podman
      uses: actions/download-artifact@v3
      with:
        name: rtfm-build-amd64
        path: /tmp
    - name: Download podman
      uses: actions/download-artifact@v3
      with:
        name: rtfm-build-arm64
        path: /tmp

    - name: set lower case owner name
      run: |
        echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
      env:
        OWNER: '${{ github.repository_owner }}'

    - run: podman manifest create ghcr.io/${{ env.OWNER_LC }}/rtfm:manifest
    - run: podman manifest add ghcr.io/${{ env.OWNER_LC }}/rtfm:manifest oci-archive:/tmp/arm64-oci.tar
    - run: podman manifest add ghcr.io/${{ env.OWNER_LC }}/rtfm:manifest oci-archive:/tmp/amd64-oci.tar
    # - run: podman manifest inspect ghcr.io/${{ env.OWNER_LC }}/rtfm:manifest

    - name: Container meta
      id: meta
      uses: docker/metadata-action@v4
      with:
        images: |
          ghcr.io/${{ env.OWNER_LC }}/rtfm
        tags: |
          type=semver,pattern={{version}},value=${{ inputs.version }}
          type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
          type=semver,pattern={{major}},value=${{ inputs.version }}
          type=ref,event=branch
          type=ref,event=pr
          # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
        flavor: |
          latest=${{ github.ref_name == github.event.repository.default_branch }}

    - name: add tags
      run: |
        # fix multi-line issue from steps.meta.outputs.tags
        podman tag ghcr.io/${{ env.OWNER_LC }}/rtfm:manifest $(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ' ')

    - name: Push image to GHCR
      uses: redhat-actions/push-to-registry@v2
      id: push
      with:
        image: rtfm
        tags: ${{ steps.meta.outputs.tags }}
        username: ${{ github.actor }}
        password: ${{ github.token }}
        registry: ghcr.io/${{ env.OWNER_LC }}

    - name: Print image url
      run: echo "Image pushed to ${{ steps.push.outputs.registry-paths }}"

I guess we now need to document this example somewhere.

Awesome!


Create excel with thousands of rows

Im using Laravel 5.2 with wrapper for PHPExcel version 1.0.0 andpackage maatwebsite/excel.
Im trying to create a excel file with 10k to 100k rows and 20 columns. Once I get over 10k rows, I'm getting an error of memory limit for PHP.
Here's my example code:
NOTE: $exportable is an array with 10k - 100k data
Excel::create($filename . '_' . date('Ymd_Hi'), function($excel) use ($exportable, $table) {      $excel->sheet($table, function($sheet) use ($exportable, $table) {           $sheet->fromArray( $exportable );      }); })->download('csv');

The error you're experiencing is specific to your server/php configuration, rather than something this package could control.
PHP's memory limit is set in place to ensure it doesn't consume resources that may be vital for other processes running on your server (your database, for example). The same goes for your execution timeout, mishandling either configuration value will negatively affect your server's performance.
That being said, this solution should fix the problem you're having. Make sure to use it sparingly, and never set the limit to infinite (value of 0).

@matthewnance I'm aware of that memory allowance configuration, I need a permanent solution, like if encounter 100k of data and i don't need to increase PHP memory allowance.

I experience similar problems: with a row of 19 columns, totaling about 700 bytes of data, a generating a sheet with 106k rows takes 125 seconds and about 1GB of RAM. 200k rows takes 445 seconds and 2GB of RAM.
The problem is in the architecture of PHPOffice and this package; which use arrays and objects in memory to handle the data instead of PHP streams. Streams allow working with this sort of data using disk buffers and a constant amount of RAM (configurable, defaults to 2MB). The excellent League CSV package uses this and is therefore able to operate on nearly arbitrary sizes of CSV's without growing in RAM consumption.

@RobvH  Yes, I agree with you. Also, this lib not clear PHP output buffer after storing a file.
if we need to create multiple files using the same request after the first file creates allowed memory size exhausted.


refresh12

migrate
monitor
msi
netapp

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-arm-migrate


MINOR: Fix typos in DefaultSslEngineFactory javadoc

This PR fixes two typos in the Javadoc for DefaultSslEngineFactory.PemParser class.
Reviewers: Manikumar Reddy<EMAIL_ADDRESS>

This is related to changes made in 7be8bd8, cc @omkreddy for review.

Checks fail due to unrelated kafka.server.DynamicBrokerConfigTest#testPasswordConfigEncoderSecretChange test.

LGTM.

I don't have write access to the repo, so please close at your earliest convenience.


delete shell -x

Can one of the admins verify this patch?

Pull Request Test Coverage Report for Build 1825

0 of 0   changed or added relevant lines in 0 files are covered.
28 unchanged lines in 9 files lost coverage.
Overall coverage decreased (-0.2%) to 61.59%

Files with Coverage Reduction
New Missed Lines
%

core/lager/lager.go
1
76.0%

core/loadbalancer/strategy.go
2
60.0%

core/rpc_invoker.go
2
93.1%

session/session_manager.go
2
64.93%

core/router/cse/router_manager.go
2
71.11%

control/archaius/transfer.go
2
84.19%

core/config/cb_config.go
3
77.78%

core/registry/util.go
4
64.29%

core/lager/logrotate.go
10
39.07%

Totals

Change from base Build 1824:
-0.2%

Covered Lines:
5330

Relevant Lines:
8654

💛  - Coveralls


Breadcrumb component

Breadcrumb is highly used on most of the websites especially in blogs, drupal sites etc. We should create a style for breadcrumbs as well, I am thinking to work on it and provide a simple yet beautiful breadcrumb which goes with this theme.
if anyone is already worked on this, please let me know or if someone is interested in working on this let me know.
This is one of the most intriguing themes I came across in recent time.

I think it's a good value add.

I agree with @szul. Breadcrumbs are awesome!
@kushvarma thank you for your idea.
In the future, I would like to extend Milligram to be more than 'a fast and clean starting point, with 2kb size'.
For now, I will close this issue.


Refactor code generator to add clusters

Hey Tommi,
I thought I'd create a PR for comment and discussion...
Any thoughts welcome...
Chris

This looks promising. Discussion going on in https://github.com/tlaukkan/zigbee4java/issues/93.


proposal: Go2: check and catch as built-in macros

The check and the catch revisited as a macro
The implicit version of the check already compiles at playground.
This proposal is not a direct counter-proposal to #32437. It stands by itself.
The check macro is not a one-liner: it helps the most where many repetitive
checks using the same expression should be performed in close proximity.
Recent use of the catch word was spotted in: #32813 and #32611.
Design constraints (met)
It is a built-in, it does not nest in a single line, it allows for way more flows than try and has no expectations about the shape of a code within. It does not encourage naked returns.
usage example
// built-in macro signature:
func check(Condition bool) {}

check(err != nil) // explicit catch: label.
{
    ucred, err := getUserCredentials(user)
    remote, err := connectToApi(remoteUri)
    err, session, usertoken := remote.Auth(user, ucred)
    udata, err := session.getCalendar(usertoken)

  catch:               // sad path
    ucred.Clear()      // cleanup passwords
    remote.Close()     // do not leak sockets
    return nil, 0,     // dress before leaving
      fmt.Errorf("Can not get user's Calendar because of: %v", err)
}
// happy path

// implicit catch: label is above last statement
check(x < 4)
  {
    x, y = transformA(x, z)
    y, z = transformB(x, y)
    x, y = transformC(y, z)
    break // if x was < 4 after any of above
  }

The func check(Condition bool) {} built-in macro inserts a check for the Condition after any matching statement in the anonymous { block } that immediately follows the macro invocation.
"Matching" are statements where a variable identifier used in the "Condition" expression of the check appears on the left to the "=" or ":=" assignment operator within the block.
If the Condition at any inserted check evaluates to true, statements under the "catch:" label inside the block are executed immediately.
If the "catch:" is reached naturally, all statements under it to the end of the block are skipped.
If there is none "catch:" label given within the block, it is assumed to be present right before the last statement of the block.

Implementation uses none magic:

The LN "label mutator" string is made of the line number where check macro was invoked. Then catchˁLN and okˁLN labels are used.
After any matching statement, the ; if Condition { goto catchˁLN }; is put in the place of the single 'invisible semicolon'.
When the catch: label is spotted (parsed), it gets replaced with a goto okˁLN; statement followed by a catchˁLN: label.
If parser got to the last statement of the block and there was no catch: label yet, this statement gets prepended with the goto okˁLN; catchˁLN:.
The okˁLN: label is put right before the end of the block.
The block node, and all autoinserted nodes are simply flagged with check context annotation for AST tools (gofmt, gopls and others).

Thats all spec.
Macro expansion explained:
check(err != nil)     // line 123 → catchˁ123, okˁ123 labels.
  {
    x, y, err := fa() // '\n' → ";" → "; if err != nil; { goto catchˁ123 };"
    y += 2            // '\n' → ";"       //  no err at lhs, no check
    x = fb(y)         // '\n' → ";"       //  no err at lhs, no check
    err = fc(x, y)    // '\n' → ";" → "; if err != nil; { goto catchˁ123 };"

    goto okˁ123       // happy path, added by the macro
  catchˁ123:          // "catch:" → "catchˁ123" // subst by the macro
    cleanup()         //
    return 0, 0, err  // dressed returns are better than naked
  okˁ123:             // happy exit point, added by the macro
  }

check(x < 4)                // line 234, catchˁ234, okˁ234 labels.
  {
    x, y = transformA(x, z) // check: if x < 4 { goto catchˁ234 }
    y, z = transformB(x, y) // no x, no check
    x, y = transformC(y, z) // check: if x < 4 { goto catchˁ234 }
                            // goto okˁ234 (implicit)
                            // catchˁ234:  (implicit)
    break                   // last statement
                            // okˁ234:     (implicit)
  }

changes:
-"Matching" are statements that assign a value to at least one of variables that are checked in the "Condition" expression
+"Matching" are statements where a variable identifier used in the "Condition" expression of the check appears on the left to the "=" or ":=" assignment operator within the block.

Instead of built in macros, I think we need hygienic macros in go, as described in #32620, so go developers can experiment with macros themselves, and use the ones they like themselves in their own projects.

Instead of built in macros, I think we need hygienic macros in go, as described in #32620, so go developers can experiment with macros themselves, and use the ones they like themselves in their own projects.

Ah, wouldn't it be a wonderful change?! Giving to every person ability to make its own flavor of Go? It would also enable readers to feel again this peculiar joy of jumping from file to file, to wonder the beauty of the macros and to adore the genius of their creators... https://docs.racket-lang.org/reference/

This has the same problems as try/catch in other languages, namely that you wrap a whole bunch of lines in a handler and then the handler code can't know what part failed.  It discourages people from handling every error individually.  And just like exception in other languages, (which is actually worse than the try proposal) - there's zero indication on each line that you might suddenly exit if that line fails.

CC @griesemer

@ohir Built-ins in Go have a clearly specified syntax: Syntactically, they look like function calls with expressions as arguments. There may be additional rules for the arguments, but they remain expressions. There may be special behavior to the built-ins, but syntactically they remain function calls.
What you are proposing does not look like a function call, nor an expression: there's a {} block following the check condition. This cannot fit into the existing syntax of Go and certainly cannot be considered a built-in - macro or not.
In order to make something like check work inside Go you'd have to extend the statement syntax. That is a significant, non-backward compatible language change. Claiming that something is a "macro" does not make it work automatically. Claiming that something it a "built-in" does not make it one.
What you are proposing is a new form of statement for Go; a check statement. There are a lot of open questions in this proposal, starting with the exact syntax specification, to the detailed semantics of the new statement.
For instance, you say that check automatically inserts a check for all matching statements inside the block, where a matching statement is an assignment that at least assigns to one variable checked in the check. I don't know how to make this work: What happens if one assigns to a pointer variable that happens to be an alias to the variable checked? (This cannot be easily detected in general). What kind of expressions are permitted in the check? Can it be function calls? What if those function calls access the variables which are being assigned to in the check block? Etc.
In short, I don't believe this proposal can be implemented in any reasonable way. It is also not very Go like as it introduces invisible code to be executed upon assignments.
More importantly, you are proposing a fairly general new mechanism with all kinds of ramifications without an argument as to why this is needed. Certainly, error handling can be done with less effort.
I am against this proposal.

@natefinch Thank you. It is a valid concern about possible abuse of this construct. Though I do (I might) know exactly which what part failed from the err (or other variable being checked) if I am really interested in it.

@griesemer

For instance, you say that check automatically inserts a check for all matching statements inside the block, where a matching statement is an assignment that at least assigns to one variable checked in the check.

What happens if one assigns to a pointer variable that happens to be an alias to the variable checked? (This cannot be easily detected in general).

It needs not to be detected. The check is envisioned as a real macro, expanded at first parse to the marked nodes[1] and with none magic underhood.  check will work exactly as explained in the 'Implementation' section, and one can reason about it using real labels and gotos.
Though this exposed the vagueness of the "matching" definition I gave.  After correction it should say:

"Matching" are statements where a variable identifier used in the
"Condition" expression of the check appears on the left to the "="
or ":=" assignment operator within the block.

What kind of expressions are permitted in the check?

As it is a macro, it is expanded, it allow any and all expressions that have a bool result. Ie. any expression that can be parsed in the expanded if.
The "Implementation" section of the proposal is straight. Where it says "insert ; if Condition { goto catchˁLN };" it will make it to the AST using the check's Condition source string (what in turn will allow Condition to operate on identifiers local to the block).

Can it be function calls? What if those function calls access the variables which are being assigned to in the check block? Etc.

There is no magic in check. A source of:
check(err != nil || rv == nil)
{
    rv, err := fn()
    continue retry
}

will result in same AST as
{
    rv, err := fn()
    if err != nil || rv == nil {
        goto catchˁ1
    }
    goto okˁ1
  catchˁ1:
    continue retry
  okˁ1:
}

([1] same AST spare flag annotations on nodes check..., if... and down)

In order to make something like check work inside Go you'd have to extend the statement syntax.

I am pleased to inform you that check already compiles on current playground. At least in its short (no label) form.

I don't believe this proposal can be implemented in any reasonable way. I don't know how to make this work:

I do. The 'Implementation' part is the implementation sketch.  The check expansion belongs mostly to cmd/compile/internal/syntax/parser.go
More work will be with the fmt printer. All other go tools will stay untouched, including debuggers, where the real identifiers like goto okˁ234 should be given in plain. One of the goals of check construct is to allow mere mortals to understand fully what is under the check's hood.

It is also not very Go like as it introduces invisible code to be executed upon assignments.

With all due respect, the check invisible code is no less visible than try's return. If users can be expected to learn and understand

It returns the first n arguments (if any) if the (final) error argument is nil, otherwise it returns from the enclosing function with  that error.

they should also be trusted to learn and understand
"the if Condition goto catch is added after any line where you assigned to a variable mentioned in the Condition".

you are proposing a fairly general new mechanism

Agreed, its new, but it reads Go: check(Condition) { block }

with all kinds of ramifications without an argument as to why this is needed.

I will not beat around the bush: the real impulse to spending a week on thinking about simplest solution to 'if err != nil' whinning, and one that will benefit the most of users was my deep concern about try's ability to nest. Try is being pushed and its implementation is a WiP.  And - as try can be abused, it will be abused for sure. Without an ample alternative to nested try (to its abuse), it will sooner than later pollute the OSS codebase. IMO.
The check construct in my opinion can be an easier and more Gooish alternative to nested trys, while leaving it (try) for places where it shines: ie. single line checks for err then return err.

Certainly, error handling can be done with less effort.

Yes, indeed. Though check is not only about error handling, there are other (business logic, math) places where it might be of use.

Thanks @ohir for your explanations.
So what happens if the condition in check refers to variables that have not been defined yet in the block? Say, the condition refers to variables a and b and a and b are not introduced in assignments at the same time? For instance:
check(a == b) {
   a := f1()
   b := f2()
}

when is the check a == b executed? Presumably only after the second assignment?
As you say, any and all expressions can be used with check - it's just a macro. In
check(f()) {
   ...
}

where f() returns a boolean, and I never refer to f anywhere in the check block - presumably f() get's never called? What if one assigns to f?
check(f()) {
   f := g()
}

What if f is not a function? What it f() doesn't return a boolean value? Etc. etc.
Also, this construct would be the first construct where we can refer to an identifier, f in this example, before it's been declared. In Go, all identifiers inside a function must be declared and in scope before they can be used.
This proposal seems to be open many more questions and problems than it seeks to solve.

@griesemer

So what happens if the condition in check refers to variables that have not been defined
yet in the block? Say, the condition refers to variables a and b and a and b are
not introduced in assignments at the same time?

check(a == b) {
   a := f1()
   b := f2()
}

For instance: when is the check a == b executed? Presumably only after the second assignment?

With this example? Never. It is an invalid code and effects in a compile error:

./prog.go:2:55: goto okˁ1 jumps over declaration of b at ./prog.go:3:11

check hides nothing
as I said. Neither from the tools nor from the user. It gets expanded before
the syntax checking phase and stays in its expanded form till gofmt printer will
collapse it again. The most frequent place for user to see her check expanded will
be in the -cover output.
So lets expand it now to the form used in the syntax checking phase:
check(a == b) // marked node, it gets thru (as a node string for the Condition)
{
        a := f1(); if a == b { goto catchˁ1; }; goto okˁ1; catchˁ1:
        b := f2(); okˁ1:
}

Playground error /aͺ, bͺ local declaration/
Playground valid /no locals/

Lets correct above snippet
(the b := f2() as a catch: statement was an error likely)
check(a == b)
{  // this fmt rule stays, to highlight we're using a macro
   a := f1()
   b := f2()
   break     // Condition == true statement (implicit catch:)
}
./prog.go:11:43: goto catchˁ1 jumps over declaration of bͺ at ./prog.go:12:17
./prog.go:11:61: goto okˁ1 jumps over declaration of bͺ at ./prog.go:12:17

See at playground

As you say, any and all expressions can be used with check - it's just a macro. In

check(f()) {
...
}

where f() returns a boolean, and I never refer to f anywhere in the check block - presumably f() get's never called?

The spec says now identifier of a variable. So bare (f()) will effect in compiler (or vet) error (tbd):

./prog.go:1:1: "check(expression)" needs at least one variable to check for.

What if one assigns to f?  What if f is not a function? What if f() doesn't return a boolean value? Etc. etc.

Irrelevant. Check considers only varible assignments. I amended the spec already (thanks for pointing ambiguity in previous "matching" definition).

Also, this construct would be the first construct where we can refer to an identifier, [...] before it's been declared.

Yes, the check would be a first built-in fullblood macro and first construct of its kind. Just like either the make or append (cant recall which one) was the first built-in function once upon a time.

In Go, all identifiers inside a function must be declared and in scope before they can be used.

The check Condition expression makes a promise that any that is not already in scope will be
declared. If they won't, there will⁽ˣ⁾ be a compiler error about undeclared variable used in an if expression.  (⁽ˣ⁾Now it is a goto over error, but this gonna change in 1.14 afaik).

This proposal seems to be open many more questions

I welcome tough questions and discussion. There can be flaws lurking I could not seen
and I would like this proposal to either fall or pass on merit and on merit only.

and problems than it seeks to solve.

It eg. shortens the (much frequent in production) code where one must acquire a set of remote services before doing a business on all of them:
  for tries > 0 {
    check(err != nil)
    {
      s1, err = getService1(uriAuth)
      s2, err = getService2(uriLog)
      s3, err = getService3(uriBasket)
      s4, err = getService4(uriCheckout)
    catch:
      metricsTimeWait(tries)
      tries--
      continue
    }
  }
  if err != nil { metricsAcquireFailed(err) // user can't shop }
  // use services

Without check above snippet usually takes a 5L+ for each getService to acquire.

Thanks for the explanations.
Contrary to what you say, check clearly hides jumps and labels. That by itself may be ok (consider it an "abstraction"), but it's clearly not ok that the compiler can produce an error message such as goto okˁ1 jumps over declaration of b when there is no goto to be seen in the code (i.e., the abstraction is leaky).
As I said before, this proposal seems to open more questions and problems than it tries to solve, with little motivation as to why one would want such a mechanism.

@ohir You seem to be saying that := may not be used inside a check block, because it will lead to a "jumps over declaration" error.  That seems like a serious drawback.

@ianlancetaylor
Yes. Local scope variables can be used but until #26058 will land, variables local to the block need to be var declared before the first check. Even after #26058, there might cases where such explicit declaration should stay. Ie. if the catch part want to do something on a local variable.
This is a real flaw that should either be addressed or excluded. Thank you.
Likely it means that, against my assumptions, check will be in need of a helping hand from the syntax checker.

saying that := may not be used inside a check block, because it will lead to a "jumps over
declaration" error. That seems like a serious drawback.

@griesemer

it's clearly not ok that the compiler can produce an error message such as goto okˁ1 jumps over declaration of b when there is no goto to be seen in the code
This is the current state and current compiler. As nodes are marked as being expanded, syntax checking MAY produce an error message perpetuating to the macro invocation. Eg.

./prog.go:1:1: "Variable "x" in check(expression) is neither in scope nor declared in the 'check' block.

But - again - I personally would like users of a macro to know they are using a macro and how does this macro expands.

Update. Added Limitations section.
Rationale: A macro may not change language specs. Even if #26058 would loosen goto safeguards, some code that is not "checked" within the block might trigger spurious error message too. What means that issue pointed to by @griesemer and @ianlancetaylor is valid. It may not be addressed in other than by specifying its limitations.

@natefinch

wrap a whole bunch of lines in a handler and then the handler code can't know what part failed. It discourages people from handling every error individually.

With just added (natural) limitation the whole bunch of lines should be fairly limited. The potential to gross abuse you pointed at, as in enclosing in check huge blocks of code, diminished. IMO.
@griesemer

with little motivation as to why one would want such a mechanism.

The "must acquire with retries" pattern I have shown is the bread and butter of microservice architectures (and many "bigger-services" too). As it happens "cloud" backend is the domain where Go has most applications.

This proposal as it stands relies on simple macro expansion.  That means that we can't use := in the check block.  It makes it hard to understand what happens when check blocks are nested.  It makes it hard to understand what happens if a variable declared in the check expression is shadowed by a different variable with the same name inside the check block.  Error messages from the compiler expose the macro expansion in ways that make them very hard to understand.
All of these issues could perhaps be addressed.  But we would still have a Go statement that defines a condition that is then checked dynamically during execution of the block.  There is nothing else in Go that acts that way.  We would have to clearly define exactly when the checks occur.  We also have to specify what kinds of check expressions are permitted.
There does not seem to be much enthusiasm for this proposal.
-- writing for @golang/proposal-review

@ianlancetaylor
Fair assessment.
I can add that goto seems to scary way too many people.


Fix crash in OpticalTactilePlugin by checking for valid visualize pointer

🦟 Bug fix
Fixes https://github.com/gazebosim/gz-sim/issues/2543
Summary
See steps in https://github.com/gazebosim/gz-sim/issues/2543 to reproduce the crash.
Calling the service to disable the plugin (when it has never been enabled before) will cause a crash because the optical tactile visualization marker pointer is null (not created yet). This PR adds a check to make sure the optical tactile visualization marker pointer is not null before attempting to remove the visualization markers.
Checklist

[x] Signed all commits for DCO
[ ] Added tests
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] codecheck passed (See contributing)
[ ] All tests passed (See test coverage)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

https://github.com/Mergifyio backport ign-gazebo6 gz-sim8 gz-sim7


Adapter api

This builds on the core of #42.
As changing the API requires switching to ES6 classes (there is no equivalent ES5 way how to inherit from Adapter Read/Write on an ES6 runtime), first switch the whole project to start using them consistently across the board, then implement changes required to move to the new API in read/write and finally rename read/write classes to be consistent with other adapters.

cc: @dmajda

+1

While trying to figure out how to implement the API transition without necessarily adding ES6 classes, I  found these resources, which might be interesting:

babel translation of class inheritance
babel - function inheriting from class - this doesn't work on an ES6 runtime, as constructors cannot be called without new, so A.call(this) is illegal if A is a class.
SO answers to constructor-without-new error


Publish packages from cwd

Currently <npm|yarn|pnpm> publish command runs inside each package directory and doesn't use root .npmrc file. In our case we publish packages to a self-hosted registry that requires certain configs, and because of that publishing fails.

This change seems fine - would love to have documentation added for it though before merging.

Is there any update when this will be merged?
@vlad-zhukov @Noviny I can help with the documentation if required. What are you expecting to document with respect to this issue?

@Noviny this isn't a configurable behavior right now, so I'm wondering if this needs any documentation. Looking at the npm publish docs etc this seems like a non-breaking change.

Yep, all good - feel free to merge and publish.

@vlad-zhukov Even after using this latest version my root .npmrc isn't respected, it just picks up the global .npmrc 🤔

@kamleshchandnani it would be great if you could prepare a runnable repro case of the problem, with clear instructions on how to reproduce this. Or even better - add a failing test case for this 😉

@kamleshchandnani it would be great if you could prepare a runnable repro case of the problem, with clear instructions on how to reproduce this. Or even better - add a failing test case for this 😉

Okay so here's the repo where I was trying to reproduce the issue. Turned out that the error was something else in this case it was my registry mis typed but the reason I got confused was that my eyes just got stuck at this line which says

No .npmrc file found, creating one

and I got confused that it isn't picking up my .npmrc even though it is. I think the messaging can be bit more contextual if it finds my local .npmrc. So maybe we can change the messaging a bit?
Also, now I think this isn't related to this issue. So do let me know if this makes sense I can open a new issue for changing the messaging :)

If the local .npmrc takes precedence over a global one then ye - definitely this could be improved, the imperfect logic is here:
https://github.com/changesets/action/blob/c2918239208f2162b9d27a87f491375c51592434/src/index.ts#L44-L53
I would appreciate it if you could report this here: https://github.com/changesets/action/issues with the context about the problem that you have encountered.


atomic_reactor.plugins.store_metadata_in_osv3 unable to get auth token

I'm not entirely sure if this is a bug or a configuration issue but I can't for the life of me figure it out and I've dug through enough of the osbs-client and atomic-reactor code to realize that I'm at a point that I need to ask for help.
2015-09-01 02:17:20,687 - atomic_reactor.plugins.store_metadata_in_osv3 - INFO - build id = atomic-reactor-dockerfile-test-20150831-210358
2015-09-01 02:17:20,835 - osbs.core - ERROR - [401] 'Location' header is missing in response, cannot retrieve token
2015-09-01 02:17:20,861 - atomic_reactor.plugin - DEBUG - Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/atomic_reactor-1.4.0-py2.7.egg/atomic_reactor/plugin.py", line 203, in run
    plugin_response = plugin_instance.run()
  File "/usr/lib/python2.7/site-packages/atomic_reactor-1.4.0-py2.7.egg/atomic_reactor/plugins/exit_store_metadata_in_osv3.py", line 128, in run
    osbs.set_annotations_on_build(build_id, labels, **kwargs)
  File "/usr/lib/python2.7/site-packages/osbs/api.py", line 39, in catch_exceptions
    raise OsbsException(cause=ex, traceback=sys.exc_info()[2])
OsbsException: ValueError(u'Token was not retrieved successfully.',)

Original traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osbs/api.py", line 28, in catch_exceptions
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/osbs/api.py", line 315, in set_annotations_on_build
    return self.os.set_annotations_on_build(build_id, annotations, namespace=namespace)
  File "/usr/lib/python2.7/site-packages/osbs/core.py", line 328, in set_annotations_on_build
    build_json = self._get(url).json()
  File "/usr/lib/python2.7/site-packages/osbs/core.py", line 85, in _get
    headers, kwargs = self._request_args(with_auth, **kwargs)
  File "/usr/lib/python2.7/site-packages/osbs/core.py", line 77, in _request_args
    raise ValueError("Token was not retrieved successfully.")
ValueError(u'Token was not retrieved successfully.',)

I am starting this build with osbs and I'm able to get a token with osbs
$ osbs get-token
2015-08-31 21:27:09,948 - osbs.core - INFO - using basic authentication
xoWlj_PLH7PWFTHZDmirDo-bvF-ILMPQx6o9LWh7-dA

However, running the build from atomic-reactor at the command line outside of osbs also causes this issue.

Also, here's verbose output from osbs if that's helpful. (This is a VM on my laptop behind a NAT so I'm not overly concerned with tokens in the comments here)
# osbs --verbose get-token
2015-08-31 21:38:40,337 - osbs - DEBUG - Logging level set to debug
2015-08-31 21:38:40,338 - osbs.core - INFO - using basic authentication
* About to connect() to losbs.example.com port 8443 (#0)
*   Trying <IP_ADDRESS>... * connected
* Connected to losbs.example.com (<IP_ADDRESS>) port 8443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* NSS: client certificate not found (nickname not specified)
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*       subject: CN=losbs.example.com
*       start date: Aug 27 15:17:28 2015 GMT
*       expire date: Aug 26 15:17:29 2016 GMT
*       common name: losbs.example.com
*       issuer: CN=openshift-signer@1440688648
* Server auth using Basic with user 'builder'
> GET /oauth/authorize?response_type=token&client_id=openshift-challenging-client HTTP/1.1
Authorization: Basic YnVpbGRlcjpidWlsZGVy
User-Agent: PycURL/7.19.7
Host: losbs.example.com:8443
Accept: */*

< HTTP/1.1 302 Found
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< Location: https://losbs.example.com:8443/oauth/token/implicit#access_token=YVjqHBLhb_JbmJyxsrt04clFzf0kXWDIda-cLA_RZuY&expires_in=86400&token_type=Bearer
< Pragma: no-cache
* Added cookie ssn="MTQ0MTA3NTEyNHx2SW8zdjVoVzVDVWt5X3pTTkR6a1BLZUdYcGNHcDhWNE53QXVPYmxBVVFKZ09weV9qVjV3TFE2b25QcW0zeXZfYy1hRnRuemJ2VHN1LWdNV29xdkh3aXlRdkY4OUF1MkNFUmhEMEdCZXNRZ0I0ODgwN19sRVZHNnF4Mmk3dm55RTV3PT18o1r70X4gSkzQL7RxiE2CDQFijqFp1X03L-MsP57PJjQ=" for domain losbs.example.com, path /, expire<PHONE_NUMBER>
< Set-Cookie: ssn=MTQ0MTA3NTEyNHx2SW8zdjVoVzVDVWt5X3pTTkR6a1BLZUdYcGNHcDhWNE53QXVPYmxBVVFKZ09weV9qVjV3TFE2b25QcW0zeXZfYy1hRnRuemJ2VHN1LWdNV29xdkh3aXlRdkY4OUF1MkNFUmhEMEdCZXNRZ0I0ODgwN19sRVZHNnF4Mmk3dm55RTV3PT18o1r70X4gSkzQL7RxiE2CDQFijqFp1X03L-MsP57PJjQ=; Path=/; Expires=Tue, 01 Sep 2015 03:38:44 UTC; Max-Age=3600; HttpOnly; Secure
< Date: Tue, 01 Sep 2015 02:38:44 GMT
< Content-Length: 0
< Content-Type: text/plain; charset=utf-8
<
* Connection #0 to host losbs.example.com left intact
* Closing connection #0
2015-08-31 21:38:40,420 - osbs.http - DEBUG - raw headers: u'HTTP/1.1 302 Found\r\nCache-Control: no-cache, no-store, max-age=0, must-revalidate\r\nExpires: Fri, 01 Jan 1990 00:00:00 GMT\r\nLocation: https://losbs.example.com:8443/oauth/token/implicit#access_token=YVjqHBLhb_JbmJyxsrt04clFzf0kXWDIda-cLA_RZuY&expires_in=86400&token_type=Bearer\r\nPragma: no-cache\r\nSet-Cookie: ssn=MTQ0MTA3NTEyNHx2SW8zdjVoVzVDVWt5X3pTTkR6a1BLZUdYcGNHcDhWNE53QXVPYmxBVVFKZ09weV9qVjV3TFE2b25QcW0zeXZfYy1hRnRuemJ2VHN1LWdNV29xdkh3aXlRdkY4OUF1MkNFUmhEMEdCZXNRZ0I0ODgwN19sRVZHNnF4Mmk3dm55RTV3PT18o1r70X4gSkzQL7RxiE2CDQFijqFp1X03L-MsP57PJjQ=; Path=/; Expires=Tue, 01 Sep 2015 03:38:44 UTC; Max-Age=3600; HttpOnly; Secure\r\nDate: Tue, 01 Sep 2015 02:38:44 GMT\r\nContent-Length: 0\r\nContent-Type: text/plain; charset=utf-8'
2015-08-31 21:38:40,421 - osbs.core - DEBUG - fragment is 'access_token=YVjqHBLhb_JbmJyxsrt04clFzf0kXWDIda-cLA_RZuY&expires_in=86400&token_type=Bearer'
YVjqHBLhb_JbmJyxsrt04clFzf0kXWDIda-cLA_RZuY

Do you have use_auth set in osbs.conf?

Looks like that you are using username/password based authentication. Unfortunately, we don't support that in the plugin atm, will fix.

we'll also need to enable this in osbs-client

@maxamillion I'm assuming you're running openshift origin/enterprise with default authentication options, i.e. with the AllowAllPasswordIdentityProvider authentication provider, without authenticating proxy in front of the instance.
I'd prefer if we didn't pass the username/password to atomic-reactor - it will get stored in the build logs and build metadata (iirc). I'd suggest two alternatives instead:

For development purposes you can bypass authentication entirely. You can do this by using use_auth=false in osbs.conf. You'll have to set openshift to allow unauthenticated users to start build by running oadm policy add-role-to-group edit system:unauthenticated.

In production we use authenticating proxy combined with the RequestHeaderIdentityProvider. The proxy takes care of the authentication and if it succeeds it sets the X-Remote-User http header which openshift uses as the user's identity. The proxy is configured so that whenever request comes from internal docker IP range (i.e. from atomic reactor) it sends the header without authentication. The configuration is a bit complicated, I can provide details if you want to set it up.

@twaugh - I do yes.
@TomasTomecek - Alright, thanks.
@mmilata - That's exactly it, I'm running Origin with default authentication options set. I thought I'd already set oadm policy add-role-to-group edit system:unauthenticated and had some issues which is why I set use_auth=true to begin with but I'll double check and make sure. It's entirely possible that I missed something. Thank you for your feedback and recommendations for dev vs prod use cases.

For the sake of posterity, I wanted to write this here. I spoke with @mmilata on IRC and we were able to determine that the issue is because I am using an older version of osbs which is currently packaged in EPEL (osbs-0.14-1.el6.noarch) I need the option metadata_plugin_use_auth=false added to my /etc/osbs.conf along with the use_auth=false but that won't be the case in the future or if I was using an install from git.

This has been resolved, I'm marking it as closed. Thanks to everyone who commented.


pkg/probe: probe kernel support for policy routing

When without policy routing enabled, following command
'ip route replace table 2005 default via 192.168.0.XX'
will cause the default route to be overwritten and the external network cannot be accessed.
Signed-off-by: Jianlin Lv<EMAIL_ADDRESS>Fixes: #9834

This change is

test-me-please

Looks like there's some formatting issue. You can check by running make from the repo:
09:22:57  contrib/scripts/check-logging-subsys-field.sh
09:22:57  contrib/scripts/check-fmt.sh
09:22:58  Unformatted Go source code:
09:22:58  ./pkg/datapath/linux/probes/probes_test.go
09:22:58  diff -u ./pkg/datapath/linux/probes/probes_test.go.orig ./pkg/datapath/linux/probes/probes_test.go
09:22:58  --- ./pkg/datapath/linux/probes/probes_test.go.orig	2020-01-14 09:22:58.354864380 +0000
09:22:58  +++ ./pkg/datapath/linux/probes/probes_test.go	2020-01-14 09:22:58.354864380 +0000
09:22:58  @@ -38,65 +38,65 @@
09:22:58   	}{
09:22:58   		{
09:22:58   			systemConfig: SystemConfig{
09:22:58  -				ConfigBpf:               "y",
09:22:58  -				ConfigBpfSyscall:        "y",
09:22:58  -				ConfigNetSchIngress:     "y",
09:22:58  -				ConfigNetClsBpf:         "y",
09:22:58  -				ConfigNetClsAct:         "y",
09:22:58  -				ConfigBpfJit:            "y",
09:22:58  -				ConfigHaveEbpfJit:       "y",
09:22:58  -				ConfigIPMultipleTables:  "y",
09:22:58  -				ConfigCgroupBpf:         "y",
09:22:58  -				ConfigLwtunnelBpf:       "y",
09:22:58  -				ConfigBpfEvents:         "y",
09:22:58  +				ConfigBpf:              "y",
09:22:58  +				ConfigBpfSyscall:       "y",
09:22:58  +				ConfigNetSchIngress:    "y",
09:22:58  +				ConfigNetClsBpf:        "y",
09:22:58  +				ConfigNetClsAct:        "y",
09:22:58  +				ConfigBpfJit:           "y",
09:22:58  +				ConfigHaveEbpfJit:      "y",
09:22:58  +				ConfigIPMultipleTables: "y",
09:22:58  +				ConfigCgroupBpf:        "y",
09:22:58  +				ConfigLwtunnelBpf:      "y",
09:22:58  +				ConfigBpfEvents:        "y",
09:22:58   			},
09:22:58   			expectErr: false,
09:22:58   		},
09:22:58   		{
09:22:58   			systemConfig: SystemConfig{
09:22:58  -				ConfigBpf:               "y",
09:22:58  -				ConfigBpfSyscall:        "y",
09:22:58  -				ConfigNetSchIngress:     "m",
09:22:58  -				ConfigNetClsBpf:         "m",
09:22:58  -				ConfigNetClsAct:         "y",
09:22:58  -				ConfigBpfJit:            "y",
09:22:58  -				ConfigHaveEbpfJit:       "y",
09:22:58  -				ConfigIPMultipleTables:  "y",
09:22:58  -				ConfigCgroupBpf:         "y",
09:22:58  -				ConfigLwtunnelBpf:       "y",
09:22:58  -				ConfigBpfEvents:         "y",
09:22:58  +				ConfigBpf:              "y",
09:22:58  +				ConfigBpfSyscall:       "y",
09:22:58  +				ConfigNetSchIngress:    "m",
09:22:58  +				ConfigNetClsBpf:        "m",
09:22:58  +				ConfigNetClsAct:        "y",
09:22:58  +				ConfigBpfJit:           "y",
09:22:58  +				ConfigHaveEbpfJit:      "y",
09:22:58  +				ConfigIPMultipleTables: "y",
09:22:58  +				ConfigCgroupBpf:        "y",
09:22:58  +				ConfigLwtunnelBpf:      "y",
09:22:58  +				ConfigBpfEvents:        "y",
09:22:58   			},
09:22:58   			expectErr: false,
09:22:58   		},
09:22:58   		{
09:22:58   			systemConfig: SystemConfig{
09:22:58  -				ConfigBpf:               "y",
09:22:58  -				ConfigBpfSyscall:        "y",
09:22:58  -				ConfigNetSchIngress:     "n",
09:22:58  -				ConfigNetClsBpf:         "n",
09:22:58  -				ConfigNetClsAct:         "y",
09:22:58  -				ConfigBpfJit:            "y",
09:22:58  -				ConfigHaveEbpfJit:       "y",
09:22:58  -				ConfigIPMultipleTables:  "y",
09:22:58  -				ConfigCgroupBpf:         "y",
09:22:58  -				ConfigLwtunnelBpf:       "y",
09:22:58  -				ConfigBpfEvents:         "y",
09:22:58  +				ConfigBpf:              "y",
09:22:58  +				ConfigBpfSyscall:       "y",
09:22:58  +				ConfigNetSchIngress:    "n",
09:22:58  +				ConfigNetClsBpf:        "n",
09:22:58  +				ConfigNetClsAct:        "y",
09:22:58  +				ConfigBpfJit:           "y",
09:22:58  +				ConfigHaveEbpfJit:      "y",
09:22:58  +				ConfigIPMultipleTables: "y",
09:22:58  +				ConfigCgroupBpf:        "y",
09:22:58  +				ConfigLwtunnelBpf:      "y",
09:22:58  +				ConfigBpfEvents:        "y",
09:22:58   			},
09:22:58   			expectErr: true,
09:22:58   		},
09:22:58   		{
09:22:58   			systemConfig: SystemConfig{
09:22:58  -				ConfigBpf:               "n",
09:22:58  -				ConfigBpfSyscall:        "n",
09:22:58  -				ConfigNetSchIngress:     "n",
09:22:58  -				ConfigNetClsBpf:         "n",
09:22:58  -				ConfigNetClsAct:         "n",
09:22:58  -				ConfigBpfJit:            "n",
09:22:58  -				ConfigHaveEbpfJit:       "n",
09:22:58  -				ConfigIPMultipleTables:  "n",
09:22:58  -				ConfigCgroupBpf:         "n",
09:22:58  -				ConfigLwtunnelBpf:       "n",
09:22:58  -				ConfigBpfEvents:         "n",
09:22:58  +				ConfigBpf:              "n",
09:22:58  +				ConfigBpfSyscall:       "n",
09:22:58  +				ConfigNetSchIngress:    "n",
09:22:58  +				ConfigNetClsBpf:        "n",
09:22:58  +				ConfigNetClsAct:        "n",
09:22:58  +				ConfigBpfJit:           "n",
09:22:58  +				ConfigHaveEbpfJit:      "n",
09:22:58  +				ConfigIPMultipleTables: "n",
09:22:58  +				ConfigCgroupBpf:        "n",
09:22:58  +				ConfigLwtunnelBpf:      "n",
09:22:58  +				ConfigBpfEvents:        "n",
09:22:58   			},
09:22:58   			expectErr: true,
09:22:58   		},
09:22:58  Makefile:371: recipe for target 'precheck' failed
09:22:58  make: *** [precheck] Error 1
09:23:00  Makefile:87: recipe for target 'jenkins-precheck' failed
09:23:00  make: *** [jenkins-precheck] Error 1

What kind of environment is this typically disabled in? Are there common linux distributions that disable this?
Given the issues outlined above with using bpftool, I wonder if a different approach might work. What happens if you just query the table or attempt to create it to test if policy routing is available?
This is what happens on my system that supports multiple tables, if I query one that doesn't exist:
$ ip route list table 8
Error: ipv4: FIB table does not exist.
Dump terminated
$ echo $?
2

Perhaps we can do some variation on this to perform feature detection instead?
We can perform queries similar to the ip route command above using the vishvananda/netlink library.

This issue was discovered when deploying cilium to MACCHIATObin,which is an Arm-based development board.
Its kernel is trimmed by the manufacturer, not the Linux distribution kernel;
Your suggestion is very helpful, I will try to update this patch using Netlink.

@joestringer  @mrostecki  https://github.com/cilium/cilium/pull/10068  using netlink to check kernel configuration of policy routing


TernServer.jumpToDef() not working when providing option getFile()

Thanks a lot for this amazing editor and all the available plugins.
My scenario: I have a sidebar containing a set of files and a single CodeMirror instance which shows the currently selected file. I've been experimenting with Tern recently and wanted to let the Tern server know about all these files, so that when using the Alt-. shortcut on a variable CodeMirror would show the file containing the definition.
The shortcut works fine unless I provide the getFile option to the CodeMirror.TernServer. I think the problem might be that not all documents have been added to CodeMirror. The problem can be reproduced by replacing line 113 in demo/tern.html with the following lines:
server = new CodeMirror.TernServer({defs: [JSON.parse(code)],
    getFile: (name, callback) => { console.log(name); callback(null, 'var asd = 1;'); },
    switchToDoc: (name, doc) => { console.log('This never gets printed'); }
});
server.server.addFile('asd.js');

In the demo window, write console.log(asd); somewhere in the textarea, put the cursor on the asd variable, press Alt-. and the error message Could not find a definition appears.
The Ctrl-I and Ctrl-O shortcuts work fine.
I would expect the switchToDoc() function to be called but this does not happen. Is this a bug or am I doing something wrong?

Since it works in the demo, I expect you're doing something wrong, or at least unanticipated, but it's been ages since I worked with this code, so I'm not sure what.

I think you misunderstood, the demo doesn't work when adding the above lines. Other commands work, but not the "go to definition" one.

The demo in the CodeMirror website? That one doesn't support multiple-file projects, i.e. it will never add a second file, so neither getFile not switchToDoc are of any use. Adding those lines does not break jumping to definition for me. It doesn't make jumping to asd work, since the server never loads a file which defines asd, but that's correct.

Actually that's what I thought would make it work: server.server.addFile('asd.js');. I thought that adding a file this way would cause the switchToDoc function to be called. Am I misunderstanding the role of that function?

Try server.addDoc('asd.js', new CodeMirror.Doc('var asd = 1;')); (and remove the getFile option).

Yes, that would work, but I was looking for a way to add documents without having to add them to CodeMirror first, since there could be a lot of them. Would it be a performance issue? Does creating a new document involves some significant parsing even before displaying it?

I don't expect it'd be a performance issue -- the data structure CodeMirror creates for a document isn't huge, and unless you have many megabytes of code, you shouldn't worry about this.

Potentially there could be hundreds of documents and only a couple of them could ever be opened, that's why I was looking for a more efficient way. If not for a scenario like this, I don't really get what the getFile option could be useful for, since one could simply add all the documents at the beginning. In my opinion, switchToDoc would be the perfect place to create the new CodeMirror document if it didn't exist yet.

Hi,
I am working with object oriented JavaScript.
Is it possible to pass Object to server.addDoc(fileName,fileContent) function instead of String in the place of fileContent parameter.
Kindly help me with this.


Failed to pull image "ghcr.io/kedacore/keda-admission-webhooks:2.10.0"

Report
Unable to pull container image for keda:
Failed to pull image "ghcr.io/kedacore/keda-admission-webhooks:2.10.0": rpc error: code = Unknown desc = failed to pull and unpack image "ghcr.io/kedacore/keda-admission-webhooks:2.10.0": failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c4f6c218977897acc65c5387159c0d6013a89c2b073b6d7a75adc0dd720c84b8?se=2023-03-24T21%3A05%3A00Z&sig=H48wzNO2TRJSufOZwp8Mw4MLBqFIQ%2FUd%2FAcTnem0Ids%3D&sp=r&spr=https&sr=b&sv=2019-12-12": x509: certificate is valid for *.githubassets.com, githubassets.com, not pkg-containers.githubusercontent.com
This just started occurring in the past 10-20 min or so...
Expected Behavior
image would be retrieved without issue
Actual Behavior
image pull is failing
Steps to Reproduce the Problem

Logs from KEDA operator
example

KEDA Version
2.10.0
Kubernetes Version
1.25
Platform
Microsoft Azure
Scaler Details
Service Bus, CPU
Anything else?
No response

Did you retry the operation?
I tried to reproduce it on my side but it worked:
~  docker pull ghcr.io/kedacore/keda-admission-webhooks:2.10.0
2.10.0: Pulling from kedacore/keda-admission-webhooks
383e1c5dd0c1: Pull complete
b87fe015c3b2: Pull complete
Digest: sha256:8c062db679a95626966f29f9ad26c179acea91105b6258da897b5ed930461267
Status: Downloaded newer image for ghcr.io/kedacore/keda-admission-webhooks:2.10.0
ghcr.io/kedacore/keda-admission-webhooks:2.10.0

No worries!


pac modelbuilder build does not output Custom API methods in a consistent order

I have a Custom API that has not changed. When I re-ran pac modelbuilder build --settingsTemplateFile .\builderSettings.json --outDirectory . to after removing some unrelated tables from the entityNamesFilter section in builderSettings.json.
I was surprised to see the a big diff in the file created for message xxx_BookingRule.cs.
Here is the top of the xxx_BookingRuleRequest class

Here is the bottom of the xxx_BookingruleRequest class - you can see the fields are the same, just in a different order.

I'd expect the methods to be output in a consistent order (alphabetically).
Note: the xxx_BookingruleResponse class was output in an unchanged order (no diffs)

This order is currently influenced by the order that the properties are returned by the API.,
We will accept this enhancement request to force order into an apha order regardless of how they are stored on the server.


How to get the updates about the changes on Microsoft Hosted agent pools  in advance. is there a way ?

Question, Bug, or Feature?:

Feature:
As of today, we are able to see the latest pre-installed software list of Microsoft Hosted agent pool info through the public documentation, inturn which is navigating to respective github docs.
Softwares on MS hosted agent pool:
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software
At times when the minor version of any pre-installed version is updated there, the pipelines are getting failed. Identifying these changes is a tedious task during troubleshooting. Feature requests are as below
Feature Request
Point 1:  If there is a heads up on the changes on any pre-installed software on Microsoft hosted agent pool, will give a better understanding on up-changes.
Point 2:  If the above point is feasible, let us know how can we get notified/subscribe to newsletters/features.
Virtual environments affected

[ ] Ubuntu 16.04
[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] macOS 10.15
[ ] macOS 11.0
[ ] Windows Server 2016 R2
[ ] Windows Server 2019

Hey, @ReddyStuff !
Usually we try to get the latest version possible for the most of software installed and you can track software versions changes via subscription on repository releases. When the image update process starts, we create the pre-release package and when it finishes - the release package.

@LeonidLapshin With what frequency do you rollout the new releases? Looking at the releases now Windows Server 2019 (20201116 update) is released, and earlier versions as well. But the latest rollout progress shows the latest 2019 image as 20201021.0.
I'm using win19/20201108.1 now but the MS hosted agents seems older.

Hey, @krokofant !
The image information on banners is broken and will be fixed soon :) So the releases subscription is still the best option to understand which changes will be applied in the next release :)

Hi, @krokofant !
Banners have been fixed :)

Hi, @krokofant @ReddyStuff
I hope that the release subscription is suitable option. I'll close the issue, but please feel free to reopen it if you have any questions
Thank you!


Add Hackathon Members TBA

Added Hackathon jury and mentors to be announced

This should be changed before release. Probably not this PR though. Thoughts? @feliciofilipe @mariajbp
Otherwise looks good!


Please support ClassExpression

By now esdoc only supports the ECMAScript-6 class declaration syntax.
I you want to add classes to namespaces, and don't want to use the ES6 module system, you have to use the class expression definition instead:
'use strict'

/**
 * @namespace
 */
var ns = {}

/**
 * My sample class.
 *
 * @class
 * @name MyClass
 * @memberof ns
 */
ns.MyClass = class {
  constructor() {
    console.log('in constructor')
  }
}

new ns.MyClass()

But esdoc seems to ignore this kind of class definition, so called class expression and only parses class declaration.
Please also add support for the class expression definition. :smile:

Btw. espree seems to support class expression: https://github.com/eslint/espree/blob/master/tests/fixtures/ecma-features/classes/class-expression.result.js

@SunboX why not just
class Foo {}

ns.MyClass = Foo;

instead?

@SunboX ESDoc already supports class expression.
const Foo = class {
  constructor() {}
}
export default Foo;

However ESDoc does not support global name space style(aka ES5 style).
// this style is not supported.
const ns = {};
ns.Foo = class {
  constructor() {}
}

ESDoc only supports ES6 modules style.