Checkout totals sort order broken with 1.9.3 & PHP7

As described in these Stackoverflow posts, the sorting algorithm for the totals collector classes is broken - and it seems to only be a problem in combination with PHP7.  The consequences of this is devastating for anything relating to a quote or order totals sum, especially when using third party modules for giftcard and or storecredit calculations on top of the core.
http://stackoverflow.com/questions/9194281/sort-algorithm-magento-checkout-totals-sorted-wrongly-causing-wrong-shipping-ta
http://magento.stackexchange.com/questions/92783/magento-grand-total-without-taxes-in-1-9-with-php7
There is a couple of suggested fixes in both threads, but what finally solved it for me was this patch to class "Mage_Core_Config_Base", http://stackoverflow.com/a/11954867/653721
--- app/code/core/Mage/Sales/Model/Config/Ordered.php   2012-08-14 14:19:50.306504947 +0200
+++ app/code/local/Mage/Sales/Model/Config/Ordered.php  2012-08-15 10:00:47.027003404 +0200
@@ -121,6 +121,78 @@
         return $totalConfig;
     }

+// [PATCHED CODE BEGIN]
+
+    /**
+     * Topological sort
+     *
+     * Copyright: http://www.calcatraz.com/blog/php-topological-sort-function-384
+     * And fix see comment on http://stackoverflow.com/questions/11953021/topological-sorting-in-php
+     *
+     * @param $nodeids Node Ids
+     * @param $edges Array of Edges. Each edge is specified as an array with two elements: The source and destination node of the edge
+     * @return array|null
+     */
+    function topological_sort($nodeids, $edges) {
+        $L = $S = $nodes = array();
+        foreach($nodeids as $id) {
+            $nodes[$id] = array('in'=>array(), 'out'=>array());
+            foreach($edges as $e) {
+                if ($id==$e[0]) { $nodes[$id]['out'][]=$e[1]; }
+                if ($id==$e[1]) { $nodes[$id]['in'][]=$e[0]; }
+            }
+        }
+        foreach ($nodes as $id=>$n) { if (empty($n['in'])) $S[]=$id; }
+        while ($id = array_shift($S)) {
+            if (!in_array($id, $L)) {
+                $L[] = $id;
+                foreach($nodes[$id]['out'] as $m) {
+                    $nodes[$m]['in'] = array_diff($nodes[$m]['in'], array($id));
+                    if (empty($nodes[$m]['in'])) { $S[] = $m; }
+                }
+                $nodes[$id]['out'] = array();
+            }
+        }
+        foreach($nodes as $n) {
+            if (!empty($n['in']) or !empty($n['out'])) {
+                return null; // not sortable as graph is cyclic
+            }
+        }
+        return $L;
+    }
+
+    /**
+     * Sort config array
+     *
+     * public to be easily accessable by test
+     *
+     * @param $configArray
+     * @return array
+     */
+    public function _topSortConfigArray($configArray)
+    {
+        $nodes = array_keys($configArray);
+        $edges = array();
+
+        foreach ($configArray as $code => $data) {
+            $_code = $data['_code'];
+            if (!isset($configArray[$_code])) continue;
+            foreach ($data['before'] as $beforeCode) {
+                if (!isset($configArray[$beforeCode])) continue;
+                $edges[] = array($_code, $beforeCode);
+            }
+
+            foreach ($data['after'] as $afterCode) {
+                if (!isset($configArray[$afterCode])) continue;
+                $edges[] = array($afterCode, $_code);
+            }
+        }
+        return $this->topological_sort($nodes, $edges);
+    }
+
+// [PATCHED CODE END]
+
+
     /**
      * Aggregate before/after information from all items and sort totals based on this data
      *
@@ -138,38 +210,16 @@
         // invoke simple sorting if the first element contains the "sort_order" key
         reset($configArray);
         $element = current($configArray);
+        // [PATCHED CODE BEGIN]
         if (isset($element['sort_order'])) {
             uasort($configArray, array($this, '_compareSortOrder'));
+            $sortedCollectors = array_keys($configArray);
+
         } else {
-            foreach ($configArray as $code => $data) {
-                foreach ($data['before'] as $beforeCode) {
-                    if (!isset($configArray[$beforeCode])) {
-                        continue;
-                    }
-                    $configArray[$code]['before'] = array_unique(array_merge(
-                        $configArray[$code]['before'], $configArray[$beforeCode]['before']
-                    ));
-                    $configArray[$beforeCode]['after'] = array_merge(
-                        $configArray[$beforeCode]['after'], array($code), $data['after']
-                    );
-                    $configArray[$beforeCode]['after'] = array_unique($configArray[$beforeCode]['after']);
-                }
-                foreach ($data['after'] as $afterCode) {
-                    if (!isset($configArray[$afterCode])) {
-                        continue;
-                    }
-                    $configArray[$code]['after'] = array_unique(array_merge(
-                        $configArray[$code]['after'], $configArray[$afterCode]['after']
-                    ));
-                    $configArray[$afterCode]['before'] = array_merge(
-                        $configArray[$afterCode]['before'], array($code), $data['before']
-                    );
-                    $configArray[$afterCode]['before'] = array_unique($configArray[$afterCode]['before']);
-                }
-            }
-            uasort($configArray, array($this, '_compareTotals'));
+            $sortedCollectors = $this->_topSortConfigArray($configArray);
         }
-        $sortedCollectors = array_keys($configArray);
+        // [PATCHED CODE END]
+
         if (Mage::app()->useCache('config')) {
             Mage::app()->saveCache(serialize($sortedCollectors), $this->_collectorsCacheKey, array(
                     Mage_Core_Model_Config::CACHE_TAG
@@ -196,27 +246,6 @@
     }

     /**
-     * Callback that uses after/before for comparison
-     *
-     * @param   array $a
-     * @param   array $b
-     * @return  int
-     */
-    protected function _compareTotals($a, $b)
-    {
-        $aCode = $a['_code'];
-        $bCode = $b['_code'];
-        if (in_array($aCode, $b['after']) || in_array($bCode, $a['before'])) {
-            $res = -1;
-        } elseif (in_array($bCode, $a['after']) || in_array($aCode, $b['before'])) {
-            $res = 1;
-        } else {
-            $res = 0;
-        }
-        return $res;
-    }
-
-    /**
      * Callback that uses sort_order for comparison
      *
      * @param array $a

There is already a totals fix in this patch, are you saying that <IP_ADDRESS> somehow undoes it?

I wouldn't call that a fix, it only solves the immediate symptom - not the underlying cause.  This patch actually fixes the problem - and was the only solution that worked for my specific set of third-party modules that added sorting of their own.
The Stackoverflow posts linked will go into more detail about how this is happening, but it has to do with the sorting used and some highly technical details I'm not so familiar with...
@ http://stackoverflow.com/a/9258826/653721

There are several possible solutions, even though the original problem is the choice of quicksort to build a directed acyclic dependency graph
One (bad, shortterm) solution would be to add more dependencies to the giftwrapping total, even though there might still be more problems with other totals that simply didn't surface so far.
The real solution would be to implement a topological sorting algorithm for the problem.

@bubach , @durzel - first of all, big thanks for all your work on fixing totals sort.
Following the information you provided, I added topological sort to <IP_ADDRESS> branch of this extension. (It will probably be needed in the master branch, too. I plan to add it there later.) The version I added is the very nice implementation that @IvanChepurnyi made for Magento 2 (https://github.com/magento/magento2/pull/49/files). It adds topological sorting right into _getSortedCollectorCodes() method.
Following that, I removed the XML order fix, as it shouldn't be needed any more.
My first tests seem to show everything works fine, but I would like to hear your experience with it, if you've got the time to try and test it on projects where you had problems.

Will do.  I'm on <IP_ADDRESS> so I would be on the 2.x branch, so I would need to wait for the master branch to be updated in order to be able to give you some constructive feedback. 👍

@durzel , master branch updated.

  Will update my dev site later, run some tests and give some feedback as soon as I can.

I believe that 2.0.1 release fixes this problem.


Open in terminal option not visible on load

Issue Type: Bug
"Open in terminal" option is not visible in the context menu when a new VS Code window is loaded. The option is again visible when a new file/folder is created.
VS Code version: Code 1.33.1 (51b0b28134d51361cf996d2f0a1c698247aeabd8, 2019-04-11T08:27:14.102Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4 x 2295)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: unavailable_offsurface_synchronization: enabled_onvideo_decode: enabledwebgl: enabledwebgl2: unavailable_off

Memory (System)
3.90GB (0.53GB free)

Process Argv
C:\ws\nest-apps

Screen Reader
no

VM
0%

Extensions (5)

Extension
Author (truncated)
Version

dart-code
Dar
3.0.1

flutter
Dar
3.0.1

prettier-vscode
esb
1.9.0

dart-syntax-highlighting-only
osc
1.0.0

LiveServer
rit
5.6.1

Can you be more specific on how you bring up the context menu where it's missing? A screenshot might help

When vscode is opened:

After creating a file:

Thanks for reporting this. I have pushed a fix and the vscode insiders from Monday will have the fix. You can try it out and let us know if the fix solves the issue for you. Thank you

Thanks @isidorn I'll check it out and revert.


Replace tsd with typings and compile using ts-loader

Replaced tsd with typings
Changed webpack configs to typescript (with compilation task)
Updated react to latest
Removed babel-loader

Documentation will need to be updated :)

Hello @deevus ,
It seems good for me.
Before merging, can you please update doc + add a "contributors" key inside package.json with your name ?
Thank you for your contribution :+1:

Sure thing. It will have to wait until I have some free time.
On Fri, May 27, 2016 at 3:04 AM Ayoub ADIB<EMAIL_ADDRESS>wrote:

Hello @deevus https://github.com/deevus ,
It seems good for me.
Before merging, can you please update doc + add a "contributors" key
inside package.json with your name ?
Thank you for your contribution 👍
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/ayoubdev/reactjs-typescript-starterkit/pull/1#issuecomment-221932678


Implement umask

gunicorn uses os.umask() which is the python wrapper for the umask syscall.
Adding umask should be pretty simple with our current setup.

These were fixed by me and @Devansh-Patel


dll-app-and-vendor example does not work

The original example by eoksni has been refactored and completely broken.
A ".bundle" has been removed, but not everywhere.
The unique build folder of eoksni  has been replaced by 2 different js folders but the html file refers to only one of them.

This should be closed, doesnt happen automatically @sokra ?


need a way to link to a specific time on the map

What's your idea for a cool feature that would help you use OHM better.
Right now, the map always defaults to a static year and date range, so you cannot share a particular year view of the map.
It would be awesome to be able to embed the year of the map display in the URL.
That way you could:

Link directly to ancient Rome
A civil war battlefield in the year of the battle
a year before a border changes

Current workarounds
Only to tell people when you pass them the link.
Additional info
nfi at this time (get it ; ) )

Related to #108 cc: @rwelty1889

Merged into #108 and closing.

Merged into #108 and closing.


POJO not created with json with gradle task generateJsonSchema2Pojo

POJO classes are created with json schema but does not work with json.
I am using jsonschema2pojo-gradle-plugin and this is my section in build.gradle
jsonSchema2Pojo {
source = files("${sourceSets.main.output.resourcesDir}/config/ImportExport.json")
targetDirectory = file("${project.projectDir}/src/main/java")
targetPackage = 'com.trimble.fsm.tools.schemas'
annotationStyle = 'gson'
sourceType = 'json'
outputEncoding = 'UTF-8'
}
When i run the task generateJsonSchema2Pojo, and give the source point to a json schema, it works but when i give a json file , pojo classes are not created.

Hi. Which version of jsonschema2pojo are you using?

Sorry.I was trying with 0.4.0. It works with 0.4.21.


[recipe request] AllenNLP

Name of package: AllenNLP
URL of package source code: https://github.com/allenai/allennlp
License of package: Apache-2
List of package dependencies:

torch>=0.4.1,<1.2

# Parameter parsing (but not on Windows).
jsonnet>=0.10.0 ; sys.platform != 'win32'

# Adds an @overrides decorator for better documentation and error checking when using subclasses.
overrides

# Used by some old code.  We moved away from it because it's too slow, but some old code still
# imports this.
nltk

# Mainly used for the faster tokenizer.
spacy>=2.1.0,<2.2

# Used by span prediction models.
numpy

# Used for reading configuration info out of numpy-style docstrings.
numpydoc>=0.8.0

# Used in coreference resolution evaluation metrics.
scipy
scikit-learn

# Write logs for training visualisation with the Tensorboard application
# Install the Tensorboard application separately (part of tensorflow) to view them.
tensorboardX>=1.2

# Accessing files from S3 directly.
boto3

# REST interface for models
flask>=1.0.2
flask-cors>=3.0.7
gevent>=1.3.6

# Used by semantic parsing code to strip diacritics from unicode strings.
unidecode

# Used by semantic parsing code to parse SQL
parsimonious>=0.8.0

# Used by semantic parsing code to format and postprocess SQL
sqlparse>=0.2.4

# For text normalization
ftfy
word2number>=1.1

# To use the BERT model
pytorch-pretrained-bert>=0.6.0
git+git://github.com/huggingface/pytorch-transformers.git@a7b4cfe9194bf93c7044a42c9f1281260ce6279e

# For caching processed data
jsonpickle

#### ESSENTIAL LIBRARIES USED IN SCRIPTS ####

# Plot graphs for learning rate finder
matplotlib>=2.2.3

# Used for downloading datasets over HTTP
requests>=2.18

# progress bars in data cleaning scripts
tqdm>=4.19

# In SQuAD eval script, we use this to see if we likely have some tokenization problem.
editdistance

# For pretrained model weights
h5py

# For timezone utilities
pytz>=2017.3

# Reads Universal Dependencies files.
conllu==1.3.1

Short description of package and use case(s):
An open-source NLP research library, built on PyTorch

Folks who would also like to see this package in the supplementary channel, please thumbs-up so the developers can know which requests to prioritize.

I'm taking a look at this. Have a recipe (based on conda-forge + updates) that builds locally, but with a lot of unit tests failing at the moment.


adapter.{json,xml}: make (de-)serialization interfaces coherent

lxml supports paths already, no modification is necessary there.
However, the lxml.etree.ElementTree.write() function requires
BinaryIO, i.e. files opened with the 'b' mode. While it would be
possible to access the underlying binary buffer of files opened in text
mode via open(), this isn't possible for io.StringIO(), as it
doesn't have the buffer property. Thus, even if we could support files
opened via open() in text mode, we couldn't annotate the XML
serialization functions with TextIO, as io.StringIO() remains
unsupported. Because of that, I decided to not support TextIO for the
XML serialization.
The builtin JSON module only supports file handles, with the
json.dump() method only supporting TextIO and json.load()
supporting TextIO and BinaryIO. Thus, the JSON adapter is modified
to open() given paths, while the JSON serialization is additionally
modified to wrap BinaryIO with io.TextIOWrapper.
Fix https://github.com/eclipse-basyx/basyx-python-sdk/issues/42

LGTM, that might make the integration of aas-core easier as well.


Fix  the environment variables key error  of use juicefs-csi-driver in GKE

Change the environment variables key  GKEGOOGLE_CLOUD_PROJECT to GOOGLE_APPLICATION_CREDENTIALS

Please also update GKE env in example.


Prevent markPoint labels overlapping

What problem does this feature solve?
For example, in the line chart below, left Y-axis labels are overlapping for Torsica and Mitzerland series
var option;

const dataset = [[150, 230, 224, 218, 135, 147, 260], [230, 160, 70, 135, 147, 140, 110], [145, 147, 260, 340, 290, 110, 115]];
const entity = ['Mangolia', 'Mitzerland','Torsica'];

const seriesList = [];
for (const index in dataset) {
  const row = dataset[index];
  seriesList.push({
    type: 'line',
    data: row,
    name:entity[index],
    labelLayout: {moveOverlap: 'shiftY'},
    labelLine: {show: true},
    endLabel: {
      show: true,
      formatter: '{a} = {c}'
    },
    markPoint: {
      symbolSize: 0,
      label: {
        position: 'left',
        formatter: (params)=> `${params.value} = ${params.data.coord[1]}`
      },
      data: [{coord: [0, row[0]], value: entity[index]}]
    }
  });
}

option = {
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value',
    offset: -260
  },
  series: seriesList
};

What does the proposed API look like?
Label overlapping could be prevented with an equivalent of labelLayout: {moveOverlap: 'shiftY'} and labelLine: {show: true}.

两个离的比较近的markPoint有可能会有部分内容重叠，有办法调整么


Add suffixes to all nodes and resources

Follow-up to https://github.com/godotengine/godot/pull/50106
Adds suffixes most of the remaining node and resource properties. However, I didn't add suffixes for some properties that I don't fully understand (mostly in Environment and Generic6DOFJoint3D) as I don't want the units to be incorrect.
Also adds suffix support to EditorPropertyInteger, which previously ignored suffixes.
Suffixes still need to be added for editor and project settings, but this can be done in another PR.

Needs a rebase, and then it should be fine to merge. I'm still not convinced of the real value that these suffixes will bring to users, and it seems to be a bit troublesome to maintain for all properties where they're relevant, but I don't mind giving it a try.

Rebased.

I'm still not convinced of the real value that these suffixes will bring to users

It's definitely not a huge improvement, but there are some cases where the unit isn't immediately apparent from the property name. Having the units visible saves some time from having to look in the documentation tooltip for the unit. For example, some Label3D properties are in pixels and some are in meters. For properties that are measured in time, some are in seconds, others are in milliseconds, and others in microseconds.

it seems to be a bit troublesome to maintain for all properties where they're relevant

That's true, it could be a bit difficult. But whenever I see open PRs that add new properties that need suffixes, I can leave review suggestions on them to add them, and I'll open a PR for any other properties I find that are missing them going forward. I can be the unofficial property suffix maintainer I guess :P

It might also be a good idea to look into suffix localization. However, someone more experienced in other languages could give input on this better than me since I only know English.

I went ahead and added the px suffix to Theme font size overrides as well since those are always measured in pixels.

@fire-forge: The majority of the world uses SI units and suffixes (yes, that includes Arabic and Japanese, they use the same units and suffixes AFAICT just with their own spelling/writing system). The only exception I can think of is Hindu which uses SI units but custom suffixes for large numbers.

Ok, I reviewed the changes again and fixed a few issues I found. Somehow git managed to remove a few properties when rebasing. Should be ready for review now!

Thanks!


google_maps_flutter PlatformException(create_failed, can't create a view on a headless engine, null)

Hi everyone, this issue appeared with no changes in code. I was able to use google maps normally, however I started to get below error. Google map will stay white. However, when I run the app again it works fine. Only The first run that has this error.
Thanks
GoogleMap(
              mapType: MapType.hybrid,
              initialCameraPosition: _initial_pos,
              myLocationEnabled: true,
              myLocationButtonEnabled: false,
              scrollGesturesEnabled: true,
              zoomGesturesEnabled: true,
              markers: markers,
              onCameraMove: (CameraPosition pos) {
                setState(() {
                  _current_location = pos.target;
                });
              }, // _createMarker(),
              onMapCreated: (GoogleMapController controller) {
                _controller = controller;
              },
            ),

VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: PlatformException(create_failed, can't create a view on a headless engine, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
#1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
<asynchronous suspension>
#2      PlatformViewsService.initUiKitView (package:flutter/src/services/platform_views.dart:167:41)
<asynchronous suspension>
#3      _UiKitViewState._createNewUiKitView (package:flutter/src/widgets/platform_view.dart:499:71)
<asynchronous suspension>

> Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.13.6 17G7024, locale en-BH)

Checking Android licenses is taking an unexpectedly long time...⣟^C
Ahmeds-iMac:take_it ahmedbuchery$ flutter doctor -v
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.13.6 17G7024, locale en-BH)
    • Flutter version 1.7.8+hotfix.3 at /Applications/flutter
    • Framework revision b712a172f9 (7 days ago), 2019-07-09 13:14:38 -0700
    • Engine revision 54ad777fd2
    • Dart version 2.4.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at /Users/ahmedbuchery/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • CocoaPods version 1.7.4

[✓] iOS tools - develop for iOS devices
    • ios-deploy 1.9.4

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 34.0.4
    • Dart plugin version 191.6183.88

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

[✓] Connected device (3 available)
    • ONEPLUS A5000   • fda25b09                             • android-arm64 • Android 9 (API 28)
    • Ahmed’s iPhoneX • 00008020-000C70C23A90003A            • ios           • iOS 13.0
    • iPhone XR       • 2106863E-206C-47F6-9193-F1FD2FA936AE • ios           • com.apple.CoreSimulator.SimRuntime.iOS-12-1 (simulator)

• No issues found!

Weird Solution is the a had the zoom as zero before, changed it to 1 then 2, however still same issue. Then tried zoom level 3 and it is fine now?!
Thanks

Hi, can you please explain better how you solved it?? Having the same issue for days

Hi Jumpbotron,
As mentioned above, I have just changed the initial camera zoom level from level to level 3. Apparently it will crash when the map is smaller than the screen.

Any updates on this? I am still getting the same error. Any workaround for now ? My zoom is already 12 by default.

Any updates on this? I am still getting the same error. Any workaround for now ? My zoom is already 12 by default.

Hi, did you checked your google maps key and on which container are you putting it?

I was facing the same issue and managed to solve it.
It turns out that I was trying to show the map while asking user for Notification permission or Location permission.
The solution is to hide the map or show a loader spinner until the user answers the permission dialogs.

I'm wondering if it's some kind of race condition regardless of permissions, so waiting for permissions buys some time before map is rendered.

I was facing the same issue and managed to solve it.
It turns out that I was trying to show the map while asking user for Notification permission or Location permission.
The solution is to hide the map or show a loader spinner until the user answers the permission dialogs.

Could you elaborate on how you achieved this? DId you put the logic for checking the permission into the same Widget which renders the map?

I have a FutureBuilder that waits for permission dialog result before rendering map, but this did not manage to fix the issue. Does anyone else have any other solutions?

Any updates on this ? I'm getting the same error on the last version of the plugin

this happens when the app is requesting for any permission in ios, and the flutter NativeView try to render itself. so as long as the permission dialog hanging there, i think it's considered to be "headless". what you can do to fix this is basically wait until the permission request is finished, and then try to render / call the build NativeView (whatever it is, could be WebView or GoogleMap)
although this case is relatively hard to reproduce, and considered to be rare occasion (need to have ios permission request script [calling the GPS location / Notification received thus will prompt notification permission request / start motion activity update], and render the NativeView at the same time)

@ricnaaru sorry but this is not a rare occasion and not at all hard to reproduce. I even await permission confirmation before rendering (I could very easily reproduce before adding this) and it still keeps happening.

Any updates on this? I am still getting the same error at the issue @LichKing-2234 referenced.

I'm facing a similar issue, and have a couple things to add.
I've added a AppLifecycleState hook, so i can tell when the app is looking for permissions to be accepted, because the app becomes inactive.  I've used xcrun privacy, available in version 50, and this resolves my issue on my laptop, with a headed simulator.
However, we have an OSX CI/CD machine where I'm trying to run our tests, and I'm still facing issues where the onMapCreated call is never invoked.  I've gotten past the permission issues, i think, but still, not sure whats going on in this headless environment.  I suspect it's related to this problem.
This is being experienced in the context of flutter driver, as demonstrated below:
flutter build ios --debug --no-codesign --target=test_driver/app.dart
xcrun simctl install $UDID ./build/ios/iphoneos/Runner.app
xcrun simctl privacy $UDID grant location-always com.xxx.yyyy
flutter driver --target=test_driver/app.dart --driver=test_driver/some_test.dart --no-build

I'm building and installing the app, then setting the permissions for Location, then running the tests.  If i run the privacy command before installing the app, or don't run it at all, I'm able to observe my app ask for permissions based on the AppLifecycleState hooks

I also encountered this problem.
Delaying the creation of UIKitView a few seconds when initializing the Widget, and then frequently switching between the front and background can be reproduced steadily. You will encounter this.
demo：https://github.com/seeuli/my_app/tree/feature/platform_exception
steps：

click button "PlatformView"
Frequent switching between front and background

flutter doctor -v
[✓] Flutter (Channel unknown, v1.17.1, on Mac OS X 10.15.5 19F101, locale zh-Hans-CN)
    • Flutter version 1.17.1 at /Users/liyf/.flutter_sdk
    • Framework revision f7a6a7906b (8 weeks ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/liyf/Library/Android/sdk
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/liyf/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    ! CocoaPods 1.6.2 out of date (1.8.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage
        on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade:
        sudo gem install cocoapods

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.4.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

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

[✓] Connected device (1 available)

This exception usually occurs when the PlatformView is created for the second time and later.

This exception usually occurs when the PlatformView is created for the second time and later.

@jason-simmons @jmagman @gspencergoog

Triage: This looks like a race in the plugin lifecycle when the engine thinks that the app is still in the background by the time the plugin needs to be setup.

cc @cyanglaz for triage.

This should be fixed by https://github.com/flutter/engine/commit/3d104f43649d333492dfa792968c8a09af93a84c#diff-77cd0412ef34958c72d156d4b818b7d7 and https://github.com/flutter/engine/commit/1c13abaab120d8d2d4c07e5b5fc75100f56a89e2#diff-77cd0412ef34958c72d156d4b818b7d7
I will tentatively close the issue. If anyone finds it not fixed, please ping me here and I will re-open the issue and further investigate.


TypeError: Cannot read property 'aadHttpClientFactory' of undefined

Hi,
I am following the tutorial  in connecting Azure AD with my sharepoint solution.
My current @microsoft/sp-http version is 1.7.1
import { AadHttpClient, HttpClientResponse } from '@microsoft/sp-http';
private test(){     this.context.aadHttpClientFactory      .getClient('ID')      .then((client: AadHttpClient): void => {         //API      });   }
However it gave me

Uncaught (in promise) TypeError: Cannot read property 'aadHttpClientFactory' of undefined

Thanks in advance to anyone who may be able to help:)

So, chances are you have a bug in your code, and you haven't correctly bound the test() function to the current object (and thus the "this" property isn't the normal one for the object).
What does your code look like when you call test()?


fix(address type): allows user to set his preference in scaffold config

I aligned all addresses to use the Address type of viem (see #617).
Also added a config option for a dev to use more strict Address if he wants additional typesafety (default is current behavior where addresses are typed as string).
(This also basically fixes #514 by making it optional, with a sensible default)

Also added a config option for a dev to use a more strict Address if he wants additional typesafety (default is current behavior where addresses are typed as string).

Love this idea, best approach !!!!!

As much as I prefer stricter types, I'd go for the newbie-friendly approach as that's a big group of the target users.


Retrieve SAS token

What this PR does / why we need it:
Which issue(s) this PR fixes :
Fixes #2392
Type of changes
Please delete options that are not relevant.

[ x ] New feature (non-breaking change which adds functionality)

Thanks @tjandy98 !
/lgtm
/approve


Dep not building correct path to vendor package

What version of dep are you using (dep version)?
v0.4.1
What dep command did you run?
dep ensure && fresh
Resulting output
 vendor/github.com/myGithub/myProject/app/app.go:4:2: cannot find package "hotelMyAdmin/app/lib/mongodb" in any of:
	/go/src/github.com/myGithub/myProject/vendor/myProject/app/lib/mongodb (vendor tree)
	/usr/local/go/src/myProject/app/lib/mongodb (from $GOROOT)
	/go/src/myProject/app/lib/mongodb (from $GOPATH)

What did you expect to see?
Not this error
What did you see instead?
An error telling me that the package was not found inside the vendor folder
The issue is, is that it looks for the package in myProject/vendor/myProject/ instead of placing it where its supposed to be in myProject/vendor/github.com/myGithub/myProject.
The import path i use in the go code looks like this: github.com/myGithub/myProject/app/lib/mongodb
Fresh does report that the package was installed by printing out the following:
13:25:00 watcher     | Watching vendor/github.com/myProject/myProject/app/lib/mongodb

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!


Update README.md

Fixes Issue
closed issuse #463
Changes proposed
the iOS-Development is added to main readme page
Screenshots

Note to reviewers

Please implement the changes mentioned by @Sandeep-RN. There is no need to remove any lines for this context.

Why are you removing the "Contribution" and "Connect with us" sections? (From Line 19-25) Correct it. And I think the "iOS-Development" should be in-between the "Android-Development" and "Backend-Development".


Keycloak OIDC groups sync Issue: 7096

Description
This pull request introduces group syncing for Keycloak (i.e. https://github.com/DefectDojo/django-DefectDojo/issues/7096 )
However the keycloak social auth provider  (https://github.com/python-social-auth/social-core/blob/master/social_core/backends/keycloak.py) is really not a good implementation (it hardcodes the public key and string appends it......) and further more just bases itself of the BaseOAuth2 class and not the OICD class.  Therefore in this pull request we replace the Keycloak provider with the plain: https://github.com/python-social-auth/social-core/blob/master/social_core/backends/open_id_connect.py this works perfectly with our local Keycloak instance on our Defectdojo fork.
As currently it seems "larger" pull requests are more difficult to merge, I have not "finished" this pull request, the documentation is not updated nor have I removed some of the "old" properties of the "keycloak" backend.
The question to the maintainers is if you will consider this change ? or if you think this is to large/breaking change....
If you are willing to merge it, I will clean it up further and incorporate any other improvements or suggestions you might have.
Test results
Ideally you extend the test suite in tests/ and dojo/unittests to cover the changed in this PR.
Alternatively, describe what you have and haven't tested.
Documentation
Documentation is not yet updated, if you are open to merging this then I would update the documentation
Checklist
This checklist is for your information.

[ ] Make sure to rebase your PR against the very latest dev.
[ ] Features/Changes should be submitted against the dev.
[ ] Bugfixes should be submitted against the bugfix branch.
[ ] Give a meaningful name to your PR, as it may end up being used in the release notes.
[ ] Your code is flake8 compliant.
[ ] Your code is python 3.11 compliant.
[ ] If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
[ ] Model changes must include the necessary migrations in the dojo/db_migrations folder.
[ ] Add applicable tests to the unit tests.
[ ] Add the proper label to categorize your PR.

Extra information

@lme-nca I've re-kicked the tests but even if they all pass, you'll need to fix the Ruff linter issue before we can start the approval process.

@lme-nca this looks like the proposal is to use a generic OID backend with some key cloak references mixed in. If we are to generalize on OIDC, I think it should be done all the way.
This proposal raises a question: do we want to support a generic OIDC mechanism? It seems like OAuth is more widely used at this point, and would add more value. @mtesauro what do you think?

Hi @Maffooch & @mtesauro,
Thanks for looking at the pull request.
Currently defectdojo is kind of already using OIDC not just Oauth in your keycloak implementation, see defectdojos on documenation on how to set up the client in Keycloak: https://defectdojo.github.io/django-DefectDojo/integrations/social-authentication/#configure-keycloak  Keycloak always does oidc on top of Oauth, like just about any other authentication provider. Furthermore, the current keycloak provider is unusable as it hardcodes the public key, making key rotation by the provider impossible.....
Another example is Defectdojo's "Auth0" integration, which is based on  https://github.com/python-social-auth/social-core/blob/master/social_core/backends/auth0.py which also reads the "id_token" value, which is a OIDC only concept, even though the class only inherits from the "BaseOAuth2" baseclass. It should probably instead also inherit from https://github.com/python-social-auth/social-core/blob/master/social_core/backends/open_id_connect.py  The same goes for OCTA which uses the OIDC well known endpoint: https://github.com/python-social-auth/social-core/blob/master/social_core/backends/okta.py
The fact is that nearly all Authentication providers use a mix of Oauth and OIDC protocol elements to provider their services and a lot of the providers in https://github.com/python-social-auth/social-core/tree/master are not distinguishing this correctly.
@Maffooch
The problem with generalizing to OID is that this pull request relies on keycloak specific groups and mapper mechanisms to sync groups from keycloak to defectdojo (i.e. it requires the use of https://www.keycloak.org/docs-api/21.1.2/javadocs/org/keycloak/protocol/oidc/mappers/GroupMembershipMapper.html ). Now other providers probably have very similar mechanisms but if they work the same depends heavily on their configuration..... Therefore I would suggest that from a user point of view this is all Keycloak specific (that this uses the generic OIDC connect backend is irrelevant).
Therefore I propose to keep the configuration from Defectdojo side "keycloak" specific, while under water using the OIDC provider of social core to properly integrate with keycloak.

@lme-nca I'm not opposed to this change in the keycloak integration - I get the points you're making about these being Keycloak-specific groups.
However, to move forward, the tests would have to be green both Ruff and the various unit-tests.

@lme-nca I'm not opposed to this change in the keycloak integration - I get the points you're making about these being Keycloak-specific groups.
However, to move forward, the tests would have to be green both Ruff and the various unit-tests.

@mtesauro Ok the tests are green now, I also made a note in the documentation (docs/content/en/integrations/social-authentication.md) as this should still be updated. Let me know if you agree with the technical part of the Pull request and then ill update the documentation to match the new process.

@mtesauro @Maffooch All tests pass, documentation has been updated. Would really like to merge this to avoid further conflicts down the road.....

Thank you for contributing to DefectDojo! We have a mantra around here with regards to merging a pull request: “A no is just for today, but a yes is forever”. With that said, we must say no to this PR for today because it has gone stale

@Maffooch @mtesauro : So we are just happy to have a broken and insecure Keycloak integration in Defectdojo ??? I really would like to fix it, but for this I need some kind of Project support to get this pull request approved ?

@lme-nca

So we are just happy to have a broken and insecure Keycloak integration in Defectdojo ???

No, of course not. I don't have Keycloak nor any experience with it so I'm not in a place to say if there are deficiencies in the support for Keycloak we get from the social-auth Python module we're using.

I really would like to fix it, but for this I need some kind of Project support to get this pull request approved ?

We'd really like someone in the community with access to Keycloak to help maintain that SSO provider. @Maffooch wrote "because it has gone stale" which it had when he closed this PR.
One of the things we're starting to use to keep the PR list clean is to look at the last time an update happened to a PR with a conflict. There's been no updates to this PR since a merge conflict happened back on June 3rd. I think if you ask most code maintainers if a PR which a merge conflict and no updates for ~4 months was stale, they'd say yes. That's what we did here.
You're welcome to re-open this PR or start a new one - @Maffooch did say "A no is just for today, but a yes is forever" which seems fair for a feature that requires access to a 3rd party system which is non-trivial to setup and maintain.
You might also look at this currently open PR - #10614 that is adding generic OIDC login which might accomplish what you were looking for here.
Cheers!

@mtesauro the conflict happens because of the HASH check (or in my case database change) which happens every single time another change gets merged (that changes the hash or db)... it would be easier to review the code, approve it and then when we are ready to merge fix this last "conflict" which is not a real conflict but an artificial barrier introduced that is actively stopping people from contributing as these pull request simply get ignored/not reviewed afterwards...
(look here, he also went trough the useless effort: https://github.com/DefectDojo/django-DefectDojo/pull/10614/commits/f97900eb2ab4b76812fc7c0ccf2894ee9c730363 ) sadly since then there is a new conflict..... and now he has to jump through hoops again....
Honestly, there is a great community of people who would like to contribute, but everyones time is valuable and this process is disrespectful of the time that people put into these pull requests.

@lme-nca Yes, you found what I was going to point out.
We're aware that an effort to try to keep people deploying and using DefectDojo in a incorrect way has had the side effect of making it harder for the community to make contributions since they are frequently getting tripped up by that sha256sum. And, we're working through the best way to remove that contribution burden. If you're still interested in restarting this work and want to wait till that's merged, I completely understand that position.
BTW, I don't believe the script that Maffooch used to find the stale PRs was clever enough to make the distinction between sha256 conflicts and other merge conflicts though I've not seen it myself. TBH, I'm not sure if GH's API gives you those detail as I've never looked at that part of their API. Once #11299 is merged, that lack of distinction should no longer matter.

@lme-nca I tried your fork while everything is setup I got error 500 when redirected back to defectdojo after login page:
[pid: 1|app: -|req: -/-] <IP_ADDRESS> (admin) {76 vars in 1412 bytes} [Tue Dec 31 15:22:30 2024] GET /alerts/count => generated 12 bytes in 1891 msecs (HTTP/1.1 200) 7 headers in 212 bytes (1 switches on core 0)
[pid: 1|app: -|req: -/-] <IP_ADDRESS> (-) {78 vars in 1503 bytes} [Tue Dec 31 15:22:32 2024] GET /login/oidc/?next=/ => generated 0 bytes in 406 msecs (HTTP/1.1 302) 11 headers in 822 bytes (1 switches on core 1)
[31/Dec/2024 15:22:45] ERROR [django.request:248] Internal Server Error: /complete/oidc/
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 963, in json
return complexjson.loads(self.content.decode(encoding), **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/views/decorators/cache.py", line 80, in _view_wrapper
response = view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_django/utils.py", line 49, in wrapper
return func(request, backend, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_django/views.py", line 31, in complete
return do_complete(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/actions.py", line 49, in do_complete
user = backend.complete(user=user, redirect_name=redirect_name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/backends/base.py", line 39, in complete
return self.auth_complete(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/utils.py", line 253, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/backends/oauth.py", line 427, in auth_complete
return self.do_auth(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/utils.py", line 253, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/backends/oauth.py", line 434, in do_auth
data = self.user_data(access_token, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/backends/open_id_connect.py", line 260, in user_data
return self.get_json(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/social_core/backends/base.py", line 250, in get_json
return self.request(url, *args, **kwargs).json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 971, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[pid: 25|app: -|req: -/-] <IP_ADDRESS> (-) {76 vars in 1893 bytes} [Tue Dec 31 15:22:45 2024] GET /complete/oidc/?state=9z6vh5wt3J5njCE9AxTOhg6Em56a3JcB&session_state=06c4a920-6b51-410e-889d-decfbe4881e1&code=529afbd7-9d12-4622-864b-131a5bc4a899.06c4a920-6b51-410e-889d-decfbe4881e1.0b1a800e-6f3a-4d26-90e2-3c6ec9affa4e => generated 12946 bytes in 157 msecs (HTTP/1.1 500) 7 headers in 242 bytes (1 switches on core 0)


Account - Verify that all methods are implemented

Verify that all methods below have been implemented.
Account

[x] /account
[ ] /account/{id}/lists
[x] /account/{id}/favorite/movies
[x] /account/{id}/favorite/tv
[x] /account/{id}/favorite
[x] /account/{id}/rated/movies
[x] /account/{id}/rated/tv
[ ] /account/{id}/rated/tv/episodes
[x] /account/{id}/watchlist/movies
[x] /account/{id}/watchlist/tv
[x] /account/{id}/watchlist

See also:
https://www.themoviedb.org/talk/557f1af49251410a2c002480


Does AccessTokenValidation allow for CORS enforcing?

Current setup:

IdentityServer3
IdentityServer3.Admin
A lot of Clients defined (including a number of clients developed by thirty party apps)
One API with AccessTokenValidation

We want to enforce the CORS specified in the IdentityServer on the API, and not just allow every site to use it. Is this possible?
Currently we use Microsoft.Owin.Cors
app.UseCors(CorsOptions.AllowAll);

We don't so any CORS work in the access token validation MW -- that's up to you.

It would be nice to have an option in the app.UseIdentityServerVearerTokenAuthentication(...) call to say, RegisterIdentityServerCorsPolicy = true
What would then fetch all registered Cors from IdentityServer and register a CorsPolicy for it, like it does on IdentityServer3 itself.

separation of concerns.
That's separate middleware

Do you know if identity server provides something like the .well-known/openid-connect for fetching the Cors?
Willing to create middleware for this purpose.

I don't follow.

Can I get a Json file with all the CORS defined in IdentityServer. Or does this need to be build as well.

IdentityServer's allowed CORS origins is for Ajax calls to its endpoints, not your web apis endpoints. If you want your web apis to use the same list, then you'd have to build something to share them.


cheats not working for convert

Hello Sir,
can you help me get the following cheat right?
Scale to max dimension,keep aspect ratio
convert "$original_file -resize $max_dim $new_file"
original_file:original file name with extension
new_file:new file name with (new) extension
max_dim:max image size in pixel

Thank you!

You should probably quote only individual arguments, not the entire command. Try this:
Scale to max dimension,keep aspect ratio
convert "$original_file" -resize "$max_dim" "$new_file"
original_file:original file name with extension
new_file:new file name with (new) extension
max_dim:max image size in pixel

If that doesn’t work, it’s possible that the underscores in the variable names cause problems. You could try originalFile instead of original_file.

Both of your suggestion don't work. I got this error.
convert: invalid argument for option `-resize':  @ error/convert.c/ConvertImageCommand/2553.

The command works if I substitute the values and run it in the terminal.

It seems to work fine for me. Which values are you using?

Must be some problem in my environment. It works on another computer. Thank you for your help!

Alright, then I’ll close this issue – you’re welcome :)

But perhaps you want to create a pull request for this cheat? It sounds useful!

I am still learning to use git. I will share my cheats later.
Cheers!
On 8/11/16, Lucas Werkmeister<EMAIL_ADDRESS>wrote:

But perhaps you want to create a pull request for this cheat? It sounds
useful!
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/lucaswerkmeister/cheats/issues/9#issuecomment-239165494


training for several hours and no result in Standalone mode

Hi, I am trying to run TFoS as 'GetStarted_Standalone'.
But the training take several hours and no result.
The following are details -
1st.
I installed following softwares in my local
tensorflow (1.4.1)
tensorflow-tensorboard (0.4.0rc3)
tensorflowonspark (1.1.0)
Spark (2.2)
2nd.
run as "Convert the MNIST zip files using Spark".
after this step, images and labels are in HDFS.

3rd.
run as "Run distributed MNIST training (using feed_dict)"
Application is running in Spark.

But it take long time and no result.
And I don't find any error in the log, following are Logs in spark executors. Any advice? Thank you very much! (also, CPU is always 100% for a python process during training)
--------------------------log of executor 1 -----------------------------------
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/spark/jars/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
18/01/19 15:49:36 INFO executor.CoarseGrainedExecutorBackend: Started daemon with process name: 17855@liuhaitao-ubuntu
18/01/19 15:49:36 INFO util.SignalUtils: Registered signal handler for TERM
18/01/19 15:49:36 INFO util.SignalUtils: Registered signal handler for HUP
18/01/19 15:49:36 INFO util.SignalUtils: Registered signal handler for INT
18/01/19 15:49:37 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
18/01/19 15:49:37 WARN util.Utils: Your hostname, liuhaitao-ubuntu resolves to a loopback address: <IP_ADDRESS>; using <IP_ADDRESS> instead (on interface eno1)
18/01/19 15:49:37 WARN util.Utils: Set SPARK_LOCAL_IP if you need to bind to another address
18/01/19 15:49:37 INFO spark.SecurityManager: Changing view acls to: liuhaitao
18/01/19 15:49:37 INFO spark.SecurityManager: Changing modify acls to: liuhaitao
18/01/19 15:49:37 INFO spark.SecurityManager: Changing view acls groups to:
18/01/19 15:49:37 INFO spark.SecurityManager: Changing modify acls groups to:
18/01/19 15:49:37 INFO spark.SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(liuhaitao); groups with view permissions: Set(); users  with modify permissions: Set(liuhaitao); groups with modify permissions: Set()
18/01/19 15:49:37 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:32987 after 54 ms (0 ms spent in bootstraps)
18/01/19 15:49:37 INFO spark.SecurityManager: Changing view acls to: liuhaitao
18/01/19 15:49:37 INFO spark.SecurityManager: Changing modify acls to: liuhaitao
18/01/19 15:49:37 INFO spark.SecurityManager: Changing view acls groups to:
18/01/19 15:49:37 INFO spark.SecurityManager: Changing modify acls groups to:
18/01/19 15:49:37 INFO spark.SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(liuhaitao); groups with view permissions: Set(); users  with modify permissions: Set(liuhaitao); groups with modify permissions: Set()
18/01/19 15:49:37 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:32987 after 0 ms (0 ms spent in bootstraps)
18/01/19 15:49:37 INFO storage.DiskBlockManager: Created local directory at /tmp/spark-9b1417eb-93fe-44be-8bbd-74201a473031/executor-25cfa9d1-d76e-48dc-83c2-fa7a3bf8b298/blockmgr-65374019-4422-4e59-8282-9c6a7de03a60
18/01/19 15:49:37 INFO memory.MemoryStore: MemoryStore started with capacity 366.3 MB
18/01/19 15:49:37 INFO executor.CoarseGrainedExecutorBackend: Connecting to driver: spark://CoarseGrainedScheduler@<IP_ADDRESS>:32987
18/01/19 15:49:37 INFO worker.WorkerWatcher: Connecting to worker spark://Worker@<IP_ADDRESS>:46111
18/01/19 15:49:37 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:46111 after 3 ms (0 ms spent in bootstraps)
18/01/19 15:49:37 INFO worker.WorkerWatcher: Successfully connected to spark://Worker@<IP_ADDRESS>:46111
18/01/19 15:49:37 INFO executor.CoarseGrainedExecutorBackend: Successfully registered with driver
18/01/19 15:49:37 INFO executor.Executor: Starting executor ID 1 on host <IP_ADDRESS>
18/01/19 15:49:37 INFO util.Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 45588.
18/01/19 15:49:37 INFO netty.NettyBlockTransferService: Server created on <IP_ADDRESS>:45588
18/01/19 15:49:37 INFO storage.BlockManager: Using org.apache.spark.storage.RandomBlockReplicationPolicy for block replication policy
18/01/19 15:49:37 INFO storage.BlockManagerMaster: Registering BlockManager BlockManagerId(1, <IP_ADDRESS>, 45588, None)
18/01/19 15:49:37 INFO storage.BlockManagerMaster: Registered BlockManager BlockManagerId(1, <IP_ADDRESS>, 45588, None)
18/01/19 15:49:37 INFO storage.BlockManager: Initialized BlockManager: BlockManagerId(1, <IP_ADDRESS>, 45588, None)
18/01/19 15:49:37 INFO executor.CoarseGrainedExecutorBackend: Got assigned task 1
18/01/19 15:49:37 INFO executor.Executor: Running task 1.0 in stage 0.0 (TID 1)
18/01/19 15:49:37 INFO executor.Executor: Fetching spark://<IP_ADDRESS>:32987/files/mnist_spark.py with timestamp<PHONE_NUMBER>632
18/01/19 15:49:38 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:32987 after 3 ms (0 ms spent in bootstraps)
18/01/19 15:49:38 INFO util.Utils: Fetching spark://<IP_ADDRESS>:32987/files/mnist_spark.py to /tmp/spark-9b1417eb-93fe-44be-8bbd-74201a473031/executor-25cfa9d1-d76e-48dc-83c2-fa7a3bf8b298/spark-b1187622-73c1-49dd-a024-8aae39874e76/fetchFileTemp5456250545744258291.tmp
18/01/19 15:49:38 INFO util.Utils: Copying /tmp/spark-9b1417eb-93fe-44be-8bbd-74201a473031/executor-25cfa9d1-d76e-48dc-83c2-fa7a3bf8b298/spark-b1187622-73c1-49dd-a024-8aae39874e76/-17954637781516348172632_cache to /usr/local/spark/work/app-20180119154932-0000/1/./mnist_spark.py
18/01/19 15:49:38 INFO executor.Executor: Fetching spark://<IP_ADDRESS>:32987/files/mnist_dist.py with timestamp<PHONE_NUMBER>641
18/01/19 15:49:38 INFO util.Utils: Fetching spark://<IP_ADDRESS>:32987/files/mnist_dist.py to /tmp/spark-9b1417eb-93fe-44be-8bbd-74201a473031/executor-25cfa9d1-d76e-48dc-83c2-fa7a3bf8b298/spark-b1187622-73c1-49dd-a024-8aae39874e76/fetchFileTemp9199521081781289487.tmp
18/01/19 15:49:38 INFO util.Utils: Copying /tmp/spark-9b1417eb-93fe-44be-8bbd-74201a473031/executor-25cfa9d1-d76e-48dc-83c2-fa7a3bf8b298/spark-b1187622-73c1-49dd-a024-8aae39874e76/7161241411516348172641_cache to /usr/local/spark/work/app-20180119154932-0000/1/./mnist_dist.py
18/01/19 15:49:38 INFO broadcast.TorrentBroadcast: Started reading broadcast variable 2
18/01/19 15:49:38 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:39646 after 2 ms (0 ms spent in bootstraps)
18/01/19 15:49:38 INFO memory.MemoryStore: Block broadcast_2_piece0 stored as bytes in memory (estimated size 8.0 KB, free 366.3 MB)
18/01/19 15:49:38 INFO broadcast.TorrentBroadcast: Reading broadcast variable 2 took 98 ms
18/01/19 15:49:38 INFO memory.MemoryStore: Block broadcast_2 stored as values in memory (estimated size 11.1 KB, free 366.3 MB)
2018-01-19 15:49:38,590 INFO (MainThread-17931) connected to server at ('<IP_ADDRESS>', 46357)
2018-01-19 15:49:38,591 INFO (MainThread-17931) TFSparkNode.reserve: {'authkey': ':\xb7U8\x96v@I\xa3w\xfd\x8c4\x0bU\x96', 'worker_num': 1, 'host': '<IP_ADDRESS>', 'tb_port': 0, 'addr': '/tmp/pymp-u1d58e/listener-akfJ0P', 'ppid': 17925, 'task_index': 0, 'job_name': 'worker', 'tb_pid': 0, 'port': 46556}
2018-01-19 15:49:39,595 INFO (MainThread-17931) node: {'addr': ('<IP_ADDRESS>', 42817), 'task_index': 0, 'job_name': 'ps', 'authkey': '\x90\xcc\x85\xfb\xc9jM\xa0\x9a\xf79\x16\xa0\x02\xc1\xb0', 'worker_num': 0, 'host': '<IP_ADDRESS>', 'ppid': 17874, 'port': 43598, 'tb_pid': 0, 'tb_port': 0}
2018-01-19 15:49:39,596 INFO (MainThread-17931) node: {'addr': '/tmp/pymp-u1d58e/listener-akfJ0P', 'task_index': 0, 'job_name': 'worker', 'authkey': ':\xb7U8\x96v@I\xa3w\xfd\x8c4\x0bU\x96', 'worker_num': 1, 'host': '<IP_ADDRESS>', 'ppid': 17925, 'port': 46556, 'tb_pid': 0, 'tb_port': 0}
2018-01-19 15:49:39,600 INFO (MainThread-17931) Starting TensorFlow worker:0 on cluster node 1 on background process
18/01/19 15:49:39 INFO python.PythonRunner: Times: total = 1278, boot = 218, init = 36, finish = 1024
18/01/19 15:49:39 INFO executor.Executor: Finished task 1.0 in stage 0.0 (TID 1). 1757 bytes result sent to driver
18/01/19 15:49:39 INFO executor.CoarseGrainedExecutorBackend: Got assigned task 2
18/01/19 15:49:39 INFO executor.Executor: Running task 0.0 in stage 1.0 (TID 2)
18/01/19 15:49:39 INFO broadcast.TorrentBroadcast: Started reading broadcast variable 3
18/01/19 15:49:39 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:38567 after 0 ms (0 ms spent in bootstraps)
18/01/19 15:49:39 INFO memory.MemoryStore: Block broadcast_3_piece0 stored as bytes in memory (estimated size 6.9 KB, free 366.3 MB)
18/01/19 15:49:39 INFO broadcast.TorrentBroadcast: Reading broadcast variable 3 took 17 ms
18/01/19 15:49:39 INFO memory.MemoryStore: Block broadcast_3 stored as values in memory (estimated size 12.7 KB, free 366.3 MB)
18/01/19 15:49:39 INFO rdd.HadoopRDD: Input split: hdfs://localhost:9000/user/liuhaitao/examples/mnist/csv/train/images/part-00000:0+9338236
18/01/19 15:49:39 INFO broadcast.TorrentBroadcast: Started reading broadcast variable 0
18/01/19 15:49:39 INFO memory.MemoryStore: Block broadcast_0_piece0 stored as bytes in memory (estimated size 23.1 KB, free 366.2 MB)
18/01/19 15:49:39 INFO broadcast.TorrentBroadcast: Reading broadcast variable 0 took 13 ms
18/01/19 15:49:39 INFO memory.MemoryStore: Block broadcast_0 stored as values in memory (estimated size 324.4 KB, free 365.9 MB)
2018-01-19 15:49:40,261 INFO (MainThread-17944) 1: ======== worker:0 ========
2018-01-19 15:49:40,262 INFO (MainThread-17944) 1: Cluster spec: {'ps': ['<IP_ADDRESS>:43598'], 'worker': ['<IP_ADDRESS>:46556']}
2018-01-19 15:49:40,262 INFO (MainThread-17944) 1: Using CPU
2018-01-19 15:49:40.262664: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
E0119 15:49:40.263087850   17944 ev_epoll1_linux.c:1051]     grpc epoll fd: 12
2018-01-19 15:49:40.266899: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job ps -> {0 -> <IP_ADDRESS>:43598}
2018-01-19 15:49:40.266996: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job worker -> {0 -> localhost:46556}
2018-01-19 15:49:40.267411: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:324] Started server with target: grpc://localhost:46556
tensorflow model path: hdfs://localhost:9000/user/liuhaitao/mnist_model
18/01/19 15:49:41 INFO rdd.HadoopRDD: Input split: hdfs://localhost:9000/user/liuhaitao/examples/mnist/csv/train/labels/part-00000:0+204800
18/01/19 15:49:41 INFO broadcast.TorrentBroadcast: Started reading broadcast variable 1
18/01/19 15:49:41 INFO memory.MemoryStore: Block broadcast_1_piece0 stored as bytes in memory (estimated size 23.1 KB, free 365.9 MB)
18/01/19 15:49:41 INFO broadcast.TorrentBroadcast: Reading broadcast variable 1 took 18 ms
18/01/19 15:49:41 INFO memory.MemoryStore: Block broadcast_1 stored as values in memory (estimated size 324.4 KB, free 365.6 MB)
2018-01-19 15:49:41,421 INFO (MainThread-17983) Connected to TFSparkNode.mgr on <IP_ADDRESS>, ppid=17925, state='running'
2018-01-19 15:49:41,426 INFO (MainThread-17983) mgr.state='running'
2018-01-19 15:49:41,426 INFO (MainThread-17983) Feeding partition <itertools.chain object at 0x7fe1cbbcaf10> into input queue <multiprocessing.queues.JoinableQueue object at 0x7fe1be2c93d0>
18/01/19 15:49:43 INFO python.PythonRunner: Times: total = 2552, boot = -1245, init = 1440, finish = 2357
18/01/19 15:49:43 INFO python.PythonRunner: Times: total = 125, boot = 2, init = 17, finish = 106
--------------------------log of executor 2 -----------------------------------
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/spark/jars/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
18/01/19 15:49:34 INFO executor.CoarseGrainedExecutorBackend: Started daemon with process name: 17788@liuhaitao-ubuntu
18/01/19 15:49:34 INFO util.SignalUtils: Registered signal handler for TERM
18/01/19 15:49:34 INFO util.SignalUtils: Registered signal handler for HUP
18/01/19 15:49:34 INFO util.SignalUtils: Registered signal handler for INT
18/01/19 15:49:34 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
18/01/19 15:49:34 WARN util.Utils: Your hostname, liuhaitao-ubuntu resolves to a loopback address: <IP_ADDRESS>; using <IP_ADDRESS> instead (on interface eno1)
18/01/19 15:49:34 WARN util.Utils: Set SPARK_LOCAL_IP if you need to bind to another address
18/01/19 15:49:34 INFO spark.SecurityManager: Changing view acls to: liuhaitao
18/01/19 15:49:34 INFO spark.SecurityManager: Changing modify acls to: liuhaitao
18/01/19 15:49:34 INFO spark.SecurityManager: Changing view acls groups to:
18/01/19 15:49:34 INFO spark.SecurityManager: Changing modify acls groups to:
18/01/19 15:49:34 INFO spark.SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(liuhaitao); groups with view permissions: Set(); users  with modify permissions: Set(liuhaitao); groups with modify permissions: Set()
18/01/19 15:49:35 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:32987 after 91 ms (0 ms spent in bootstraps)
18/01/19 15:49:35 INFO spark.SecurityManager: Changing view acls to: liuhaitao
18/01/19 15:49:35 INFO spark.SecurityManager: Changing modify acls to: liuhaitao
18/01/19 15:49:35 INFO spark.SecurityManager: Changing view acls groups to:
18/01/19 15:49:35 INFO spark.SecurityManager: Changing modify acls groups to:
18/01/19 15:49:35 INFO spark.SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(liuhaitao); groups with view permissions: Set(); users  with modify permissions: Set(liuhaitao); groups with modify permissions: Set()
18/01/19 15:49:35 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:32987 after 0 ms (0 ms spent in bootstraps)
18/01/19 15:49:35 INFO storage.DiskBlockManager: Created local directory at /tmp/spark-882bf509-3bf2-4f82-be27-fe2d6a6b3c55/executor-de7643eb-6c0f-4782-ac1d-c9a9d7432e46/blockmgr-2de17c59-5c9b-47c7-b212-63c38443a135
18/01/19 15:49:35 INFO memory.MemoryStore: MemoryStore started with capacity 366.3 MB
18/01/19 15:49:35 INFO executor.CoarseGrainedExecutorBackend: Connecting to driver: spark://CoarseGrainedScheduler@<IP_ADDRESS>:32987
18/01/19 15:49:35 INFO worker.WorkerWatcher: Connecting to worker spark://Worker@<IP_ADDRESS>:39813
18/01/19 15:49:35 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:39813 after 1 ms (0 ms spent in bootstraps)
18/01/19 15:49:35 INFO worker.WorkerWatcher: Successfully connected to spark://Worker@<IP_ADDRESS>:39813
18/01/19 15:49:35 INFO executor.CoarseGrainedExecutorBackend: Successfully registered with driver
18/01/19 15:49:35 INFO executor.Executor: Starting executor ID 0 on host <IP_ADDRESS>
18/01/19 15:49:35 INFO util.Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 39646.
18/01/19 15:49:35 INFO netty.NettyBlockTransferService: Server created on <IP_ADDRESS>:39646
18/01/19 15:49:35 INFO storage.BlockManager: Using org.apache.spark.storage.RandomBlockReplicationPolicy for block replication policy
18/01/19 15:49:35 INFO storage.BlockManagerMaster: Registering BlockManager BlockManagerId(0, <IP_ADDRESS>, 39646, None)
18/01/19 15:49:35 INFO storage.BlockManagerMaster: Registered BlockManager BlockManagerId(0, <IP_ADDRESS>, 39646, None)
18/01/19 15:49:35 INFO storage.BlockManager: Initialized BlockManager: BlockManagerId(0, <IP_ADDRESS>, 39646, None)
18/01/19 15:49:35 INFO executor.CoarseGrainedExecutorBackend: Got assigned task 0
18/01/19 15:49:35 INFO executor.Executor: Running task 0.0 in stage 0.0 (TID 0)
18/01/19 15:49:35 INFO executor.Executor: Fetching spark://<IP_ADDRESS>:32987/files/mnist_spark.py with timestamp<PHONE_NUMBER>632
18/01/19 15:49:35 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:32987 after 2 ms (0 ms spent in bootstraps)
18/01/19 15:49:35 INFO util.Utils: Fetching spark://<IP_ADDRESS>:32987/files/mnist_spark.py to /tmp/spark-882bf509-3bf2-4f82-be27-fe2d6a6b3c55/executor-de7643eb-6c0f-4782-ac1d-c9a9d7432e46/spark-f0bb9fe5-8a5e-478d-9084-39519cb45a70/fetchFileTemp84879036430241239.tmp
18/01/19 15:49:35 INFO util.Utils: Copying /tmp/spark-882bf509-3bf2-4f82-be27-fe2d6a6b3c55/executor-de7643eb-6c0f-4782-ac1d-c9a9d7432e46/spark-f0bb9fe5-8a5e-478d-9084-39519cb45a70/-17954637781516348172632_cache to /usr/local/spark/work/app-20180119154932-0000/0/./mnist_spark.py
18/01/19 15:49:35 INFO executor.Executor: Fetching spark://<IP_ADDRESS>:32987/files/mnist_dist.py with timestamp<PHONE_NUMBER>641
18/01/19 15:49:35 INFO util.Utils: Fetching spark://<IP_ADDRESS>:32987/files/mnist_dist.py to /tmp/spark-882bf509-3bf2-4f82-be27-fe2d6a6b3c55/executor-de7643eb-6c0f-4782-ac1d-c9a9d7432e46/spark-f0bb9fe5-8a5e-478d-9084-39519cb45a70/fetchFileTemp2023811147043020157.tmp
18/01/19 15:49:35 INFO util.Utils: Copying /tmp/spark-882bf509-3bf2-4f82-be27-fe2d6a6b3c55/executor-de7643eb-6c0f-4782-ac1d-c9a9d7432e46/spark-f0bb9fe5-8a5e-478d-9084-39519cb45a70/7161241411516348172641_cache to /usr/local/spark/work/app-20180119154932-0000/0/./mnist_dist.py
18/01/19 15:49:35 INFO broadcast.TorrentBroadcast: Started reading broadcast variable 2
18/01/19 15:49:35 INFO client.TransportClientFactory: Successfully created connection to /<IP_ADDRESS>:38567 after 2 ms (0 ms spent in bootstraps)
18/01/19 15:49:35 INFO memory.MemoryStore: Block broadcast_2_piece0 stored as bytes in memory (estimated size 8.0 KB, free 366.3 MB)
18/01/19 15:49:36 INFO broadcast.TorrentBroadcast: Reading broadcast variable 2 took 150 ms
18/01/19 15:49:36 INFO memory.MemoryStore: Block broadcast_2 stored as values in memory (estimated size 11.1 KB, free 366.3 MB)
2018-01-19 15:49:36,724 INFO (MainThread-17880) connected to server at ('<IP_ADDRESS>', 46357)
2018-01-19 15:49:36,725 INFO (MainThread-17880) TFSparkNode.reserve: {'authkey': '\x90\xcc\x85\xfb\xc9jM\xa0\x9a\xf79\x16\xa0\x02\xc1\xb0', 'worker_num': 0, 'host': '<IP_ADDRESS>', 'tb_port': 0, 'addr': ('<IP_ADDRESS>', 42817), 'ppid': 17874, 'task_index': 0, 'job_name': 'ps', 'tb_pid': 0, 'port': 43598}
2018-01-19 15:49:39,729 INFO (MainThread-17880) node: {'addr': ('<IP_ADDRESS>', 42817), 'task_index': 0, 'job_name': 'ps', 'authkey': '\x90\xcc\x85\xfb\xc9jM\xa0\x9a\xf79\x16\xa0\x02\xc1\xb0', 'worker_num': 0, 'host': '<IP_ADDRESS>', 'ppid': 17874, 'port': 43598, 'tb_pid': 0, 'tb_port': 0}
2018-01-19 15:49:39,729 INFO (MainThread-17880) node: {'addr': '/tmp/pymp-u1d58e/listener-akfJ0P', 'task_index': 0, 'job_name': 'worker', 'authkey': ':\xb7U8\x96v@I\xa3w\xfd\x8c4\x0bU\x96', 'worker_num': 1, 'host': '<IP_ADDRESS>', 'ppid': 17925, 'port': 46556, 'tb_pid': 0, 'tb_port': 0}
2018-01-19 15:49:39,734 INFO (MainThread-17880) Starting TensorFlow ps:0 on cluster node 0 on background process
2018-01-19 15:49:45,357 INFO (MainThread-17949) 0: ======== ps:0 ========
2018-01-19 15:49:45,357 INFO (MainThread-17949) 0: Cluster spec: {'ps': ['<IP_ADDRESS>:43598'], 'worker': ['<IP_ADDRESS>:46556']}
2018-01-19 15:49:45,357 INFO (MainThread-17949) 0: Using CPU
2018-01-19 15:49:45.357942: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
E0119 15:49:45.358279783   17949 ev_epoll1_linux.c:1051]     grpc epoll fd: 10
2018-01-19 15:49:45.361346: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job ps -> {0 -> localhost:43598}
2018-01-19 15:49:45.361385: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job worker -> {0 -> <IP_ADDRESS>:46556}
2018-01-19 15:49:45.361749: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:324] Started server with target: grpc://localhost:43598

Closing due to inactivity.  Feel free to re-open if this is still an issue.


Fix Mac OS CI - usernet unable to resolve IP for SSH forwarding

What is the problem that this fixes or functionality that this introduces? Does it fix any open issues?
Action link
Give a brief summary of what the PR does, explaining any non-trivial design decisions
Enabled --network-address and used the development version of Colima
Other references
docker not listening on port on OSX - colima
https://github.com/abiosoft/colima/issues/458#issuecomment-2171006045

Thanks, I hope this can completely resolve the issue❤

hope

Why is hope a dangerous thing?🤣

@SmartManoj I think colima still needs more tweaking, even with this patch.
Maybe we have to forcefully first uninstall colima and install it fresh?
It already waits for 3 minutes for the ssh socket file and still fails, so I doubt it is a timeout issue itself.

Maybe we have to forcefully first uninstall colima and install it fresh?

GitHub provides Ubuntu Linux, Microsoft Windows, and macOS runners to run your workflows; each workflow run executes in a fresh, newly-provisioned virtual machine.

Please take a look closer, from a current, successful workflow:
https://github.com/OpenDevin/OpenDevin/actions/runs/9610927108/job/26508440819

Maybe we have to forcefully first uninstall colima and install it fresh?

That's call reinstall. Not upgrading.
https://github.com/actions/runner-images/issues/6216#issuecomment-1274318785

Who said upgrading?

Edited.


add more help texinfo warnings: maybe tests should fail?

Suppose the texinfo parsing has a warning, like this:
/tmp/octave-help-7iCXAP:167: `@end' expected `defmethod', but saw `deftypefn'
/tmp/octave-help-7iCXAP:167: unmatched `@end deftypefn'
/tmp/octave-help-btzVnM:136: `@end' expected `deftypemethod', but saw `defmethod'
/tmp/octave-help-btzVnM:136: unmatched `@end defmethod'
/tmp/octave-help-OjxhNo:142: @bye seen before @end deftypemethod

We see that output while searching for tests.  If its a class with say 100 methods, this gives us no idea which file the error is in.  The tmp file does not persist.
Check if there is some return flag get can check for to indicate a warning has been raised.
If no easy way to see this, its probably an argument in favour of parsing an executing class method tests per file rather than all-at-once per class.

This is tricky.  I looked at the __makeinfo__ source code; it just uses system to call makeinfo.  But system loses the stderr.
We could call makeinfo ourselves (duplicate the work in __makeinfo__) or we could work on making upstream __makeinfo__ a bit smarter.  I'm not hugely motivated to do either at the moment so I'll mark this "upstream" and ignore it for now...

duplicate of #166.


How to reload options?

I want to programmatically reload the options when the underlying data changed. Is there a way to reload the options? Thanks.

See https://github.com/brianreavis/selectize.js/blob/master/docs/api.md (addOption, accepts an array).

Thanks @PhiLhoSoft, but how can I invoke addOption? There seems to be not any angular-selectize variable in my controller.

Search onInitialize on the home page of this project, read the comment.

Thanks @PhiLhoSoft. So if I want to use it in another function, should I hook the variable selectize to another variable outside the onInitialize, like so?
var mySelectize =
$scope.myConfig = {
  // ...
  onInitialize: function(selectize){
    // receives the selectize object as an argument
    mySelectize = selectize;
  }
};

Is it correct? Thanks.

Yes, that's how we do it. But all access to the Selectize object is done in a service, to isolate usage of a Dom-dependent component.

Got thank you so much @PhiLhoSoft.


More custom currency settings

I hoped to finish everything for GNOME in one day, but I underestimated the amount of work required to implement it 😄 Still, here's the draft.
This PR adds 3 new settings to custom currency:

Decimal separator: ., , or custom
Group separator: ., ,, ', none or custom
Decimal digits number: 2-6 or unlimited (closes #318)

TODO:

[x] Fix database to accept empty group separator
I didn't think about it when writing database related code, group separator is handled the same way as decimal separator (that can't be empty). Nick, I will be grateful if you can work on this, because I'm afraid to do it wrong, this stuff is a bit complicated to me 😅
[ ] Use Gtk.Stack instead of expander row for custom currency settings
Similar to what we have with password settings in WinUI. The dialog on the screenshot above doesn't actually fit on my screen (1366x768).
[x] Save settings (currently only validation is implemented)
[x] WinUI port
[ ] Update docs

Some notes:

Max length for custom separators is set to 2 to allow emojis
"Unlimited" decimal digits are actually 99, the biggest acceptable number
Decimal and group separator can't be the same. But I'm not sure how to mark it in the dialog in a short and nice way. Currently rows get error CSS class, but labels are not changed.
I created separate strings for "Other" separators. The reason is that we can't be sure that in all languages this word will be the same for both separators
Explanation
      For example, in Russian words have grammatical gender. Depending on it, "other" can be translated as "другой", "другая" or "другие". For separators it's not the case ("другой" for both), but I can imagine that maybe not for this particular reason but because of some other rules some languages will require to translate it differently for each separator.

I believe I can change the column in SQL to accept empty strings but I have to make sure it doesn't break existing files...

If accepting empty string is problematic, we can save literally "empty" string in database. When this string is detected, empty string is assigned in metadata instead of the actual value.

I will work on the rest tomorrow, but currently settings are saved and used!

Thank you :) rest up!!

Ok, custom separators are implemented in WinUI. But I would like to tweak the design similar to how there is a separate password page in WinUI and clean up some of the backend.
I'd like to get this done tonight and then release beta 2 with this feature and all the fixes for pdf, qif, and ofx.

Here's the new currency card design similar to that of the password card :)

@fsobolev All that's left is for you to make whatever design tweaks needed on GNOME and update the docs and we are good to go!

Also implemented all the code cleanups I wanted too :)

I have an idea for a smarter decimal separator insert. But idk if it's possible to conveniently do the same in WinUI, so I don't commit changes for now, because if it can't work the same on both platforms, then I think it's not worth it.
In GNOME instead of:
row.SetText(row.GetText() + _controller.CultureForNumberString.NumberFormat.CurrencyDecimalSeparator);
row.SetPosition(row.GetText().Length);

do this:
if (!row.GetText().Contains(_controller.CultureForNumberString.NumberFormat.CurrencyDecimalSeparator))
{
    var position = row.GetPosition();
    row.SetText(row.GetText().Insert(position, _controller.CultureForNumberString.NumberFormat.CurrencyDecimalSeparator));
    row.SetPosition(position + Math.Min(_controller.CultureForNumberString.NumberFormat.CurrencyDecimalSeparator.Length, 2));
}

So the separator will be inserted in cursor position, not always in the end of entry. if (!row.GetText().Contains... and Math.Min(... are required to make it correctly work with emojis otherwise position will not be calculated properly if the separator is 2-character emoji. And anyway it doesn't make sense to insert more than 1 decimal separator.

This will be possible to achieve on WinUI. Go ahead and commit it and I will port it over before merge :)

WinUI implementation done :)

In latest commit I added more currency checks. Now it's not possible to set a number as currency symbol and also symbol can't contains one of separators. Not only it makes sense, but it prevents breaking amount formatting:
        if (!showCurrencySymbol)
        {
            result = result.Remove(result.IndexOf(culture.NumberFormat.CurrencySymbol), culture.NumberFormat.CurrencySymbol.Length);
        }

If because of system locale the culture sets currency symbol to be show on right, and if symbol would be a number or one of separators, this will remove the first matching number/separator instead of currency symbol.
I also added changes to WinUI but didn't test it.

From first look, WinUI looks good to me. Will run the code when I get on my pc.

Ok, it all looks good!
What's left to do before merge?

I'm working on changing the UI... Currently stuck with making stack work properly, but don't worry, I will finish it today.
Then the only thing that is left is documentation but this can be done later.

I'm working on changing the UI... Currently stuck with making stack work properly, but don't worry, I will finish it today.

Thank you :)

Then the only thing that is left is documentation but this can be done later

As long as we do it before release that's fine. Beta will be OK without it.

Okay, now account settings dialog is beautiful and very similar to the one in WinUI.

Main
Currency
Password

What you can see on screenshots:

If something on currency or password page is invalid, a corresponding row on main page gets error class telling a user that pressing "back" on other pages doesn't reset values and errors should be fixed.
Currency separators entries are now smaller and don't have placeholders, but they get focused immediately after selecting "Other" in drop down so it's clear that it's an entry and not an empty button or something else.
Since password changing functionality is not on main page anymore, I decided that it would be better to mark matching password errors similar to WinUI.

Tbh I don't like the empty space next to "back" buttons, but I don't want to completely change showing errors to be everywhere like for password matching... Let me try hiding the dialog title when we're not on main page.

For the main page...instead of it saying "Use Custom Currency" could it just say "Currency" like WinUI, since you have to turn on the switch to use custom currency otherwise it just shows the reported system currency.

Tbh I don't like the empty space next to "back" buttons, but I don't want to completely change showing errors to be everywhere like for password matching... Let me try hiding the dialog title when we're not on main page.

TBH I think it likes fine haha but work your magic if you'd like :)

Hmmm, idk... Probably better not do this

since you have to turn on the switch to use custom currency otherwise it just shows the reported system currency.

When the switch is off the preference group containing all settings gets insensitive but not hidden, I think it's better to avoid even more dialog size changing.

since you have to turn on the switch to use custom currency otherwise it just shows the reported system currency.

When the switch is off the preference group containing all settings gets insensitive but not hidden, I think it's better to avoid even more dialog size changing.

I was justifying for changing the label on the main page from "Use Custom Currency" --> "Currency" so all good

Looks good to me! Will merge and release beta 2 when I get home in about an gour from work :)

https://github.com/nlogozzo/NickvisionMoney/releases/tag/2023.3.0-beta2


StaticWrapper used by StaticDatePicker is not customizable

[X] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡
The StaticDatePicker wraps the DatePicker with a StaticWrapper.  The styles that the StaticWrapper creates are not customizable.  The biggest issue is the backgroundColor.  If you add borders and background colors to MuiCalendarPicker-root it looks weird.
const StaticWrapperRoot = styled('div', { skipSx: true })(({ theme }) => ({
  overflow: 'hidden',
  minWidth: DIALOG_WIDTH,
  display: 'flex',
  flexDirection: 'column',
  backgroundColor: theme.palette.background.paper,
}));

I can see three ways to address this:

Remove the background color, the picker should be handling this.  It looks like this is the only wrapper in the DatePicker family that adds one.
Give the StaticWrapper a name and slot like MuiStaticDatePickerWrapper-root so that it can be customized.
Add an optional wrapper prop to the StaticDatePicker, default to StaticWrapperRoot

Examples 🌈

Motivation 🔦

Most of the date pickers we use on our website are static and not linked to a visible input.  So the StaticDatePicker is our first choice.  We provide custom borders and box shadows to the Picker.  This worked fine under v4.  With the wrapper injecting non-layout css that isn't customizable, it becomes impossible to match our previous UI without adding one-off
> div { background-color: transparent }

to our components above the date picker.  It feels hacky.

I see the problem, we need to revisit how the pickers should be customized, there are bunch of issues currently. I propose adding a name and a custom class for it so that it can be targetable. Would you like to work on this?

I can take a crack at it.


context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Hello,
I am having trouble making this action work. After enabling turbo trace logs, I saw these errors:
2023-01-16T07:33:00.8209123Z 2023-01-16T07:33:00.820Z [ERROR] turbo: request failed: error="Get \"http://<IP_ADDRESS>:9080/v8/artifacts/48bf385e2de897f2?slug=magna\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" method=GET url=http://<IP_ADDRESS>:9080/v8/artifacts/48bf385e2de897f2?slug=magna

Any clue what the issue might be?

Hi,
No I'm not familiar with this error... Maybe the local server didn't started? can you check its logs?

The actions logs this:
Run felixmosh/turborepo-gh-artifacts@v1
TURBO_LOCAL_SERVER_PID: 2486
Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-[11](https://github.com/magna-eng/web/actions/runs/3928155787/jobs/6715472911#step:6:12)-github-actions-deprecating-save-state-and-set-output-commands/

Then the post action logs look like this:
Post job cleanup.
Found server pid: [2](https://github.com/magna-eng/web/actions/runs/3928155787/jobs/6715472911#step:11:2)486
Killing server pid: 2486
There is nothing to upload.
Server logs:
Cache dir: /home/runner/work/_temp/turbo-cache
Local Turbo server is listening at http://12[7](https://github.com/magna-eng/web/actions/runs/3928155787/jobs/6715472911#step:11:7).0.0.1:9080

From the error looks like your local not started, and Turborepo fails on timeout, is you setup similar to this example?
https://github.com/felixmosh/turborepo-gh-artifacts-example

Yes, I had a look at that example. Here is part of the workflow:
      - name: TurboRepo local server
        uses: felixmosh/turborepo-gh-artifacts@v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          server-token: ${{ env.TURBO_TOKEN }}

      - name: Build & Test
        run: npx turbo run build test --filter investor --api="http://<IP_ADDRESS>:9080" --token="${{ env.TURBO_TOKEN }}" --team=magna -vvv

Try to run it without npx (as a script)...
You can try to pass the server params as Env vars. (checkout the readme)

I actually started with env vars, but switched to arguments to see if it would help with the issue.
Unfortunately not different using yarn build directly.
Is there a way to add more verbosity to the action to understand what is going wrong? It seems to me the server is running as it yields a PID

There are logs on each request...
https://github.com/felixmosh/turborepo-gh-artifacts/blob/master/src/turboServer.ts#L25
From your logs (they should apear in the post action part), looks like there are no requests...
What version of Turborepo / node are u using?

node: v16.19.0
npm: 8.19.3
yarn: 1.22.19
turbo: 1.6.3

No luck with turbo 1.7.0 as well. Btw, I see that there are a few newer releases of the action that are not shown in the marketplace. Perhaps there is a problem with it?

Let's try to debug it locally,

Clone this repo
Enter the cloned folder
env "INPUT_REPO-TOKEN=test" "INPUT_SERVER-TOKEN=test" node dist/turboServer/index.js

This should start the proxy server... REPO-TOKEN suppose to be GITHUB_TOKEN, if you not provide a proper one it will mimic "always cache hit".
Enter to your projects build, and run the turborepo command with
yarn build --api="http://<IP_ADDRESS>:9080" --token="test" --team=magna

Let's see if it connects to the server + if it saves to the artifacts to local cache folder.

No luck with turbo 1.7.0 as well. Btw, I see that there are a few newer releases of the action that are not shown in the marketplace. Perhaps there is a problem with it?

Wow, this is weird, I've missed it, can you check with v2 tag?

Is upgrading to v2 solved your issue?

Not really, but I am double checking if there is any difference

For some reason turbo stopped showing me verbose logging, but there seems to be no big difference. The warning about the action using save-state is gone, but the output seems similar. Should I do anything for the cache dir? Perhaps tell turbo to use that dir for caching?
Post job cleanup.
Found server pid: [2](https://github.com/magna-eng/web/actions/runs/3936673484/jobs/6733417894#step:11:2)501
Killing server pid: 2501
There is nothing to upload.
Server logs:
Cache dir: /home/runner/work/_temp/turbo-cache
Local Turbo server is listening at http://12[7](https://github.com/magna-eng/web/actions/runs/3936673484/jobs/6733417894#step:11:7).0.0.1:9080

No, it is using a temp dir.
Can you try the above explanation regarding local testing it?

Sorry, I have missed that comment.
It still yields no logs and fails with the same error:
cache miss, executing c0e1aec919923516
2023-01-17T18:30:45.751+0200 [ERROR] turbo: request failed: error="Get \"http://<IP_ADDRESS>:9080/v8/artifacts/5cc2cd831c72e046?slug=magna\": dial tcp <IP_ADDRESS>:9080: i/o timeout (Client.Timeout exceeded while awaiting headers)" method=GET url=http://<IP_ADDRESS>:9080/v8/artifacts/5cc2cd831c72e046?slug=magna

And then all of a sudden it did work after re-running the server and not changing anything. Still not working in GH actions though. I am thinking there might be an issue on the first run in a clean environment..

Locally without remote cache it's working. I haven't tested on github actions.
Here is my turbo config:
{
  "$schema": "https://turbo.build/schema.json",
  "pipeline": {
    "build": {
      "inputs": ["src/**/*.tsx", "src/**/*.ts"],
      "outputs": [".next/**", "dist/**"]
    },
    "test": {
      "dependsOn": ["build"],
      "inputs": ["src/**/*.tsx", "src/**/*.ts"],
      "outputs": []
    },
    "deploy": {
      "dependsOn": ["build"],
      "inputs": ["src/**/*.tsx", "src/**/*.ts"],
      "outputs": []
    }
  }
}


