Switch from Laravel Elixir to Laravel Mix

Even though Laravel Elixir was recently updated to its latest version
on this project it is a EOL module. The new tool, specially for those
familiar to Laravel, is Laravel Mix.
With this Pull Request it's providen a full working version of Jigsaw
using Laravel Mix instead of Laravel Elixir.
It's important to mention that Mix surpasses Elixir, providing much
more functionality. The only exception to this is: .exec.  The call to Jigsaw still complies with
issue #85, where it is called from local or global composer,
whichever is available.
Now, npm run webpack is the equivalent of running gulp and
npm run dev is the one for gulp watch. Both of them run for
local builds (--env=local). To run the production version we
can use npm run production. There are other commands
as well, coming from Mix, all of them on package.json.

Please, if possible, test on big projects using Jigsaw as the ones I work on are small (+- 50 pages, +- 300 posts/collection items)

Just the PR I was hoping for...I'll put this through its paces and make sure it works with larger sites.

Added new commit to remove gulpfile.js as it is not needed anymore

Thanks so much for this @erickpatrick 😄
I was wondering why I am not able to run mix.copyDirectory('source/_assets', 'build_local/assets');
Any ideas on this? Thanks!

@erickpatrick This seems to break browserSync support for me, in that running the dev script doesn't seem to be successfully watching for changes and rebuilding. It's also choking on .less files, seems to be missing a loader.
It would also be best if the scripts in package.json were in sync with the current setup on Laravel 5.4 (https://github.com/laravel/laravel/blob/master/package.json), i.e. change webpack -> dev, dev -> watch, etc.

@damiani I'll have a look on this. Thanks for the feedback.

Thanks so much for this PR @erickpatrick! I've been testing it out and works great!
I'd like to contribute by adding the asset() helper feature from laravel into Jigsaw, any ideas on how we could achieve that?

Hi guys, my agenda has been a full for some time, but soon(ish) I'll get back to this and try to make it work as expected (given the feedback)

Would be even nicer, if Laravel Mix asset versioning would be supported 👍

I toyed around a bit getting Laravel Mix running with Jigsaw and came to a quite decent solution.
let mix = require('laravel-mix');
let argv = require('yargs').argv;
let jigsaw = require('./tasks/bin');
let command = require('node-cmd');

let WatchPlugin = require('webpack-watch');
let BeforeBuildPlugin = require('before-build-webpack');

const env = argv.e || argv.env || 'local';
const port = argv.p || argv.port || 3000;
const buildPath = 'build_' + env + '/';

let plugins = [
    new WatchPlugin({
        paths: ['source/**/*.md', 'source/**/*.php'],
        options: {}
    }),

    new BeforeBuildPlugin((compiler, proceed) => {
        command.get(jigsaw.path() + ' build ' + env, (error, stdout, stderr) => {
            console.log(error ? stderr : stdout);
            proceed()
        });
    })
];

mix.webpackConfig({ plugins });

mix.setPublicPath(buildPath + 'assets/');

mix.js('source/_assets/js/main.js', '/js/')
    .sass('source/_assets/sass/main.scss', '/css/');

mix.browserSync({
    port: port,
    server: { baseDir: buildPath },
    proxy: null,
    files: [ buildPath + '**/*' ]
});

This works with running single compilations npm run dev as well as starting watchers npm run watch. The assets are being compiled/placed right into the build directory. This can be done because a Jigsaw build will be triggered each time before asset compilation starts. Also it will watch for any changed .md or .php files in the source directory and will trigger a build/compilation once files are beeing changed.
You'll need the node-cmd, webpack-watch and before-build-webpack packages though.

It should be acknowledged, webpack (Laravel Mix) and gulp (Elixir) are not entirely the same things.
Given the nature of static site generators, would should keep gulp as the default. Gulp is itself is a task runner / generator, and can be used as an extension to jigsaw.
For example, there are pull requests for jigsaw like "remote api collections" ... this could be solved by the developer by writing a gulp task to fetch his remote articles and load them up into his collection folder. There's no need to extend jigsaw for this and even less need to merge this code in for everyone.
Gulp lets developers bend jigsaw to their needs. There are all kinds of ways we can use Gulp to load data and enhance jigsaw with our scripts that we couldn't do with webpack. If we changed jigsaw to webpack, then anyone who had custom requirements would also needlessly have to install gulp side by side.
We don't have to follow Laravel on their decision to move to webpack. We can do what's best for the user of jigsaw and stick with one system that makes sense for the majority of use cases jigsaw fills -- no one's building REST SPA's on top of jigsaw to warrant webpack. A gulp script is fine for almost all jigsaw compilation needs, plus it lets you extend functionality should you need it.

These are good points. I'm interested in using Webpack not for Webpack's power per se, but because I'm more concerned about remaining dependent on Elixir once it's EOL'd.
At least theoretically, much of the task-running behavior of Gulp (including the remote API example) could be accomplished using NPM scripts. Other than the API example, can you describe some other custom tasks that would be made more difficult or impossible with an NPM script?

@cmosguy Have you only encountered failures on Windows?

I've pushed some updates that build on @JonasDoebertin's approach, with some important changes:

jigsaw build is triggered after the webpack build is complete, not before, otherwise we can't use the {{ mix() }} helper in a Blade file to version assets. This means we still have send the results of asset compilation to an intermediate assets directory in source, and then copy that to build as before.
BrowserSync is working, not using Mix's mix.browserSync command, but instead by initializing it manually so we can get a handle to the instance. Using this handle, we can trigger reload() after webpack is done compiling assets and Jigsaw is done compiling files, which seems to prevent BroswerSync from running prematurely, getting caught in loops, etc.
I removed the files: [ buildPath + '**/*' ] option from the BrowserSync config, which eliminates the flood of [Browsersync] Reloading Browsers... messages when rebuilding; previously, one message would appear for each file being watched. This may be just a cosmetic change, or it may actually be more efficient to just watch the whole directory—I haven't dug into it to figure out which is the case. I'm crossing my fingers that this might solve https://github.com/tightenco/jigsaw/issues/86

Note that this requires more recent versions of Mix and BrowserSync, so package.json has been updated.
@JonasDoebertin and @erickpatrick, can you test this out and report back? @cmosguy, can you give this a spin on Windows and see if it works?

👍  For Laravel mix

@damiani I just attempted to test his PR with your edits, I marked a comment with the report() and app() global methods.  Besides that, the mix() method is almost working.  So I have tested on windows.

@cmosguy If you haven't changed anything from the default webpack.mix.js settings here, then you should be able to link to a JS file in master.blade.php by either:
<script src="assets/js/main.js"></script>

or
<script src="{{ mix('js/main.js') }}"></script>

Running npm run dev, and using the default settings in webpack.mix.js, will compile the JS/SASS assets (from the source/_assets directory) and output them to a source/assets directory. Then, that assets directory in source gets copied to the build_local (or build_production) directory. So after webpack is run and the site is built, you should end up with this:
├── build_local
│   ├── assets
│   │   ├── css
│   │   │   └── main.css
│   │   ├── js
│   │   │   └── main.js
│   │   └── mix-manifest.json
│   └── index.html
└── source
    ├── _assets
    │   ├── js
    │   │   └── main.js
    │   └── sass
    │       └── main.scss
    ├── _layouts
    │   └── master.blade.php
    ├── assets
    │   ├── css
    │   │   └── main.css
    │   ├── js
    │   │   └── main.js
    │   └── mix-manifest.json
    └── index.blade.php

Surely this Mix configuration can be simplified...
How about something like this:
const mix     = require('laravel-mix');
const jigsaw  = require('./tasks/bin');
const command = require('node-cmd');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

const app       = 'source';
const build     = 'build_local'
const assets    = `${app}/assets`;
const dist      = `${app}/dist`;

mix.setPublicPath(dist);
mix.setResourceRoot('../');

// Browser Sync
mix.browserSync({
  proxy: 'https://jigsaw.dev',
  browser: ['firefox.exe'],

  files: [
    `${build}/**/*.php`,
    `${build}/**/*.md`,
    `${dist}/styles/**.css`,
    `${dist}/scripts/**.js`
  ]
});

// SASS
mix.sass(`${assets}/styles/main.scss`, `${dist}/styles/main.css`);

// Javascript
mix.js(`${assets}/scripts/main.js`, `${dist}/scripts/main.js`);

// Build Jigsaw
mix.then(function () {
  command.get(`${jigsaw.path()} build`, (error, stdout, stderr) => {
    console.log(error ? stderr : stdout);
  });
});

I think I made the best one yet..
const mix = require('laravel-mix');
const bin = require('./tasks/bin');
const command = require('node-cmd');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

const app = 'source';
const build = 'build_local'
const assets = `${app}/assets`;
const dist = `${app}/dist`;

// Jigsaw
const jigsaw = () => {
  command.get(`${bin.path()} build`, (error, stdout, stderr) => {
    console.log(error ? stderr : stdout);
  })
};

// Options
mix.setPublicPath(dist);
mix.setResourceRoot('../');

// Browser Sync
mix.browserSync({
  host: 'localhost',
  port: 3000,
  proxy: 'https://jigsaw.dev',
  files: [
    `${build}/**/*.html`,
    `${dist}/styles/**.css`,
    `${dist}/scripts/**.js`,
    {
      match: [
        `${app}/**/*.php`,
        `${app}/**/*.md`,
      ],
      fn: () => jigsaw()
    }
  ],
});

// Assets
mix.sass(`${assets}/styles/main.scss`, `${dist}/styles/main.css`)
  .js(`${assets}/scripts/main.js`, `${dist}/scripts/main.js`)
  .then(() => jigsaw());

// Source maps when not in production.
if (!mix.inProduction()) {
  mix.sourceMaps();
}

`package.json`
```js
{
  "private": true,
  "scripts": {
    "build": "cross-env NODE_ENV=development webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "build:production": "cross-env NODE_ENV=production webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "start": "cross-env NODE_ENV=development webpack --progress --hide-modules --watch --watch-poll --config=node_modules/laravel-mix/setup/webpack.config.js",
    "start:hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "devDependencies": {
    "browser-sync": "^2.18.13",
    "browser-sync-webpack-plugin": "^1.2.0",
    "cross-env": "^5.1.1",
    "hasbin": "^1.2.3",
    "laravel-mix": "^1.6.1",
    "node-cmd": "^3.0.0"
  }
}

// Hash and version files in production.
if (mix.inProduction()) {
mix.version();
}

@Log1x Thanks, I'll test these out!

Updated my previous post with a few fixes/tweaks. It has been working quite well thus far.

@Log1x I like the organization of this and reducing some of the external dependencies, but it brings back the earlier undesirable behavior (from https://github.com/tightenco/jigsaw/issues/86, and which you mention above) where a flood of [Browsersync] Reloading Browsers... is triggered, and where sometimes BrowserSync tries to reload before Webpack has finished asset processing. That's why I was manually calling browserSyncInstance.reload(). See the (comment above)[https://github.com/tightenco/jigsaw/pull/89#issuecomment-326806315]. It also leads to a much slower and "choppier" reload.
Also, can you elaborate on what mix.setResourceRoot('../'); is doing? I'm not familiar with that option, and it doesn't seem to have any effect in my testing.


[Engineering] Lower time for botbuilder-dialogs-adaptive-testing tests

addresses # 2338
Description
Removed a duplicated test in the BotBuilder-dialogs-adaptive-testing tests.
Specific Changes
Removed duplicated test EmitEventActivityReceived in the file adaptiveDialog.test.js and added missing end of file line.
Testing
This change does not reduce code coverage.

As you can see the time would be reduced approximately 15ms, which is the time that was taking the duplicated test.

promoted


Copied and modified readinput file to echo name

Matt LaFayette
Soft Dev 2
Mon-Wed 6:30pm-8:15pm

Ok


Adopt user model and timezone for integration-test

This will fix the integration test for the self-hosted rpi (after manual intervention).
There is also a slight extension to the sawtooth publisher.

Content is already merged. PR had to be recreated after switching the repo to public


I think there are some Bugs

Challenge Make Object Properties Private has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

var Car = function() {
  // this is a private variable
  var speed = 10;

  // these are public methods
  this.accelerate = function(change) {
    speed += change;
  };

  this.decelerate = function() {
    speed -= 5;
  };

  this.getSpeed = function() {
    return speed;
  };
};

var Bike = function() {
  var gear;

  this.getGear = function(val){
    gear = val;
  };

  this.setGear = function(){
    return gear;
  };

  // Only change code below this line.

};

var myCar = new Car();

var myBike = new Bike();

@chaturanga836 Please read the instruction -

Modify the Bike constructor to have a private property called gear and two public methods called getGear and setGear to get and set that value

Instead, your getGear sets a value, and setGear returns a value.
Please visit the HelpJS Room if you need help with the challenge.

Thank you for reporting this issue.
This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the "Help" button on the challenge on freeCodeCamp, which will take you to the help chatroom for that specific challenge. You can also view our full list of official chatrooms.
If you think I'm wrong in closing this issue, please reopen it and add further clarification. Thank you, and happy coding.


req: Details of how you created the script-detection

Peace Be Upon you,
Can you share the details of how you created the Script-Detection model.
I am currently working on creating a Font Identifier model, it would be helpful.
Waiting for your reply

Don't use that one for now, it only recognizes Unicode blocks.
For a new model that is training right now I've combined ISO 15924 (script codes) with the Unicode script property and mapped those into the private use area of Unicode by just adding the script number to 0xF0000 (start of PUA). The training data (~17500 lines) is just the training data for every model I could find where each character is replaced by their respective script identifier. Training will take considerably longer than for recognition models (20 epochs/300000 iterations and it is still improving).


Avoid creating strings when logging is disabled

When logging is disabled we still do a lot of work only not to log it.
This PR introduces AnyLoggingIsEnabled() to avoid this work if no kind of logging is enabled.

Good one, thanks!

I agree. I wonder to perhaps somehow to pass this on to GnuTLS?


Improve error messages: backend not installed -> Segfault

Is your feature request related to a problem? Please describe.
If a backend is not installed but a model which uses that backend is loaded the trtis responds with:
9746 Segmentation fault (core dumped)
Describe the solution you'd like
Improve description: something along the lines:
the requested backend (tensorflow) is not installed

You are right that it should not segfault. Marking as a bug.

I tried loading a tensorflow model with the latest master and it does not segfault. Instead I see it reporting the appropriate error (unexpected platform type tensorflow_graphdef for <model_name>). Similar error with 19.10 release.

Note: if you want the server to continue running when it loads an invalid model such as in this case you can use the --exit-on-error=false flag


when the data is very large, the training progress is too slow

My training data is very large ,the training progress is very slow.
And I use the "use_iter": true.
First I think it's because my much more data is used during each iter, but when I chech the code, I find it just use batch_per_iter batchs per iter, and each batch just use batch_size samples, that is, the training data during each iter is the same.
So why the training time per iter is much more large when there is much more training data?
ps, I use PairGenerator.

reference to #40


organize all Dockerfiles into a directory to facilitate dockerignore

Motivation
Some Dockerfile need to use the root dir as their context directory because they need to refer to other projects when building. For example, turms-gateway needs to refer to turms-server-common. So the context dir should be the root of the whole turms projects, and the dockerfile should be written from the perspective of the root directory.

Done. We just create a dockerignore in the root dir for all builds as a workaround.


Build sf::Transformable tests

Description
Transformable.cpp was originally compiled when I first submitted PR #1973. While that PR was in review, #2012 got merged which changed how tests are compiled. These two PR were in conflict so when I went to resolve conflicts on #1973, I accidentaly removed the line which added Transformable.cpp to the build. Because not compiling this file caused no build breaks, nobody noticed until after #1973 got merged. My bad, everybody.
Tasks

[x] Tested on Linux
[x] Tested on Windows
[x] Tested on macOS
[x] Tested on iOS
[x] Tested on Android

SFMLBuildMaster: Build this please.

:D


feat: booleans

[ ] Add =, !=, <, <=, >, >= operators, these return a monomial that is 1 or 0 based on the boolean result
[ ] assert should be modified so that it throws an error if a given <expr> returns is zero, passes otherwise

added == and != only with v0.1.0, Polynomial does not have that trait and I dont indent to add a non-standard way for it! Perhaps later.


Type narrowing bleed

In the following example, the is_array defines $v as an array which bleeds past the conditional, making it look like we're passing an array to f.
<?php

function f(string $p) : string {
    return $p;
}

function g($v) : string {
    if (is_array($v)) {
        return 'string';
    }

    return f($v);
}

erroneously emitting the following issue.
%s:12 PhanTypeMismatchArgument Argument 1 (p) is array|null but \f() takes string defined at %s:3

Another example;
<?php

function f(string $p) : string {
    return $p;
}

function g($v) : string {
    if (is_array($v)) {
        return 'string';
    }

    return f($v);
}

In PreOrderAnalysisVisitor we let ConditionVisitor update the scope with a new type for the variable $v.
We need to let ConditionVisitor update the outer-scope when creating variables, but need to only be updating an inner-scope when setting types on variables in cases like this.

Also, BlockExitStatusChecker (in dev-master) can be used to help with inferences
For code such as if (is_array($v)) { return 'string'; }, Phan could infer that $v is not an array for the statements following the if statement, as well as else/elseif statements

if (is_array($v)) { break; } would be more complicated, may or may not need to change the context merging logic to skip a few levels.
Can cut down on extra asserts if if (!is_string($v)) {return; } is analyzed properly, and Phan knows not to merge the context for that branch, and to infer the negation in the other Context(s)

Due to 'quick_mode' => false,, this should probably be precomputed (after \ast\parse_code call? Once per method/function/closure declaration?). But $node->flags can be re-used for node types such as AST_IF, AST_IF_ELEM, for loops, etc., which don't have flags (e.g. bits which aren't already used, such as 1 << 24 for unconditional return, 1 << 25 for unconditional throw or return, etc.)

Then, the ContextMergeVisitor can check that, e.g. for AST_IF, switch statements, etc.


Bidirectional streaming?

Thanks for this package! Do you have any input for implementing bidirectional streaming? Are there specific issues with implementing it or is it just a time commitment issue? Id like to give it a shot but Im just curious if you have any advice before I start.

Hi @adambeer . It's mostly that I don't currently have the spare time to work on this consistently. I don't really have any advice, but if you create a PR I'll be happy to review it!


Various Helm Chart maintenance updates

Description

This PR addresses various Helm Chart related issues:

e97c08d Bump helm chart to 0.0.13
4fc835e Decouple patroni and external database template dependency - #131
79d87ca Update chart template secrets to always base64 encrypt values - #154
a8cd4c7 Update hpa to use version autoscaling/v2 - #145

SHOWCASE-3145
Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist

[x] I have read the CONTRIBUTING doc
[x] I have checked that unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[x] I have added necessary documentation (if appropriate)

Further comments

Currently rebased on top of #157 - please merge this branch to fold in both branches of work.

👀


Error while adding it.

> meteor add smeevil:reactive-block-grid
 => Errors while adding packages:

While checking for<EMAIL_ADDRESS>error: No compatible build found

I use the newest preview for Windows (0.3.0)

apparently that dependency isn't needed anymore. you can wait for @smeevil to merge a PR i sent or check out my fork
https://github.com/dcsan/responsive-block-grid


ENH: Simplify using read_hdf for HDF files with one dataset

Allow read_hdf to be used without a key when a single pandas object
is stored in a HDF file.  Raises if multiple pandas objects found.

Small simplification to read_hdf when the HDF file is trivial.
df = pd.DataFrame([[1,2],[3,4]])
df.to_hdf('test.h5', 'df)
del df
df = pd.read_hdf('test.h5')

minor doc point. ping when pushed/green.

@jreback ready

thanks!


GitHub ble df add missing features and commands

The PR adds missing features and commands related with direction finding to list of supported items.
It is required to pass Bluetooth controller qualification tests.
The fixes were verified with EBQ.

@cvinayak @Thalley comments were addressed. Please take a look.


no need to override group in  org.apache.dubbo.configcenter.support.nacos.NacosDynamicConfiguration#addListener

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

Environment

Dubbo version: xxx
Operating System version: xxx
Java version: xxx

Steps to reproduce this issue
public void addListener(String key, String group, ConfigurationListener listener) {
        String[] keyAndGroup = getKeyAndGroup(key);
        if (keyAndGroup[1] != null) {
            group = keyAndGroup[1];
        }
        String finalGroup = group;
        NacosConfigListener nacosConfigListener = watchListenerMap.computeIfAbsent(generateKey(key, group), k -> createTargetListener(key, finalGroup));
        String keyInNacos = rootPath + PROPERTIES_CHAR_SEPERATOR + key;
        nacosConfigListener.addListener(listener);
        try {
            configService.addListener(keyInNacos, group, nacosConfigListener);
            System.out.println("1");
        } catch (NacosException e) {
            logger.error(e.getMessage());
        }
    }

i think we should remove the code : group = keyAndGroup[1]
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps？
Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
Just put your stack trace here!

This issue has been fixed from 2.7.2 onwards.


[WIP] Protobuf version change to 3.9

Description
Protobuf version change from 3.7.0 to 3.9.0.  Fixes issue #721 .
Testing instructions
Types of changes

Checklist

[x] Prefix PR title with [WIP] if necessary.
[x] Add tests to cover changes as needed.
[x] Update documentation as needed.

Codecov Report

Merging #746 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #746   +/-   ##
=======================================
  Coverage   86.34%   86.34%
=======================================
  Files         314      314
  Lines        9720     9720
=======================================
  Hits         8393     8393
  Misses       1327     1327

Impacted Files
Coverage Δ

src/Any/Signer.cpp
96.39% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

when you squash and merge, make sure type a short git summary (31 commits) :)

Ready for review.  Status:

builds (macos, ios, android) OK locally
builds (linux, ios, android) OK in CI builds
iOS podfile tested with dummy client project

looks cleaner, we only build protobuf once, correct?

No, I backtracked on that.  The CMake build is used not only for MacOS/Linux, but for iOS/Android builds as well, and each one has its own special settings.  So one build in install-dependencies is not enough.  But that one is also needed.  The only things I could do is some cleanup, e.g. tests/CMakeFile was looking for pre-built protobuf lib, when in fact it was linking with the one built in the same CMake flow.


Do not expose individual users

Last week on the OSS Health Group call, we discussed exposing individual contributors through the metrics.
Some of our metrics currently return users' login names.
Would these metrics still be informative without exposing individual people?

I think that depends on the metric. I don't think "contributors" would be far less useful without having usernames to further explore a user's timeline of contributions, but "committer_locations" would probably be just as useful.
Either way, we are only using public data so I don't think there's a huge privacy risk. Users who are concerned about privacy probably don't use personally identifiable information on GitHub.

Good point about the ability to drill down to how each metric is informed by the data. Maybe we can limit the level of detail though to avoid exposing usernames. This would be an ethical decision.
A concern beyond privacy is how the data could be used against contributors, for example for job performance evaluation. There will be many things contributors do that cannot be reliably captured through our metrics and thus any conclusion drawn about contributors will be skewed. We do not want to provide a tool that incentivises contributors to think about gaming the metrics which distracts from meaningful contributions.
The request is about staying abstract from individual contributors.

I think that the metrics that operate at the individual level are useless without usernames, if we anonymize the data only the aggregate metrics will be usable. I think that it's useful for projects to be able to understand how individuals are contributing, and our tools will help make individuals who contribute in ways other than committing more visible

If on the call it sounded pretty certain that we want to anonymize it though it can certainly be done

Yes, during the 2017-04-08 call, several people voiced concerns with measuring individual users.
The meeting minutes from 2017-04-18 read:

We might not create metrics that are human centered

I acknowledge that I wrote those minutes and maybe someone else can chip in how they understood what we talked about during that call.

Sounds good! We'll anonymize or aggregate the metrics that currently return usernames.

Thank you.

Is this done?

Is this done?

I don't know if this will ever be done because I think it can serve as a constant reminder.
Does GHdata currently comply with this issue: yes, we could close it.

Yes and no - Yes because GHData's frontend does not display any personally identifiable information. No because GHData has API requests that when made with the "raw" parameter will return all of the rows relevant to a given query, one of which is names. GHData visualizations will never use names, so I would feel comfortable closing it.

We do not expose individual users.  The API provides information about users, bur our front end does not expose information about useres.


Proposal: Remove unused theme resources from NavigationView

Proposal: Remove unused theme resources from NavigationView
While checking the NavigationView theme resources file for proposal #2754 I've noticed certain theme resources not being used anywhere in the NavigationView. These theme resources are the following:
NavigationViewItemBackgroundChecked
NavigationViewItemBackgroundCheckedPointerOver
NavigationViewItemBackgroundCheckedPressed
NavigationViewItemBackgroundCheckedDisabled

NavigationViewItemForegroundChecked
NavigationViewItemForegroundCheckedPointerOver
NavigationViewItemForegroundCheckedPressed
NavigationViewItemForegroundCheckedDisabled

NavigationViewItemBorderBrushChecked
NavigationViewItemBorderBrushCheckedPointerOver
NavigationViewItemBorderBrushCheckedPressed

A WinUI solution-wide search in Visual Studio only showed these theme resources being defined in the NavigationView_rs1_themeresources.xaml and NavigationView_rs2_themeresources.xaml files but completely unused otherwise. (I also didn't see them in use when these files were initially uploaded to the repo in November 2018.) To the best of my knowledge, there is also no "Checked" visual state for a NavigationViewItem and this is also reinforced by the fact that no matching TopNavigationViewItemForegroundChecked theme resource exists.
Removing these theme resources would be a breaking change if they are used in WinUI projects. However, I can't imagine these theme resources being consumed in significant numbers. As such, based on my current understanding, I propose removing them (and perhaps document their removal in the changelog for the WinUI release affected).
The theme resource NavigationViewItemBorderBrushCheckedDisabled is used, for example, here
https://github.com/microsoft/microsoft-ui-xaml/blob/1c6717881cbcf990056625912039f89a7c5781fb/dev/NavigationView/NavigationView_rs1_themeresources.xaml#L601
though it appears as an error to me. I think the theme resource NavigationViewItemBorderBrushDisabled was meant to be used here (it's currently unused) as it makes much more sense given the visual state ("Disabled" and not "CheckedDisabled"). The use of that theme resource would also match the other visual states above it, like this one:
https://github.com/microsoft/microsoft-ui-xaml/blob/1c6717881cbcf990056625912039f89a7c5781fb/dev/NavigationView/NavigationView_rs1_themeresources.xaml#L590
Instead, NavigationViewItemBorderBrushDisabled is currently unused in the NavigationView and thus might confuse developers because having to use NavigationViewItemBorderBrushCheckedDisabled here is not intuitive simply by looking at the name of the resource. Especially when we see that a theme resource like NavigationViewItemBorderBrush is used instead of the NavigationViewItemBorderBrushChecked theme resource throughout the NavigationView (same for the corresponding PointerOver/Pressed theme resources).
Another use of NavigationViewItemBorderBrushCheckedDisabled can be found here
https://github.com/microsoft/microsoft-ui-xaml/blob/1c6717881cbcf990056625912039f89a7c5781fb/dev/NavigationView/NavigationView_rs1_themeresources.xaml#L960
and again this appears as an error to me as there is no "CheckedDisabled" visual state. The theme resource used here should probably be TopNavigationViewItemBorderBrushDisabled which currently does not exist and likely should be added.
As such, I also propose replacing the - I believe mistakenly - used NavigationViewItemBorderBrushCheckedDisabled theme resource with correct theme resources such as NavigationViewItemBorderBrushDisabled and TopNavigationViewItemBorderBrushDisabled and document its replacement accordingly in the changelog of the WinUI release this breaking change would be included in.
Thoughts by the team?

@ojhad FYI.  I think we might run into issues that it is possible that customers have taken a dependency on these and that by deleting them we could break there apps. If we were to do this we'd want to investigate and if so make the messaging clear.

@YuliKl and @anawishnoff FYI

@StephenLPeters I have exactly the same concerns. There will probably be a few customers who are using one ore more of these resources in some of their apps. I don't know how many and I also don't know the history about these theme resources which appear to have never been used in WinUI (but perhaps in an older Windows SDK release).
I do think though that there is considerable benefit to get by removing/replacing these theme resources as they at best appear to be quite outdated and at worst just confusingly and inconsistently used (like the case of NavigationViewItemBorderBrushCheckedDisabled vs NavigationViewItemBorderBrushDisabled as outlined above). Semantic Versioning and a well-documented release changelog can be used by us here to mitigate the effect of this breaking change - if we decide to go through with this.

@StephenLPeters As a compromise for now if the team views this as too risky a change in terms of breaking apps, I could move these theme resources to the bottom of their respective theme directories and add a note directly above them stating that these theme resources are no longer in use and could be removed in a future WinUI release. How does that sound?
Ultimately, I still want them to be removed though and we definitely should - from time-to-time and with the right communication - cleanup some "waste" accumulated over the years in the theme resources.


Turn off W503 Flake8/pycodestyle rule

It's in the default pycodestyle ignore list^, and is not the style recommended by PEP 8^^.
Because we were overriding the ignore list, we were re-enabling all the checks ignored by default.
Unfortunately, there is no corresponding check for the inverse style.
^ https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
^^ https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator

Codecov Report

Merging #367 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #367   +/-   ##
========================================
  Coverage    95.39%   95.39%
========================================
  Files           67       67
  Lines         2519     2519
  Branches       217      217
========================================
  Hits          2403     2403
  Misses          84       84
  Partials        32       32

Impacted Files
Coverage Δ

datahub/investment/serializers.py
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Only negative thing I see is that this way you can accidentally delete a line and it more likely go unnoticed with operator in front, but this could be sacrificed for being easier to read.


Example with Directory Service?

Does troposphere support MS AD?
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directoryservice-microsoftad.html

I don't believe there are any examples but yes, it is implemented in troposphere here.

Great, thanks!


Added viewModelScope.launch

A ViewModelScope is defined for each ViewModel in your app. Any coroutine launched in this scope is automatically canceled if the ViewModel is cleared.
https://developer.android.com/topic/libraries/architecture/coroutines

oke , that sounds good


Update server node dependencies

Was looking for updates to help with the memory usage. Didn't succeed, but these updates do fix some security notices.
@NestJS
@Type
@turf
@types (except node which set to 16)
Green updates - @nestjs-modules/mailer bcrypt eslint-plugin-import pg
Yellow - @typescript-eslint/eslint-plugin @typescript-eslint/parser aws-sdk
eslint eslint-config-prettier eslint-plugin-functional lru-cache rollbar
rxjs ts-node tsconfig-paths
Red
Passport, geojson2shp, eslint-plugin-jsdoc, class-transformer, jest
Dropped
@godaddy/terminus
ts-loader

made eslint changes and condensed, but haven't tested locally yet.


Some name using tag name:en (by language)

Some healthsites using name:en, or name:
Which is will not show on HS because HS just using name
example:
https://healthsites.io/map#!/locality/node/4837626322

this is related to https://github.com/healthsites/healthsites/issues/1366
we need to discuss the strategy to handle this
@markherringer @timlinux

I believe the mapping the name of features in OSM with a name:<languagecode> without also adding a matching name tag can be considered a mapping error in the existing data.
See https://wiki.openstreetmap.org/wiki/Names#Localization (highlighting by me):

For adding localized names in different languages, add additional name:code=* tags with a suffix on the name key […]

Most of the cases in OSM with missing name tags stem from the Maps.ME editor, which (for some quite specific reasons) chose to add names in this, frankly suboptimal way.
--
It would be nice though, if healthsites.io would have the possibility to show and edit true multilingual names, like health facilities in bilingual regions. For example: https://www.openstreetmap.org/way/30578966 in Belgium or https://www.openstreetmap.org/way/105831606 in Italy. I like the user interface of the iD quite well for this, which shows the localized names like this if they are present:


You can't use Gon public methods for storing data

I have following error on gon v. 5.2.3
You can't use Gon public methods for storing data
Problematic code:
gon.current_user = { sn: current_user.sn }

@raisty : You must be having some public method named current_user somewhere in your code. Are you using devise gem ?

You are absolutely true. The problem is with public method named current_user


Remove selected images when cancel has been pressed

Hey, im not sure if this is something I cant do but I feel I havent been able to firgure it out yet.
Lets say for example the user has selected images and then decides to cancel it.
How can I remove those selected images? Cause at the momemt if I press the camera button
again those images are still selected.
Thank you for your time.
Dhruv Tekchandani.

Hey @DhruvTekchandani , Have you solved this issue? I am facing same issue.
Please Help,
Thanks .!

Solved this..
put assigning the picker to a variable in the action such as function or button press rather than in the above view did load
like this....
func addImages() {
let vc = BSImagePickerViewController()
This sets the imagePicker controller fresh each time you load it up.


Sales

Quotation

New quotation items

Orders

Create a new Order

Under orders in sales, the shipping price is not interactable. One is unable to input the shipping price; this might be because the shipping price is predetermined by the shipping area or method.
Another issue is where there seems to be a switch; where shipping method and shipping area have been swapped.

The Shipping method label has been renamed to Shipping area. The Shipping Price is not interactable by design. Once the Shipping area is selected, it should automatically populate the Shipping Price.
The Shipping Area can be set from the Shippings Resource accessible via /admin/shipping


Use cli-ux for waiting, linking and spinners

@arielshaqed

How was this tested?
Manually, but I'm working right now no adding a unit tests framework to the cli

Does it work on non-iTerms?
Spinner works in osx terminal
Links are displayed like this: "linktext (https://url.you.linked.to.com)" instead of "linktext" with underline that can be clicked

@arielshaqed

How was this tested?

Manually, but I'm working right now no adding a unit tests framework to the cli

Sure, but that probably won't work for making sure it looks good on a terminal.  This is a case where manually testing (even just once) helps more than automated tests.

Does it work on non-iTerms?

Spinner works in osx terminal
Links are displayed like this: "linktext (https://url.you.linked.to.com)" instead of "linktext" with underline that can be clicked

Cool.  I see in the code that it also tries to work for WIN32.  That leaves Linux terminals.  It's OK to degrade gracefully (e.g. show the classic |\-/|\-/ spinner, but less OK if it fills the screen with garbage.  Terminals are so much fun!
Reading the code it seems to try to set up a good spinner.  You might check it by setting TERM to interesting values, maybe export TERM=vt100 or export TERM=xterm.  These should give you an ASCII spinner, not the nice MacOS spinning dots.

Looking  a bit further, it should work with any Unicode-capable terminal.  So good enough for now!
Thanks!


Holograms 240: Remove catch-up chapters

Rename the catch-up chapter '7-Finale' to 'Completed' and then remove all other catch-up chapters from this course. Catch-up chapters were useful for Build, but no longer necessary. They are too costly to maintain and makes the download size for the class significantly larger.

Done!

Hey, however when I deploy this Completed Code, when I click 1 ploy, and wait then nothing happens, do you know why? Thank you!

when I click 1 ploy

What is this referring to?


⚠ Bofrost.fr has degraded performance

In 2b82931, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 872 ms

Resolved: Bofrost.fr performance has improved in 3515dc5.


::TODO:: Update LICENSE

[x]  fix insecure url

Thanks for the PR, but I would not have the confidence to adjust the Apache License text in even a trivial fashion like this, this should go through an official process of updating https://www.apache.org/licenses/LICENSE-2.0 and we shouldn't touch this per project.

Also, there may be other opportunities to update links in docs and example config to https from http that haven't been previously available, and the project would appreciate any PR to refresh these.

ok brb


NoClassDefFoundError: Could not initialize class

From @satb on March 4, 2014 3:59
Adding this plugin is throwing an error like this
Caused by NoClassDefFoundError: Could not initialize class com.tinkerpop.rexster.client.RexProClientFilter

Without the plugin everything works fine and the same class can be loaded without a problem. What could be wrong?
Using grails 2.3
Build.config is very simple
grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

grails.project.fork = [
    // configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
    //  compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],

    // configure settings for the test-app JVM, uses the daemon by default
    test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
    // configure settings for the run-app JVM
//    run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the run-war JVM
    war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the Console UI JVM
    console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]

grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // specify dependency exclusions here; for example, uncomment this to disable ehcache:
        // excludes 'ehcache'
    }
    log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve
    legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility

    repositories {
        inherits true // Whether to inherit repository definitions from plugins

        grailsPlugins()
        grailsHome()
        mavenLocal()
        grailsCentral()
        mavenCentral()
        mavenRepo 'http://maven.restlet.org'
        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
        // runtime 'mysql:mysql-connector-java:5.1.27'
        // runtime 'org.postgresql:postgresql:9.3-1100-jdbc41'
        runtime 'com.tinkerpop.rexster:rexster-protocol:2.5.0-SNAPSHOT'
        runtime 'org.postgresql:postgresql:9.3-1100-jdbc41'
    }

    plugins {
        // plugins for the build system only
        build ":tomcat:7.0.50"

        // plugins for the compile step
        compile ":scaffolding:2.0.1"
        compile ':cache:1.1.1'

        // plugins needed at runtime but not for compilation
        runtime ":hibernate:<IP_ADDRESS>" // or ":hibernate4:<IP_ADDRESS>"
        runtime ":database-migration:1.3.8"
        runtime ":jquery:<IP_ADDRESS>"
        runtime ":resources:1.2.1"
        runtime ':jaxrs:0.10'
        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0.1"
        //runtime ":cached-resources:1.1"
        //runtime ":yui-minify-resources:0.1.5"
    }
}

Simply commenting out the jaxrs: 0.10 will cause the loading problem to go away. Is it a class loader issue?
Copied from original issue: krasserm/grails-jaxrs#47

From @davidecavestro on March 4, 2014 7:41
It could be due to some missing dependency in that phase, so it could be related to both the contents of your class and some class it depends on (some imports). I'd say that the jaxrs plugin probably introduces some dependencies (possibly a new version of an artifact you already depend upon) that misses some code indirectly needed by your class.
You could add -verbose:class to your java opts in order to log classloading events, i.e.
export GRAILS_OPTS="$GRAILS_OPTS -verbose:class"
Or even better you could debug to see the cause of the NoClassDefFoundError. As you said it is related to class loading, and should happen when the classloader is loading RexProClientFilter, but since the JVM doesn't give use more details, I guess the best way to find the cause is debugging.

Closing due to the age of the issue.


Login loop on ocis.ocis-keycloak.latest.owncloud.works

https://user-images.githubusercontent.com/214010/195785059-26afa855-10b0-4c78-b8a2-ff0fc0a7050a.mp4
Console + Network errors:

Console.txt
ocis.ocis-keycloak.latest.owncloud.works.har.zip

Safari Version 16.0 (176<IP_ADDRESS>.10, 17614)

Similar issue here:
{"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at nats:9233 with tls enabled (true): x509: certificate is valid for localhost, not nats","time":"2022-10-14T16:15:05.185230278Z","caller":"github.com/cs3org/reva/v2@v2.10.1-0.20221012104058-ae7c58b9bffa/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 1m19.100549382s"}

should be fixed by #4867
Waiting for the automated deployment.

fix confirmed.


doesn't work anymore

W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

just saying it was working fine before i never had problems but now this is occurring.


bump to v0.4

update CHANGELOG
I have not pushed a release, yet. I will push one after merging!

Thanks @anjakefala !


No data pulled on dashboard

Hi,
I just installed security monkey following "quick start guide" strictly. However, after log in the Web UI, I cannot see anything on it.
In /var/log/security_monkey/security_monkey.log, there are some errors I cannot understand. Could anyone help tell me what the problem is? Thanks.
Regards,
Robert
2017-09-07 10:00:20,838 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-09-08 01:48:31,210 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-09-08 01:50:04,880 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-09-08 01:52:35,844 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-09-08 01:54:08,582 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-09-08 01:56:17,824 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-09-08 01:56:18,327 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-09-08 01:56:18,832 INFO: Adding job tentatively -- it will be properly scheduled when the scheduler starts [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:287]
2017-09-08 01:56:18,833 INFO: Added job "_clear_old_exceptions (trigger: cron[hour='3', minute='0'], next run at: 2017-09-08 03:00:00)" to job store "default" [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:262]
2017-09-08 01:56:18,833 INFO: Scheduler started [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:574]
2017-09-08 03:00:00,000 INFO: Running job "_clear_old_exceptions (trigger: cron[hour='3', minute='0'], next run at: 2017-09-09 03:00:00)" (scheduled at 2017-09-08 03:00:00) [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:509]
2017-09-08 03:00:00,591 INFO: Job "_clear_old_exceptions (trigger: cron[hour='3', minute='0'], next run at: 2017-09-09 03:00:00)" executed successfully [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:527]
2017-09-08 10:06:40,745 ERROR: Exception on /login [POST] [in /usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py:1423]
Traceback (most recent call last):
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_RESTful-0.3.3-py2.7.egg/flask_restful/__init__.py", line 270, in error_router
    return original_handler(e)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_RESTful-0.3.3-py2.7.egg/flask_restful/__init__.py", line 270, in error_router
    return original_handler(e)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Security_Fork-2.0.1-py2.7.egg/flask_security/decorators.py", line 230, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Security_Fork-2.0.1-py2.7.egg/flask_security/views.py", line 76, in login
    if form.validate_on_submit():
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_WTF-0.14.2-py2.7.egg/flask_wtf/form.py", line 101, in validate_on_submit
    return self.is_submitted() and self.validate()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Security_Fork-2.0.1-py2.7.egg/flask_security/forms.py", line 239, in validate
    self.user = _datastore.get_user(self.email.data)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Security_Fork-2.0.1-py2.7.egg/flask_security/datastore.py", line 191, in get_user
    rv = self.user_model.query.filter(query).first()
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2320, in first
    ret = list(self[0:1])
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2187, in __getitem__
    return list(res)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2391, in __iter__
    return self._execute_and_instances(context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2406, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 717, in execute
    return meth(self, multiparams, params)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 814, in _execute_clauseelement
    compiled_sql, distilled_params
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 927, in _execute_context
    context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1076, in _handle_dbapi_exception
    exc_info
  File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 920, in _execute_context
    context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 425, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) terminating connection due to administrator command
SSL connection has been closed unexpectedly
 'SELECT "user".id AS user_id, "user".email AS user_email, "user".password AS user_password, "user".active AS user_active, "user".confirmed_at AS user_confirmed_at, "user".daily_audit_email AS user_daily_audit_email, "user".change_reports AS user_change_reports, "user".last_login_at AS user_last_login_at, "user".current_login_at AS user_current_login_at, "user".login_count AS user_login_count, "user".last_login_ip AS user_last_login_ip, "user".current_login_ip AS user_current_login_ip, "user".role AS user_role \nFROM "user" \nWHERE "user".email ILIKE %(email_1)s \n LIMIT %(param_1)s' {'email_1'<EMAIL_ADDRESS>'param_1': 1}
2017-09-08 10:07:15,520 ERROR: Internal Error [in /usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_RESTful-0.3.3-py2.7.egg/flask_restful/__init__.py:299]
Traceback (most recent call last):
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1473, in full_dispatch_request
    rv = self.preprocess_request()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1666, in preprocess_request
    rv = func()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Principal-0.4.0-py2.7.egg/flask_principal.py", line 477, in _on_before_request
    identity = loader()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Security_Fork-2.0.1-py2.7.egg/flask_security/core.py", line 232, in _identity_loader
    if not isinstance(current_user._get_current_object(), AnonymousUserMixin):
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Werkzeug-0.12.2-py2.7.egg/werkzeug/local.py", line 306, in _get_current_object
    return self.__local()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Login-0.4.0-py2.7.egg/flask_login/utils.py", line 26, in <lambda>
    current_user = LocalProxy(lambda: _get_user())
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Login-0.4.0-py2.7.egg/flask_login/utils.py", line 302, in _get_user
    current_app.login_manager._load_user()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Login-0.4.0-py2.7.egg/flask_login/login_manager.py", line 317, in _load_user
    return self.reload_user()
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Login-0.4.0-py2.7.egg/flask_login/login_manager.py", line 279, in reload_user
    user = self.user_callback(user_id)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Security_Fork-2.0.1-py2.7.egg/flask_security/core.py", line 208, in _user_loader
    return _security.datastore.find_user(id=user_id)
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_Security_Fork-2.0.1-py2.7.egg/flask_security/datastore.py", line 203, in find_user
    return self.user_model.query.filter_by(**kwargs).first()
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2320, in first
    ret = list(self[0:1])
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2187, in __getitem__
    return list(res)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2391, in __iter__
    return self._execute_and_instances(context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2406, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 717, in execute
    return meth(self, multiparams, params)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 814, in _execute_clauseelement
    compiled_sql, distilled_params
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 927, in _execute_context
    context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1076, in _handle_dbapi_exception
    exc_info
  File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 920, in _execute_context
    context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 425, in do_execute
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 425, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) terminating connection due to administrator command
SSL connection has been closed unexpectedly
 'SELECT "user".id AS user_id, "user".email AS user_email, "user".password AS user_password, "user".active AS user_active, "user".confirmed_at AS user_confirmed_at, "user".daily_audit_email AS user_daily_audit_email, "user".change_reports AS user_change_reports, "user".last_login_at AS user_last_login_at, "user".current_login_at AS user_current_login_at, "user".login_count AS user_login_count, "user".last_login_ip AS user_last_login_ip, "user".current_login_ip AS user_current_login_ip, "user".role AS user_role \nFROM "user" \nWHERE "user".id = %(id_1)s \n LIMIT %(param_1)s' {'id_1': u'1', 'param_1': 1}

EDIT: 9/15 by mikegrima - added markdown for readability

You are having SQLAlchemy errors.  It looks as though it is having database connectivity issues.
I'm not familiar with this specific error:
OperationalError: (OperationalError) terminating connection due to administrator command
SSL connection has been closed unexpectedly

Were you able to run the monkey commands before successfully?  What happens when you run: monkey amazon_accounts?

After going through multiple issues and referencing my error message
After following the build instructions with precision, and creating IAM settings with perfection. When performing the monkey db upgrade this the error I'm facing consistently. The goal being to connect to a Postgres RDS instance. I sure many have faced this particular issue in the past. Note - My UI was not populating any relevant information.
conn = _connect(dsn, connection_factory=connection_factory, async=async) sqlalchemy.exc.OperationalError: (OperationalError) could not connect to server: Connection timed out Is the server running on host "omitted" (omitted) and accepting TCP/IP connections on port 5432?
even after digging through the migrations/env.py trying to print feedback per for the value of SQLALCHEMY_DATABASE_URI  with no success https://github.com/Netflix/security_monkey/issues
Step taken  temporarily open SG settings from the instance and from the DB.
Hardcode values in the default-config.py and env-config/config.py with completely no progress.
After banging my head it running across this last issue where I simply service ufw stop and here is the the tail after stoping the ufw and running monkey db upgrade
scheduler.py", line 208, in setup_scheduler\n    accounts = Account.query.filter(Account.third_party == False).filter(Account.active == True).all()  # noqa\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2279, in all\n    return list(self)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2391, in __iter__\n    return self._execute_and_instances(context)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2406, in _execute_and_instances\n    result = conn.execute(querycontext.statement, self._params)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 717, in execute\n    return meth(self, multiparams, params)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection\n    return connection._execute_clauseelement(self, multiparams, params)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 814, in _execute_clauseelement\n    compiled_sql, distilled_params\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 927, in _execute_context\n    context)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1076, in _handle_dbapi_exception\n    exc_info\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 185, in raise_from_cause\n    reraise(type(exception), exception, tb=exc_tb)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 920, in _execute_context\n    context)\n  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 425, in do_execute\n    cursor.execute(statement, parameters)\nProgrammingError: (ProgrammingError) relation "account" does not exist\nLINE 2: FROM account \n             ^\n \'SELECT account.id AS account_id, account.active AS account_active, account.third_party AS account_third_party, account.name AS account_name, account.notes AS account_notes, account.identifier AS account_identifier, account.account_type_id AS account_account_type_id \\nFROM account \\nWHERE account.third_party = false AND account.active = true\' {}\n', 'account_id': None, 'region': None, 'occurred': datetime.datetime(2017, 10, 18, 18, 59, 13, 425950), 'tech_id': None, 'source': 'scheduler', 'ttl': datetime.datetime(2017, 10, 28, 18, 59, 13, 425983), 'item_id': None, 'message': '(ProgrammingError) relation "account" does not exist\nLINE 2: FROM account \n             ^\n \'SELECT account.id AS account_id, account.active AS account_active, account.third_party AS account_third_party, account.name AS account_name, account.notes AS account_notes, account.identifier AS account_identifier, account.account_type_id AS account_account_type_id \\nFROM account \\nWHERE account.third_party = false AND account.active = true\' {}', 'type': 'ProgrammingError'}
2017-10-18 18:59:14,019 INFO: Scheduler started [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:574]
2017-10-18 18:59:14,019 INFO: Scheduler has been shut down [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:606]
2017-10-18 18:59:14,120 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-10-18 18:59:15,979 INFO: Started thread pool with 25 core threads and 30 maximum threads [in build/bdist.linux-x86_64/egg/apscheduler/threadpool.py:52]
2017-10-18 18:59:16,267 INFO: Adding job tentatively -- it will be properly scheduled when the scheduler starts [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:287]
2017-10-18 18:59:16,267 INFO: Added job "_clear_old_exceptions (trigger: cron[hour='3', minute='0'], next run at: 2017-10-19 03:00:00)" to job store "default" [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:262]
2017-10-18 18:59:16,268 INFO: Scheduler started [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:574]

To summarize stoping the ufw service resolved the issue.

Woa.  Are you using any custom ufw configuration or just stock Ubuntu?

Closing issue as a workaround has been found.  Not sure that SM can do anything for this issue.  First I've heard of it.

@monkeysecurity  my instances are behind a VPN and VPC so the ubuntu instance ufw service was completely stopped to resolve the issue.


Some 64-bit milliseconds tick values were not migrated to 32-bit

It would appear at some time in the past (I believe here), the portable API was changed from 64-bit millisecond ticks to 32-bit milliseconds ticks. In general, this was migrated successfully. However, there are still a number of 64-bit millisecond time values which would more correctly be 32-bit values, since that matches the portable API's type. None of these included here strictly cause issues, but they are confusing and their use could conceivably lead to issues with misuse in the future. See attached patch.
I may have missed some uses; perhaps a more thorough review is in order.

Agreed: I was aware of this but it is kind of a ticklish thing to change, need to check each one to make sure we're not introducing a new problem.  Thanks for the ones you've spotted here, what I will do is search the codebase for int64_t variables and sift through them to see if there are any more to be had, then we will have to check each one.
I had wondered if there is an argument for creating a macro which performs the compare "safely", and which would fall-through if the tick wraps, though the macro would need to be named very well in order that the person writing the code knows how it will behave, since the macro is now hiding the truth.
Anyway, maybe we can discuss this later.

As discussed, I have created a branch which integrates your proposed fixes and also introduces a pair of macros, U_PORT_TICK_TIME_EXPIRED_OR_WRAP_MS() and U_PORT_TICK_TIME_BEYOND_STOP_OR_WRAP_MS(); the macros are used where timeouts are checked throughout the code so as to ensure the wrap case (which should cause both macros to return true) is handled.
You can find a preview of the branch here:
https://github.com/u-blox/ubxlib/tree/preview_fix_tick_wrap_rmea
Note that this has NOT BEEN tested properly yet, since a key part of our test system is down.  The test system should be fixed on Monday, at which point I can begin running proper tests.  Obviously with such a wide change I'm concerned that I've typed in something wrong, maybe got the sense of a check upside-down: please, if you have the time, give it a thorough review.
All feedback welcomed.

If I may ask - why use a macro for the tick comparison functions instead of a static inline style header function? I notice they both have explicit casts to uint32_t. These suppress the compiler warnings for implicit integer conversion. If you're concerned with the types, a static inline style function would enforce the type more naturally and (if memory serves correctly) also issue a warning if the implicit integer conversion warning is turned on in the compiler.

Hi: only because static inline is, IIRC, a request to the compiler, not an instruction, so it cannot be guaranteed.  Though the macro doesn't enforce type-checking, casting does.

But I could go either way of course, just seems a bit more "embedded" to use a macro.

Hi: only because static inline is, IIRC, a request to the compiler, not an instruction, so it cannot be guaranteed. Though the macro doesn't enforce type-checking, casting does enforce the type used.

This is largely true. The nuance is complicated but I'm so used to always having optimization turned on. For the three primary arm targeting c compilers (gcc, clang, and armcc), with any level of optimization static inline is always respected, since the internal linkage of the function allows the compiler to avoid emitting an out-of-line version. I believe gcc (which is what I use most often) tends to still emit an out-of-line version when compiled with -O0.
All three compilers do support the __attribute__((always_inline)) (gcc, clang, armcc) syntax for forcing functions inline, though I think this can sometimes tie the compiler's hands in -Os which may prefer to emit an out of line version for the code reuse benefits. Generally I prefer to trust the compiler in that case.
I generally live on -O1, -Og, or -Os. In my experience with gcc, all of them will pick up the hint correctly and avoid emitting an out-of-line version when unnecessary. I also find that an attached debugger will better follow the code path of the inline function, allowing easier line steps through it, while a macro can only be stepped over or instruction stepped. I'm just being an evangelist for header delcared static inline functions; I don't think using a macro is strictly a problem. The names are a bit long though; maybe uPortTickTimeMsExpired() and uPortTickTimeMsPastStop() would be less cumbersome.

OK, I can be persuaded to go for static inline, though, personal, preference again of course, I would prefer to leave the "on wrap" part in the function name; we are doing this to point out to the caller that the function will return true at wrap as well as on expiry or past stop. Otherwise the developer might just do a compare to avoid this stupidly inefficient function call that just, after all, compares two numbers.

You're welcome to name it whatever you want; it's not my codebase after all. I have a different perspective on things again so I'll share for posterity.
Wrapping Schmapping
The thing is, it's not that it returns true if the value(s) has/have wrapped. It returns true if the time has expired or is past stop. The caller shouldn't need to know or even think about the wrap around that occurs around INT32_MAX. I think what you're implying is actually further from the right behavior, suggesting that if either value has wrapped past this point the function will return true. That would be a different buggy behavior compared to handling the wrap around correctly.
If there's any caveats to list, it would be that this is only valid within the range (INT32_MIN, INT32_MAX ) relative to the current time. Otherwise, the math will correctly handle the timeouts presented. I generally just list these as a @note field in the doxygen comment.
What's in a Millisecond
This can be nice to have in the signature, but truthfully it doesn't matter what unit the int32_t values have. The math is the same either way. Hence, I dropped them. In ubxlib's case there's only milliseconds ticks values as far as I can see. It's more important that the two values are both the same base unit, and no change to the function signature can really enforce that in C without a more complicated structure or timing system. In my opinion, it's not really worth it.

On a different evangelism note, static inline functions tend to show up in the call graph during static analysis. Some tools will not pick up the macro as part of the call graph. That can be handy some times when working with automated coverage and analysis tools, but as far as working with the code I still mostly rely on a text search myself so it doesn't really matter.

We make ubxlib as source code with the primary intention that it is understandable/absorbable by customers; your opinion carries more weight than mine/ours, so we will follow your pattern. I am testing the revised now changes, will post here shortly.
My concern remains that I have got a comparison the wrong way around somewhere in this relatively broad change; I will merge the change when you have confirmed when you are happy that has not happened.

Branch is now updated with the new form, do let me know when you're happy with it and I will merge it to master here and delete the preview branch some time after that.

Been looking at this again trying to resolve issues running ubxlib past INT32_MAX rollover. Had the following comments:

The keep going callback in u_device_private_cell.c is still broken. We both missed this one.
I misunderstood that your expiry function calls uPortGetTickTimeMs() under the hood, and therefore is only compatible with milliseconds values. I had assumed that you passed in the return value from uPortGetTickTimeMs() into the elapsed functions. Given that context, it makes more sense for the unit to be in there. My mistake.
For the static inline to compile as I described, the function body needs to be in the header, not in a separate compilation unit. Just as a random example plucked out of thin air, this style is what I'm thinking of.

Unfortunately, I don't really have a great way of pulling this down and testing it at the moment. Our fork diverged way back at 1.2.0; not sure what the executive decision will be on updating.

The keep going callback in u_device_private_cell.c is still broken. We both missed this one.

Ooo, well spotted, will fix.

Given that context, it makes more sense for the unit to be in there.

Understood, will modify in next revision.

For the static inline to compile as I described, the function body needs to be in the header.

Interesting, hadn't appreciated that but it does seem to be the case.  Will modify.

Our fork diverged way back at 1.2.0; not sure what the executive decision will be on updating.

Well I guess you could apply the changes manually to places you know/care about; with the exception of the one you spotted above they were reasonably easy to search for.  Either way the result will require a careful review.

Changes now applied to the preview branch, see here:
https://github.com/u-blox/ubxlib/tree/preview_fix_tick_wrap_rmea
Thanks again for the feedback.  I'm not going to merge this change into master here until you are happy with it, of course, so let me know how it goes.

So we've made progress on handling the INT32_MAX wrap around point. However, there are still rough edges to consider. Code which immediately captures a start time and then retries for some timeout do not suffer from this next issue, but ones that revisit a potentially much earlier set start time do. For example, consider the code which enforces a 1 second gap between CFUN commands in registerNetwork().
https://github.com/u-blox/ubxlib/blob/3cf5348e22fddd185f878eea49e3bb7526cccdf7/cell/src/u_cell_net.c#L1243-L1248
What if it's been more than INT32_MAX ticks since the last CFUN command was issued? This while loop will end up waiting as much as INT32_MAX + U_CELL_PRIVATE_AT_CFUN_FLIP_DELAY_SECONDS * 1000 milliseconds. This is much longer than the expected worst case timeout. The issue here is that the current comparison (and indeed all using the newly introduced port API functions) maps half of the integer space (red and yellow below) as within the timeout period instead of just the timeout period (yellow only below).

There are a couple of different approaches to solving this sort of problem. The first is to explicitly check for values in that range. With the current code that would look like a timeout implementation below:
static U_INLINE bool uPortTickTimeExpiredMs(int32_t startTimeMs,
                                            int32_t timeoutMs)
{
    int32_t delta = uPortGetTickTimeMs() - startTimeMs;
    return (delta > timeoutMs) || (delta < 0);
}

The second way this is often resolved is to just used unsigned math for expiration values, since the negative values we had to explicitly check for before are simply large values which will always exceed the timeout. Both of these approaches map only the yellow area above and below as within the timeout value. This more tightly bounds the potential waiting time to the potential timeout window anyways, so worst case the check will result in the timeout to be observed in code.

If that's not sufficient, the only way is to maintain these timeout values, essentially checking that they are within the expected value and bringing them within range or invalidating them every 2^31 ticks. This is a lot of complexity and overhead and generally it's acceptable to have the application wait up to the specified timeout anyways in the exceedingly rare case this occurs.
Note that a similar relationship is true with the current state of the comparisons for "stop" values instead of "start" values with a timeout. These map stopTimeMs - INT32_MAX to "not yet timed out", just like startTimeMs + timeoutMs - INT32_MAX.
I'm curious if there was a reason the portable layer chose int32_t instead of uint32_t. At least in STM32Cube land both HAL and FreeRTOS os ticks are both unsigned numbers.
An additional spot we have identified this style of is issue is below:
https://github.com/u-blox/ubxlib/blob/a2d986e2944141176eedaee6dc4be87be7eea57b/cell/src/u_cell_sock.c#L2003-L2006

Another potential source of issues worth revisiting is the use of 0 or -1 to indicate unset or invalid times. This works when it is used for optionally set timeout values, such as the AT client's atTimeoutSavedMs member. However, it doesn't work well for start times, like startTimeMs in the cell instance structure. The local keep going callback in the cellular network code will fail to abort a failing connection if startTimeMs is a negative tick value as a result of a check for this "unset" value that it is returned to.
https://github.com/u-blox/ubxlib/blob/3cf5348e22fddd185f878eea49e3bb7526cccdf7/cell/src/u_cell_net.c#L751-L755
This check has to be removed to prevent immediate timeout in these cases. The good news on this one is that, currently, there does not seem to be a code path which calls this without first setting startTimeMs so a bug from an unset value does not seem to be an issue. In our application this has yet to cause a problem because we only call through uNetworkInterfaceUp() and uNetworkInterfaceDown() which passes in the keepGoingCallback() in u_network_private_cell.h.

All good stuff, give me a little time to process...

@warasilapm: have been discussing with Michael today, hope to have next revision tomorrow.

@mazgch has made initial comments on the branch (thanks Michael).  I have addressed these, I think, but it was getting quite difficult for Michael to view (the baseline for the current preview branch is also pretty old now) so I have (a) deleted the old preview branch, (b) created a new branch preview_fix_tick_wrap_2_rmea and (c), in order to make commenting hopefully easier, I have made this branch a PR to this repo (rather than our internal development repo).  I won't merge this PR, it will only be for comments.

@warasilapm: in the hope that it will enable you to comment directly on https://github.com/u-blox/ubxlib/pull/225 I have sent you an invitation to this repo as a read-only collaborator.  Or you can also just comment here of course.

@RobMeades As far as I know, I can comment on PRs and submit code review on PRs in public repositories. I just can't be used as an "approving" review for the purposes of code review requirements, etc. As such, I have declined the invitation for now; if there are other features you need me to have access for in the future I'll let you know.
I'll still take a look at the changes in #225 as I am able.

If memory serves, you should even be able to request review from me on the PR without me as a collaborator.

Unfortunately typing your Github ID doesn't seem to resolve:

@warasilapm: I understand from separate e-mail communication that you cannot use a new release of ubxlib in your product, whatever is proposed in the very fruitful discussions we have had here.  I had planned to wait until you were happy with the changes but maybe that is not good use of your time, or at least not something you would be able to prioritise?  If that is the case, let me know and we will continue with our internal review process; the changes have already been tested, but of course, given the statistical nature of these things, can be tested further, I just didn't want to head down that route if you disagreed with the direction.
Please advise.

@RobMeades Did you develop a test case where the tick value is initialized close to the 2^31 and 2^32 rollover values?

Yes, we do this on test instance 23 (where ubxlib happens to be running on Windows) which has a SARA-R5, NINA-W15 and M8 module attached, and also runs out of coverage tests.  It is running with U_CFG_TEST_TIMEOUT_SPEED_UP=14, so a multiplier of 2^14: time should wrap roughly every 4 minutes.  This is about as fast as we can go without having a wrap that is within our largest timeout.

Okay sounds good! Just wanted to make sure that was being covered explicitly since that's the main advantage I could provide with testing on our application.

Got it: in that case I will wait until late Friday evening UK time before I go ahead with things on our side; there are reasons for me not to upset the applecart before then.

FYI, #225 is about to enter our internal review process; once it has passed that it should appear on master here, hopefully next week.  @warasilapm: still happy to receive any comments you may have, which I will feed into that process.

@warasilapm: the change has now passed testing, review, and is pushed to master here in commit 79e808eb8be3095b4f94efcffba97515ba1870bd.  Are you OK for me to close #207, #208 and #209 or is there more you would like to discuss?

I'm good to close the issues for now.


Front-end logs out unexpectedly -> 401 unauthorized

Describe the bug
The front-end very often receive a 401 unauthorized error and brings the user back to the login page. If the user, press back the app is still logged in and can continue his work.
We noticed that this would happen very frequently when memory was low. We scaled up the resources and now it happens less frequently but still quite often.
To Reproduce
Play around in the UI and at one point the UI will go back to the login page.
Screenshots
 Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/rest_framework/views.py", line 497, in dispatch
    self.initial(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/sentry_sdk/integrations/django/__init__.py", line 304, in sentry_patched_drf_initial
    return old_drf_initial(self, request, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/rest_framework/views.py", line 415, in initial
    self.check_permissions(request)
  File "/usr/local/lib/python3.10/dist-packages/rest_framework/views.py", line 333, in check_permissions
    self.permission_denied(
  File "/usr/local/lib/python3.10/dist-packages/rest_framework/views.py", line 174, in permission_denied
    raise exceptions.NotAuthenticated()
rest_framework.exceptions.NotAuthenticated: Authentication credentials were not provided.

Environment (please complete the following information):

OS: ubuntu
Label Studio Version 1.9.1.post0

Additional context
We use GCP cloudrun and use a gs:// storage.
It seems the session_id has changed between the last successful api call ( for example /projects/5). It seems it took the session_id of the /presign request.
It seems it occurs often after 429 Too Many Requests with the ingest.sentry.io/api/.../store/?sentry_key=... request.

Could this be related to this issue?

The problem was that I was not setting the SECRET_KEY env variable. So, when my services were scaling up, the new pods did not decode the cookie properly prompting re-authentication.

Glad you were able to get it fixed + appreciate you following up here so that others can benefit from your findings. Cheers! :beer:

@gbmarc1 Could you please tell what env you set exactly to fix this?

I managed to find out. Yes, you just set SECRET_KEY as is.
Here is the line in code, where this env is read.


adClickable and CTA parameters don't work when 2 VAST ad is loaded

1. adClickable
My adserver VAST url has an option to call 2 VAST sequentially num=2, but adClickable parameter doesn't work as expected even if it is set to true.
1. 1 Unexpected behavior
The first VAST video loaded is not clickable
Only the second VAST video loaded is clickable.
1. 2 Expected behavior
Both first and second VAST video be clickable.
2. CTA options
The same server to adCTAText, adCTATextPosition, adCTATextVast.  I can't see CTA text on videoplayer.
2. 1 Unexpected behavior
The CTA text is not be displayed on videoplayer
2. 2 Expected behavior
The CTA text is be displayed on videoplayer
Bellow is the code that I'm using:
function initFluidPlayer() {
        var myFP = fluidPlayer(
            'video-id', {
                "layoutControls": {
                    "controlBar": {
                        "autoHideTimeout": 1,
                        "animated": true,
                        "autoHide": true
                    },
                    "htmlOnPauseBlock": {
                        "html": "",
                        "height": null,
                        "width": null
                    },
                    "autoPlay": true,
                    "mute": false,
                    "allowTheatre": true,
                    "playPauseAnimation": false,
                    "playbackRateEnabled": false,
                    "allowDownload": false,
                    "playButtonShowing": false,
                    "fillToContainer": true,
                    "posterImage": "",
                    "primaryColor": "#324efd"
                },
                "vastOptions": {
                    "adList": [{
                        "roll": "preRoll",
                        "vastTag": "https://srv.aso1.net/vast?z=103985&num=2",
                        "adText": "Inscreva-se",
                        "adClickable": true,

                    }],
                    "adCTAText": "Inscreva-se!", // Default "Visit now!",
                    "adCTATextPosition": "bottom left", //Default 'bottom right’,
                    "adCTATextVast": true, // Enabled. To use the CTA text as provided in the VAST XML.

                }
            }
        );

Versions already tried
v3
v3.23.0
v.3.22.0

@callTx value pelo issue, I just checked it on my side and it is not working, I will raise an internal ticket and message you if there is any development.

@callTx The fix for this was released, can you confirm that it's working?

No answer from the reporter. Closing the ticket.


Label is replaced with filename when editing

When editing a resource that has a file selected instead of saying 'Thumbnail' or say 'Image' you get the file name and extension instead.

Yes. Thanks for the info. Will be fixed in the next release ;D


ORC-882: Remove hamcrest-core test dependency

What changes were proposed in this pull request?
This PR aims to remove hamcrest-core test dependency.
Why are the changes needed?
This was added at ORC-60 and is not used now.
$ git show 08b854425 | grep hamcrest
+      <groupId>org.hamcrest</groupId>
+      <artifactId>hamcrest-core</artifactId>
+        <groupId>org.hamcrest</groupId>
+        <artifactId>hamcrest-core</artifactId>

How was this patch tested?
Pass the CIs.
This closes #778 .

cc @pgaref and @williamhyun

Thank you so much, @williamhyun .
Merged to main/1.7.

Oh, very sorry, @williamhyun . During more testing, it seems that I only removed the direct dependency. Let me reconsider this. In the worst case, I'll inform here and revert my commit. Sorry for making you confused.