podman: adding dynamic port binding using slirp4netns API socket

I'm using podman version 1.1.0, and I'm writing a python script to run docker-compose.yml by creating a pod and launching containers inside it and connect them via --add-host
the following did not work
[alsadi@laptop ~]$ podman pod create --name=mypod
e322ef871af53914b36679362eec7e06ef6c6d6d9b46d5ca908df338ae8db0c4
[alsadi@laptop ~]$ podman run --pod=mypod -p 8080:80 -d busybox busybox httpd -f -p 80
Error: cannot set port bindings on an existing container network namespace

on the other hand the following works fine
[alsadi@laptop ~]$ podman run -p 8080:80 -d busybox busybox httpd -f -p 80

I found the following workaround
[alsadi@laptop ~]$ podman pod create -p 8080:80 -p 6379:6379 --name=mypod2
[alsadi@laptop ~]$ podman run --name=myhttpd --pod=mypod2 -d busybox busybox httpd -f -p 80
[alsadi@laptop ~]$ podman run --name=myredis --pod=mypod2 -d redis:alpine
[alsadi@laptop ~]$ podman exec -ti myhttpd sh -c 'echo "info" | nc localhost 6379'

Sorry, I can't help you on this, but could you share your Python script? This might be interesting to a huge amount of users. I didn't find it in your repository :(

I don't know if we want to do this dynamically (it might work for rootless, but wouldn't work when running as root, and I'd prefer not to let the two diverge too much), so I would prefer to make this require a pod restart (to pick up requested port mappings from other containers in the pod) - would that be unacceptable?

@mheon yes I agree.  We could probably do it for slirp4netns by contacting the socket API but I don't think it is a good idea to diverge from other kind of networks.

Sorry, I can't help you on this, but could you share your Python script?

sure, here it's: muayyad-alsadi/podman-compose.

I don't know if we want to do this dynamically

we can publish ports per container or per pod, I have too modes, I only need one of them to work
currently both do not work, because I can't --add-host per pod and I can't do -p per container.

what I did as rootless is:
$ podman pod create -p  8080 -n foo
$ podman run --pod foo alpine nc -l -p 8080

and it works, I could connect to the port assigned to the pod.
Doesn't that work for you?

@giuseppe  we need to run multiple containers on same pod, let's say two containers one is busybox
's "httpd -f -p 8080" and the other one is redis:alpine
what I want is to be able to call redis from inside busybox and busybox from redis (inter-container communication), and I need aliases in /etc/hosts for them
for example inside the busybox
echo "info" | nc redis 6379

and from inside redis, let's call busybox
wget http://myweb:8080/

@giuseppe please note it seems that the default in podman pod create is to share network with host
$ podman pod create --help
...
      --share string           A comma delimited list of kernel namespaces the pod will share (default "cgroup,ipc,net,uts")

That's indicating containers in the pod will share a network namespace with
each other, not with the host.
On Tue, Mar 5, 2019, 05:36 Muayyad Alsadi<EMAIL_ADDRESS>wrote:

@giuseppe https://github.com/giuseppe please note it seems that the
default in podman pod create is to share network with host
$ podman pod create --help
...
--share string           A comma delimited list of kernel namespaces the pod will share (default "cgroup,ipc,net,uts")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/issues/2503#issuecomment-469630419,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHYHCM808ZT9PXlwXIF-kIJundH-Qvdwks5vTki8gaJpZM4ba_X0
.

@giuseppe we need to run multiple containers on same pod, let's say two containers one is busybox
's "httpd -f -p 8080" and the other one is redis:alpine
what I want is to be able to call redis from inside busybox and busybox from redis (inter-container communication), and I need aliases in /etc/hosts for them
for example inside the busybox
echo "info" | nc redis 6379

and from inside redis, let's call busybox
wget http://myweb:8080/

they share the same network namespace, doesn't <IP_ADDRESS>:8080 work?

More than that - they're sharing a network namespace, so they all share a single IP. There's no need for hosts entries?

yes, but I want to run docker-compose.yml unmodified and containers expect to talk via service alias, I added an alias for service that points to <IP_ADDRESS> please see my other ticket #2504  for details.

That's indicating containers in the pod will share a network namespace with each other, not with the host.

I tried both the defaults and many combinations and nothing worked.

@muayyad-alsadi Did you have success on this in the meanwhile?

yes, I've two working ways, one of them 1podfw which passes -p to podman pod create
the other working one is cntnet
https://github.com/muayyad-alsadi/podman-compose

@muayyad-alsadi Very nice, I'll test them soon!

@tobwen @muayyad-alsadi What is the latest on this.   Can I close this issue?

@rhatdan I don't know, In podman-compose, I'm using podman pod create -p 80:8080 -p ...  all at once, instead of per-containers -p.

@giuseppe @AkihiroSuda WDYT?

I think we can close the issue.  Dynamic port binding is out of the scope for Podman (even if it is possible in slirp4netns)


Obfuscated/Vanishing Gradient Detection

Description
This pull request add the is_obfuscated() function to the abstract classifier class. Given a set of samples x and a set of labels y, the function will return a three boolean triple for each sample. Each value in the triple indicates if the loss gradient with respect to the sample is:

All zero
Contains NaN
Contains Inf

This change is intended to provide users easy access to check if the classifier has obfuscated gradients, which can break some whitebox attacks and result in users observing an artificially high adversarial robustness.
This function can also be used by the existing evasion attacks to check for zero gradients during the attack and issue a warning to the user rather than silently failing the attack and returning the original input sample.
Fixes #368
Type of change
Please check all relevant options.

[ ] Bug fix (non-breaking)
[X] New feature (non-breaking)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Testing
Simple local tests where 2 models were trained using the TFClassifier and then the new function was called against each model. One model had a normal gradient and one model had an obfuscated gradient.
Checklist

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code
[ ] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[] New and existing unit tests pass locally with my changes

Going to make a new request from a different branch


python310Packages.pytautulli: 23.1.0 -> 23.1.1

Diff: https://github.com/ludeeus/pytautulli/compare/refs/tags/23.1.0...23.1.1
Changelog: https://github.com/ludeeus/pytautulli/releases/tag/23.1.1
Description of changes

Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 213542 run on x86_64-linux 1

3 packages built:

home-assistant-component-tests.tautulli
python310Packages.pytautulli
python311Packages.pytautulli

Result of nixpkgs-review pr 213542 run on x86_64-linux 1

3 packages built:

home-assistant-component-tests.tautulli
python310Packages.pytautulli
python311Packages.pytautulli


Fix getimagesizefromstring() says Read error!

If the file has read error when getting the dimension, then catch the error, and don't write out the dimensions.
Summary of the change:
Catch the getimagesizefromstring() error.

Good job! @krokovicsmate
Could you make an example? I've tested out and couldn't find any errors while using this function

@mafftor When i open a big folder (~13000 image), some jpeg image is make an error. Not sure why the function cant read it, maybe it was a renamed file (png to jpg or something like this) i don't know, but it was fails.

Thanks a lot!
*Merged


Corporate Console: View CLA Manager For  popup is still displayed when navigated back to All Companies page in the browser

Background

Launch Corporate Console

Login as CLA Manager

Click on a Company which has Pending whitelists

Click on View Manager

View CLA Manager For  popup is displayed

Navigate back in the browser

Observed that View CLA Manager For  popup is still displayed

Verified that View CLA Manager popup is closed when clicked on back button in browser


Spread of Record<T> into a model

Taking this from this issue which was about intersecting a model with a Record https://github.com/microsoft/typespec/issues/1649
Should this be allowed?
model FOo {
 i: int32;
 ...Record<string>;
}

Playground showing current behaviors
There is also some question on what does it change if we implement this proposal where ... would allow to override previous properties https://github.com/microsoft/typespec/issues/1292 Does doing i: int32, ...Record<string> basically erase the i property.

I think it should not be allowed. The only time it makes sense is if it's the first item in the model and there is only one, but at that point why not use is. From a bit of a deeper perspective, spread works on concrete properties, and I would be surprised if spreading something with an indexer on the property container brought along the indexer. It feels akin to bringing along decorators on the container, to me.

The issue is we then have this difference in behavior between Record<string> & { i: int32} which works and has a property that i that is an int32 and the rest string but you can't have a named model for that.

More support for a declare keyword?

Also, I'm not entirely sure it makes sense for is to validate the indexer constraint? It makes sense to do so for extends which is a subtyping operation, but is doesn't have to result in subtypes. I suppose similar logic could argue for overriding properties with whatever type, something I know we discussed allowing at one point (and probably rejected for good reasons I'm forgetting).

I believe it is because typescript doesn't allow it

and same without extends

And intersection does the same as we have now I believe

Yeah, I also found typescript can't express with different types between the known properties and additional properties.
and the original ask is from an external customer https://github.com/Azure/autorest.typescript/issues/1940#issuecomment-1657373691

My concern is if typescript can not express this, I don't know how other languages could possibly do that. so it may turn out to be a feature none of the SDK emitters can support :(

Replying to past Brian, who was wrong:

I think it should not be allowed. The only time it makes sense is if it's the first item in the model and there is only one, but at that point why not use is.

Spreading multiple things can make conceptual sense (e.g. by unioning the index type), though it's unclear how useful this is in real APIs.
is presently creates a subtype constraint, so doesn't allow declared properties to exist that aren't assignable to the index type, which doesn't help certain scenarios where known properties can be of any type but additional properties must have a specific type. If is didn't validate the index constraint, then sure, you could use is. But this isn't a very strong argument against making spread do the expected thing.

From a bit of a deeper perspective, spread works on concrete properties, and I would be surprised if spreading something with an indexer on the property container brought along the indexer. It feels akin to bringing along decorators on the container, to me.

Spread works on properties period, the fact that a set of properties is unbounded doesn't mean they are not properties. Indexer is an implementation detail of how to represent this unbounded set of properties.

Record<T> and additional properties
Current behavior
Today you can specify type for properties on a model via is or extends of a Record
model WithIs is Record<string> {
  string: string;

  nonString: int32;
             ^ error int32 is not assignable to string
}

model WithExtends extends Record<string> {
  string: string;

  nonString: int32;
             ^ error int32 is not assignable to string
}

Additionally you can use intersection to get some behavior that is similar to what we want in this proposal but as we'll see later should actually be an error.
// This one is good and is similar-ish to `is Record<string>` it would be different if `Record<T>` had annotations on it.
alias MergedGood = Record<string> & {name: string};

// This one works today but what it should really mean is that `name` is the intersection of `int32` and `string` which is `never`
alias MergedBad = Record<int32> & {name: string};

Spreading Record<T>: This today doesn't fail at the compiler level but the record information is lost
model WithSpread {
  name: string;
  age: int32;
  ...Record<string>;
}

Proposal
1. Make & intersection actually mean intersection of properties
This means the following code should either be an error because we cannot intersect string and int32(what we do if you intersect explicitly) or the compiler needs to resolve the type of name to be never(What typescript does)
alias MergedBad = Record<int32> & {name: string};

2. Allow spreading Record<T>
This would make & and ... meaning diverge:

& would mean intersection of types(as described above) and so would merge the properties and if types are not able to be merged it would be an error/resolve to never
... would mean spread the properties and so would add extra properties. This means if you spread extra properties then those get added, if properties name conflict then it is an error. If you spread a Record, it describe the remaining properties.

model WithSpread {
  name: string;
  age: int32;
  ...Record<string>;
}

The code above would mean you have a model with a property name of type string, a property age of type int32 and any other property of type string.
Multiple ...Record<T>
As ... allows multiple instance in the same model it is possible to have multiple ...Record<T> in the same model. This would mean that each ...Record<T> would be a union of each other.
If you spread Record<string> and Record<int32> it means all extra properties could either be a string or int32. You are basically saying I am spreading some string properties and some int32 properties.
model WithSpread {
  name: string;
  enabled: boolean;
  ...Record<string>;
  ...Record<itn32>;
}

// is equivalent to
model WithSpread {
  name: string;
  enabled: boolean;
  ...Record<int32 | string>;
}

Difference with is Record<T>(or extends Record<T>)
model Foo is Record<T> will be defining the indexer for Foo which means all properties added to Foo must be of type T. This also means that Foo can be used when a constraints of type Record<T> is needed.
However when spreading Record<T> it will not be setting the indexer as some properties could technically be of a different type.
model Template<T extends Record<string>> {t: T}

model WithSpread {
  age: int32;
  ...Record<string>;
}
model WithIs is Record<string> {
  string: string;

}

model Test {
  good: Template<Record<string>>;
  goodWithIs: Template<WithIs>;
  bad: Template<WithSpread>;
        ^ error WithSpread is not assignable to Record<string>
}

Technically having this would also pass the constraint above as all the extra properties are also assignable to the constraint.

```tsp
model WithSpread {
  name: string;
  ...Record<string>;
}

is or extends a model with ... Record<T>
At this point it should be an error if you try to define a property that is incompatible with the base model spread indexer.

@timotheeguerin is Multiple ...Record<T> a valid scenario? It is equivalent to Unknow if it supports multiple T.

This was talked with the brainstorming design meeting yersteday and it feels like we should allow it. Design above explain what is means. This is just a proposal though, we might not allow it later.

implementation in #2785


now  polygon donot support callback,why?

:exclamation: Please use the community forum for asking questions about how to use Cesium and best practices. The core Cesium team actively monitors the forum and we love seeing what people are working on! :exclamation:

Please post your question in the community forum (https://community.cesium.com/) with some more information, like what you're trying to achieve and a code example.


fmt_latest: init at 9.0.0

Description of changes

upstream release with new features and many bugfixes
fix for the homepage (was a http-only server which redirects to the current homepage)

Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[X] Fits CONTRIBUTING.md.

Hmm, creating seperate attribute paths for all new releases doesn't seem the greatest. It was originally done for version 8 as many packages broke with the update, but (AFAIK?) that shouldn't be the case with this update.
The packages still using version 7 should get updated to the latest, so that we can remove it.
For now I suppose this is fine, maybe we should also introduce a temporary fmt_latest attribute which we can switch other packages to?

Thanks for the comment. I updated the commit as per your suggestion to fmt_latest.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

fmt_latest

I tried also fmt_8 -> fmt_latest and did a nixpkgs-review, but many packages would become broken (it may look similar for fmt_7). So I think it must be done gradually and per package:
3 packages marked as broken and skipped:
libsForQt512.plasma-vault libsForQt514.plasma-vault lizardfs

51 packages failed to build:
contour cryfs gerbera gnss-sdr gnuradio gnuradioMinimal gnuradio3_9Packages.gnuradio hal-hardware-analyzer irods irods-icommands kodi kodi-gbm kodi-wayland kodiPackages.a4ksubtitles kodiPackages.archive_tool kodiPackages.iagl kodiPackages.inputstream-adaptive kodiPackages.inputstream-ffmpegdirect kodiPackages.inputstream-rtmp kodiPackages.invidious kodiPackages.joystick kodiPackages.kodi-platform kodiPackages.libretro kodiPackages.libretro-genplus kodiPackages.libretro-mgba kodiPackages.libretro-snes9x kodiPackages.netflix kodiPackages.pvr-hdhomerun kodiPackages.pvr-hts kodiPackages.pvr-iptvsimple kodiPackages.steam-controller kodiPackages.vfs-libarchive kodiPackages.vfs-sftp libsForQt5.plasma-vault openroad python310Packages.qiskit python310Packages.qiskit-aer python310Packages.qiskit-finance python310Packages.qiskit-ibmq-provider python310Packages.qiskit-ignis python310Packages.qiskit-nature python310Packages.qiskit-optimization python39Packages.qiskit python39Packages.qiskit-aer python39Packages.qiskit-finance python39Packages.qiskit-ibmq-provider python39Packages.qiskit-ignis python39Packages.qiskit-nature python39Packages.qiskit-optimization vowpal-wabbit waybar

27 packages built:
ananicy-cpp bear cherrytree coeurl dwarfs easyeffects far2l fmt_latest folly furnace mariadb_107 mariadb_108 micromamba mtxclient nheko nrfutil pc-ble-driver pynitrokey python310Packages.pc-ble-driver-py python310Packages.vowpalwabbit python39Packages.pc-ble-driver-py python39Packages.vowpalwabbit spdlog wasmedge wdt yuzu-early-access yuzu-mainline

Should fmt_latest and the possible bumps fmt_x -> fmt_latest in various packages be backported to 22.05?

What about adding fmt_9 and then at some point do fmt = fmt_9?

Ok, now I'm trying to satisfy both sides: I reintroduced fmt_9 and made an fmt_latest = fmt_9 alias.
New packages can start using fmt_latest. Then later, someone makes a new PR for

going through all packages with fmt and pin them in .overrides to fmt = fmt_(7|8|9|latest) (similar to #89731)
point fmt = fmt_(9|latest) in all-packages.nix
remove fmt_latest and replace every usage with fmt or remove the override


Error when value has $

The output:
[SEVERE] envied_generator:envied on lib/configs/environment.dart:

Could not format because the source could not be parsed:

line 11, column 50 of .: Expected an identifier.
   ╷
11 │ static const String dbPassword = 'somestringwith$';
   │                                                  ^
   ╵
[INFO] Running build completed, took 62ms
[INFO] Caching finalized dependency graph completed, took 33ms
[SEVERE] Failed after 99ms

but when i change it to somestringwith\$, it worked.

Hi @azliR
Can you please clarify if the value you have in your .env file contains a $ in it, i.e.
DB_PASSWORD=somestring$

?

@azliR can you please test with this PR #95

Hi @azliR
Can you please clarify if the value you have in your .env file contains a $ in it, i.e.
DB_PASSWORD=somestring$

and when you change it to
DB_PASSWORD=somestring\$

it worked?

Yess

@azliR can you please test with this PR #95
dependency_overrides:
  envied:
    git:
      url: https://github.com/petercinibulk/envied
      ref: 83466c8679cdbbc135f1d9802410764cf283f6ed
      path: packages/envied/
  envied_generator:
    git:
      url: https://github.com/petercinibulk/envied
      ref: 83466c8679cdbbc135f1d9802410764cf283f6ed
      path: packages/envied_generator/

Sure! Give me a minute

I don't know why it said success, but the env.g.dart is not generated.

Did you follow the directions in the PR description?

Yes, both with @EnviedField(rawString: true) and @Envied(rawStrings: true)

What if you try using the branch as the ref, i.e.
dependency_overrides:
  envied:
    git:
      url: https://github.com/petercinibulk/envied
      ref: fix/issue-94-raw-strings
      path: packages/envied/
  envied_generator:
    git:
      url: https://github.com/petercinibulk/envied
      ref: fix/issue-94-raw-strings
      path: packages/envied_generator/

I don't know why it said success, but the env.g.dart is not generated.

I think you might need to clean your build beforehand.

What if you try using the branch as the ref, i.e.
dependency_overrides:
  envied:
    git:
      url: https://github.com/petercinibulk/envied
      ref: fix/issue-94-raw-strings
      path: packages/envied/
  envied_generator:
    git:
      url: https://github.com/petercinibulk/envied
      ref: fix/issue-94-raw-strings
      path: packages/envied_generator/

I don't know why it said success, but the env.g.dart is not generated.

I think you might need to clean your build beforehand.

Sorry, just got time to try again, I did those but sadly it still not generate anything

Sorry, just got time to try again, I did those but sadly it still not generate anything

That doesn't make sense as all the PR does is add raw to the literalString.

Sorry, just got time to try again, I did those but sadly it still not generate anything

That doesn't make sense as all the PR does is add raw to the literalString call.

Yess

Also, can you please clone PR #95 and try to do
cd envied/examples/envied_example
dart pub get
dart run build_runner clean
dart run build_runner build --delete-conflicting-outputs

Does it produce all the *.g.dart files?
Sure, in a minute

I tried #95 and it worked! I really don't know why it doesn't with my current project. Unfortunately I can't share the source code for my project. for you to try it.

There might be something wrong with your setup. Check https://github.com/petercinibulk/envied/issues/90 and https://github.com/petercinibulk/envied/issues/89 and see if you have the same issues.

Also, one thing to note is that at the moment any $foo will be interpolated as a bash var. I'm, looking into disabling that when a user specifies rawString.

@azliR I have added 2 new annotations to #95
@Envied(intepolate: false)
class Env {
  static const String? foo;
}

@EnviedField(interpolate: false)
static const String? foo;

It's there to disable $BASH_VAR interpolation so that a string like foo$bar%baz won't have $bar interpolated.
It should be used in conjunction with rawString if you plan on using any chars that might cause exceptions.
@EnviedField(rawString: true, interpolate: false)
static const String? testUnescapedString = null;

@techouse
cc: @azliR
Same issue happen with hash-tag (ie #)
Eg
DB_PASSWORD=somestring$abcd#random
Output :-  "somestring$abcd"

Expected: "somestring$abcd#random"

Not sure a # will be allowed like that. You'll probably have to wrap your string in single quotes.

@techouse
tried using single quote but it's not seems to be desirable solution.
Getting this
Bad state: Pattern matching error


Fix missing variables

My previous change filtered out some basic variables like id and playbook_id.

+1

+1


If sails is already loaded, do not load again

This allows sails-migrations to be used within sails itself.  It checks to see if sails is already loaded.  If so, it does not do it again.
Then it is possible use sails-migrations directly to report on status and currentVersion from a Controller.
In the following example I also have the ability to migrate and roll back, but I realize you may not want to do that here, unless bootstrapping an application through a web interface.
/**
 * MigrateController
 *
 * @description :: Server-side logic for managing knex migrations
 * @help        :: See http://sailsjs.org/#!/documentation/concepts/Controllers
 */

var vm = require('vm');
var sailsMigrations = require('sails-migrations');

module.exports = {

  latest: function(req,res,next) {
    return sailsMigrations.migrate()
    .spread(function (batchNo, log) {
      if (log.length === 0) {
        res.json({
          message: 'Already up to date'
        });
      }
      else {
        res.json({
          message: 'Batch ' + batchNo + ' run: ' + log.length,
          migrations: log
        });
      }
    })
    .catch(next);
  },

  rollback: function(req,res,next) {
    return sailsMigrations.rollback()
    .spread(function (batchNo, log) {
      if (log.length === 0) {
        res.json({
          message: 'Already at the base migration'
        });
      }
      else {
        res.json({
          message: 'Batch ' + batchNo + ' rolled back: ' + log.length,
          migrations: log
        });
      }
    })
    .catch(next);
  },

  currentVersion: function(req,res,next) {
    return sailsMigrations.currentVersion()
    .then(function (version) {
      res.json({
        version: version
      });
    })
    .catch(next);
  },

  status: function(req,res,next) {
    return sailsMigrations.status()
    .spread(function (all,completed) {
      all = all || [];
      completed = completed || [];

      res.json({
        all: all,
        completed: completed
      });
    })
    .catch(next);
  }

};

@kmcgrath Are you sure that the options don't have to be set?

@mikermcneil Maybe you can advise me on this one :) It looks good to me, but you probably know better.

@RWOverdijk options are set only if sails is not loaded, which still happens here.  If sails has been loaded they should already have been set.  Does that address your question?

@kmcgrath Almost! I just wonder if migrations perhaps needs some settings that the running instance perhaps doesn't have

@kmcgrath Is this PR still relevant to you?

It is.  We use this to provide an admin interface that can be used to see migration status as well as bootstrap new applications through a web interface/API.

To me this PR makes sense. I haven't tested it yet, so I should. Have you tested this with and without running it yourself? If so, could you perhaps tell me how you tested it? This lib needs more tests, I'm aware of that.

We have a DevOps team running it in production for an internal application.  I'm actually not on that project anymore but I help out when needed.  I can try to get one of them on this PR, if needed.

@kmcgrath Seeing how this is a tool used in production by multiple people, I'd very much like that yes. Better safe than sorry. :)

@kmcgrath Would you mind rebasing this? I just merged the other PR, which conflicts with this one.

Sorry for the multiple commits we had a branch with two already merged.  I resolved then merged with that one.
It boils down to one condition statement that checks for sails.hooks.  If that exists then it does not run sails.load because it is already loaded.


sanitycheck: build faster by distributing load

Job one builds documentation and does other checks, so distribute load
by moving another architecture to the second build job.
Signed-off-by: Anas Nashif<EMAIL_ADDRESS>

Don't you need to update matrix?

want to use the matrix values for the long daily run and just override the modification for the PR builds. more patches to follow

just noticed I pushed the branch to the main repo by mistake


Doesn't Compile

On this page of the docs there is a "try it in remix" link:
https://docs.chain.link/docs/intermediates-tutorial/
However, the project does not even compile. Many warnings and an error preventing it from compiling:
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> @chainlink/contracts/src/v0.8/ConfirmedOwnerWithProposal.sol

Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.7;"
--> @chainlink/contracts/src/v0.8/ConfirmedOwnerWithProposal.sol

Warning: This declaration shadows an existing declaration.
--> docs.chain.link/samples/VRF/VRFD20.sol:37:55:
|
37 | constructor(address vrfCoordinator, address link, bytes32 keyHash, uint256 fee)
| ^^^^^^^^^^^^^^^
Note: The shadowed declaration is here:
--> docs.chain.link/samples/VRF/VRFD20.sol:118:5:
|
118 | function keyHash() public view returns (bytes32) {
| ^ (Relevant source part starts here and spans across multiple lines).

Warning: This declaration shadows an existing declaration.
--> docs.chain.link/samples/VRF/VRFD20.sol:37:72:
|
37 | constructor(address vrfCoordinator, address link, bytes32 keyHash, uint256 fee)
| ^^^^^^^^^^^
Note: The shadowed declaration is here:
--> docs.chain.link/samples/VRF/VRFD20.sol:136:5:
|
136 | function fee() public view returns (uint256) {
| ^ (Relevant source part starts here and spans across multiple lines).

Warning: This declaration shadows an existing declaration.
--> docs.chain.link/samples/VRF/VRFD20.sol:109:25:
|
109 | function setKeyHash(bytes32 keyHash) public onlyOwner {
| ^^^^^^^^^^^^^^^
Note: The shadowed declaration is here:
--> docs.chain.link/samples/VRF/VRFD20.sol:118:5:
|
118 | function keyHash() public view returns (bytes32) {
| ^ (Relevant source part starts here and spans across multiple lines).

Warning: This declaration shadows an existing declaration.
--> docs.chain.link/samples/VRF/VRFD20.sol:127:21:
|
127 | function setFee(uint256 fee) public onlyOwner {
| ^^^^^^^^^^^
Note: The shadowed declaration is here:
--> docs.chain.link/samples/VRF/VRFD20.sol:136:5:
|
136 | function fee() public view returns (uint256) {
| ^ (Relevant source part starts here and spans across multiple lines).

DeclarationError: Identifier not found or not unique.
--> @chainlink/contracts/src/v0.8/ConfirmedOwner.sol:10:28:
|
10 | contract ConfirmedOwner is ConfirmedOwnerWithProposal {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

This seems to compile correctly. v0.8/ConfirmedOwner.sol doesn't seem to have changed. The warnings still show up, but the DeclarationError is not reproducible.


Tasks for PNNL Pilot

[x] Clone https://github.com/ActiveDataBio/ADB-User-Study into /frictionlessdata/ organization: https://github.com/frictionlessdata/ADB-User-Study
[x] Add GitHub hook for goodtables.io (done by @amercader)
[x] Add datapackage.json for /frictionlessdata/ADB-User-Study
[x] Show Good Tables errors against metadata.tsv
[x] Raise relevant issues against goodtables-py or goodtables.io
[x] Write up work to date

@danfowler can you add the relevant details here

Added write-up to IDCC paper.

@danfowler
bases on tasks it's done?

@roll Yes, thanks!


Building on mac fails. Fatal error: 'catch.hpp' file not found

Running make after setting up a build from makefile fails.
RxCpp/Rx/v2/test/test.cpp:11:10: fatal error: 'catch.hpp' file not found
#include "catch.hpp"
         ^
1 error generated.

Seems like I forgot to pull the submodule.
Running:
git submodule update --init --recursive

and then rerunning make seems to let the build continue.


Add configurable root

Add an option ACTIVE_URL_ROOT as a tuple for a reversable url.
("url_name", ("arg1", "..."), {"kwarg1": "..."})

Previously the homepage would highlighted all the time when i18n_patterns were enabled.

Hey, thanks for the idea, I'll refactor it for a bit.


[bug] shared instance of atlas results in race condition errorenous http responses

It appears that individual atlases instance (human, rat, mouse) are shared in the same process.
This could (and has) led to difficult to decipher bugs, such as regions returned are not the one that's requested, or (as I found out the hard way) datasets requested did not belong to the region(s) requested.
min repro:
use https://github.com/FZJ-INM1-BDA/siibra-api/tree/bug_minrepro (slightly modified to magnify the effect of network latency / multiple concurrent users)
#! /bin/bash

# works correctly:

curl http://localhost:5000/v1_0/atlases/juelich%2Fiav%2Fatlas%2Fv1.0.0%2F1/parcellations/minds%2Fcore%2Fparcellationatlas%2Fv1.0.0%2F94c1125b-b87e-45e4-901c-00daee7f2579/regions |
  jq '[.[].name]'

# expected output:
#[
#  "telencephalon",
#  "metencephalon"
#]

sleep 1

# does not work

curl http://localhost:5000/v1_0/atlases/juelich%2Fiav%2Fatlas%2Fv1.0.0%2F1/parcellations/minds%2Fcore%2Fparcellationatlas%2Fv1.0.0%2F94c1125b-b87e-45e4-901c-00daee7f2579/regions |
  jq '[.[].name]' & \
curl -o /dev/null \
  http://localhost:5000/v1_0/atlases/juelich%2Fiav%2Fatlas%2Fv1.0.0%2F1/parcellations/juelich%2Fiav%2Fatlas%2Fv1.0.0%2F6/regions

# actual output
# [
#   "Left Hemisphere",
#   "Right Hemisphere"
# ]

In the first fix I create a separate atlas for each request.
It seems to work.
@xgui3783 I tried your script and get now the expected value. Do you have more cases where you experienced the issue and can do some test?

I believe this issue is addressed. Thanks.


⚠ Bofrost.com has degraded performance

In 70e4284, Bofrost.com (https://www.bofrost.com) experienced degraded performance:

HTTP code: 200
Response time: 593 ms

Resolved: Bofrost.com performance has improved in dfd9eac after 6 minutes.


Building in PHP 7.2

Fixes broken 5.6 build by running project's PHPUnit version rather than Travis' version
Bumps PHPUnit version to one that works in PHP 7.2
Drops HipHop build
Adds builds for PHP 7.1 & 7.2

Fix https://github.com/zendframework/zend-stdlib/issues/88

It is already done on develop, but unfortunately it is not merged yet. See: https://github.com/zendframework/zend-stdlib/compare/develop

#87 does this and more, but is on develop as it removes support for HHVM.
Sorry I missed that during triage, @Sam-Burns !