Remove Unneeded Private Key definition

Change description

Private key is no longer passed via environment, so causes an error on deploy
However, private key is not even needed in this service

+ref: BAU-3317
+semver: minor

[ N/A ] Unit tests and other appropriate tests added or updated
[ N/A ] README and other documentation has been updated / added (if needed)
[ X ] Commit messages are meaningful and follow good commit message guidelines (e.g. "FS-XXXX: Add margin to nav items preventing overlapping of logo")


Smart quotes in the legal disclaimers

Description
There are smart quotes at several spots in the legal disclaimers. Here is one example but all examples can be found by searching the repo:
https://github.com/quantumblacklabs/kedro/blob/d3218bd89ce8d1148b1f79dfe589065f47037be6/kedro/template/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/__init__.py#L17
Context
I discovered this while building the Sphinx docs for the Hello World example and getting a "Non-ASCII character" error.

Thanks for raising this @wdearden! We're going to look into this one for you. We'll work on reproducing the error.

We've managed to resolve this issue in the latest release of Kedro. Check out Kedro 0.14.3, this PR and let us know your thoughts. Thank you once again for raising this bug @wdearden! 🚀


Enemy Spotted challenge could do with a hint on the stage where the Broken Drone is located

"Repair the Broken Spotter Drone in a damp cave using the Fuel Array"

Done.


Access token usage

in hybrid auth the following was used to not use a global (bot) config, but the own users permissions to access github (and thus their own rate limit):
        $store = $this->request->getSession()->read('HA::STORE');
        Configure::write('Release.webBot', true);
        if ($store && !empty($store['hauth_session.github.token.access_token'])) {
            preg_match('/"(.+)"/', $store['hauth_session.github.token.access_token'], $matches);
            if ($matches) {
                $token = $matches[1];
                Configure::write('Release.token', $token);
                Configure::write('Release.webBot', false);
            }
        }

With social auth I don't think there is such a store anymore
So I tried
        /** @var \SocialConnect\OAuth2\AccessToken|null $token */
        $token = $this->request->getSession()->read('Auth.User.social_profile.access_token');
        Configure::write('Release.webBot', true);
        if ($token && $token->getToken()) {
            Configure::write('Release.token', $token->getToken());
            Configure::write('Release.webBot', false);
        }

But that does not work.

For the default config the user record would be under Auth key, so the session path you need to check is Auth.social_profile.access_token.
I see the the readme and docblock incorrectly mentions the default key as Auth.User. I must have missed updating docs when the code was updated to match the default key used by authentication plugin.

Well, the thing is that it is there, the token exists under also the user nesting.
Otherwise it wouldn't go into the condition to set it to the config, and the webpage then breaking with a not found issue.
I also checked the content, and it contains a real ascii char, e.g. ce129dc60b2531690efb203cb7ea507f4666fc91
But it just doesn't work anymore as the old hybrithauth one did.
Is it possible that there is a scenario where the session exceeds the token lifetime?
Even though this is happening already very early now. So quite unlikely as well.

The key that you mentions is not filled.
But there is a 'oauth2_state' => '9e4bf34de22890f79cc325275ea1cbax'
directly on root level.

Is it possible that a login with a 2nd device would invalidate the first token in session in the other device/browser?
That would explain it.
This behavior wasn't part of HybridAuth afaik
It now seems to have a different token in social_profiles table in DB for the 2nd browser than is in session still.

I am not exactly sure how Github (or other Oauth2 providers) deal with the tokens. These are most likely short lived tokens so not sure for how long they are valid or whether logging in through another devices invalidates a previous token.

What error do you get when trying to use the token? That might provide some info. Here's the list of possible errors: https://docs.github.com/en/free-pro-team@latest/developers/apps/authorizing-oauth-apps#error-codes-for-the-device-flow

I added a ?token=own to toggle the usage of own vs bot token usage (to avoid rate limit we want to have each dev use their own through their account if possible).
And it seems that the token doesn't work for private repos anymore.
Now trying to fetch those it fails.
So my guess is that permissions changed on what one can do with this token given.
'scope' => [
            'user:email',
        ],
        'options' => [
            'identity.fields' => [
                'email',
            ],
            'fetch_emails' => true,
        ],

Is pretty much the same as it was before afaik.

Yes it could an issue with scope. Since the token was generated only for user:email scope, it might not allow accessing other API endpoints. So you'll have to included additional scopes you need.

Whats the key difference here from hybrid to social?
That it now seems to run into this issue for non bot accounts?
On the page for apps I read:

API access to private organization resources is not available for unapproved OAuth Apps. In addition, there are no privileged create, update, or delete actions on public organization resources.

Maybe that now also plays into this.
But I didn't change anything on the github side or oauth app side, so this must still be completely something from social auth side.


Coveralls submit broken

https://github.com/IainNZ/Coverage.jl/blob/master/src/coveralls.jl#L108
Looks like Requests no longer exports post.

@malmaud what do

Oh we were doing using Requests. ez mode.

I'm just going to reexport post in Requests since too many things are relying on that export, if there are no objections.

Was the reason for not exporting them that they "pun" on Base things?

Partly it was the fact that many of the HTTP verbs are highly likely to
shadow or be shadowed by user identifiers (delete, head, options,
patch,...), and partly that 'get' puns on Base.get.
On Thu, Aug 27, 2015 at 2:03 PM, Iain Dunning<EMAIL_ADDRESS>wrote:

Was the reason for not exporting them that they "pun" on Base things?
—
Reply to this email directly or view it on GitHub
https://github.com/IainNZ/Coverage.jl/issues/86#issuecomment-135508566.

This is working now it looks like.