tearDown does not delete the test data before to migrate back to latest

Let assume we want a migration to rather fail when the data is not correct (Ex: require human intervention to fix the data) and we want to test that.

We create test data
Call self.run_migration()
Migration throws exception
We catch the exception and validate the data migration had no effect, test succeeds so far (everything is fine so far)
Then teardown run and exception is thrown. Test fail.
Database is now in a bad state

The teardown of MigrationTest will run the migration again to restore the previous state of the migration which will fail since the test data will be still there.
The workaround is to do the teardown of the data ourself but it is impractical, I would assume MigrationTest would clear the test data before to roll the migrations.

That's true, and it's definitely a shame that this situation would upset all future tests.
However - in principle, at least - clearing the data could also be considered a "bad state" for some future migrations if they assume certain things do exist from previous migrations. (I wouldn't describe doing that as "best practice" necessarily, but I'm sure it will happen.) So if MigrationTest did the data-wipe before running migrations in tearDown, this could trip-up migrations that would work otherwise. (Hope that made sense, if not I'll knock together an example.)
So I think I'm inclined to say that it would be more surprising (and harder to workaround) if MigrationTest were to do the data-wipe. We could add it as an optional switch though I think.
You can probably just do something like:
class MigrationFailTestCase(MigrationTest):

    def test_fail_hard(self):
        # put data in bad state
        MyModel.objects.create(state='bad')

        with self.assertRaises(Exception):
            self.run_migration()

        # put data back into sane state, eg:
        MyModel.objects.all().delete()

or maybe even
class MigrationFailTestCase(MigrationTest)
    def tearDown(self):
        call_command('flush')
        super().tearDown()

would work for your case.
See what TransactionTestCase does which is a bit more involved, but caters for things like multiple databases.
Hope that's helpful.

The workaround you propose is fine when you expect a migration to fail, but if someone did not do that and something goes wrong in a migration test the failure has potentially catastrophic side effects on other tests.
It is pretty hard to debug, the call stack does not relates to "tearDown" since the migration is called from "call_command".
Good tests should revert the state of any resources they use so I am sure rollbacking automatically the test data should be a good thing. Don't you think?

If there was a way of saying "restore DB state such that it will pass all future migrations", then absolutely. But I am not convinced that such a thing exists. And we're using TransactionTestCase here, so the DB can't help us with a rollback. Only you with your project know how the data needs to look to pass the future migrations.
As for debugging, it might help if tearDown did a try-except around the call_command so it could re-raise and explain saying "failed to restore state in tearDown". Though in py2 without raise from this would lose information which is annoying, but probably better than the current situation.

Good tests should revert the state of any resources they use so I am sure rollbacking automatically the test data should be a good thing. Don't you think?

Absolutely. But we're already through the proverbial looking-glass here. MigrationTest is really abusing Django's TestCase. If we really want guaranteed restoration, then the safest way of getting the db back on track would be to drop it and rebuild which I would love, but then the tests would take a stupidly long time.
Relatedly, Django's docs mention something similar in the warning in this section and suggests using serialized_rollback = True. Not sure if this would help or not. Might be worth trying, or investigating what it does. It also mentions different backends - what DB engine are you using?
So I think the options are:

As now but try-except to explain the tearDown failure, and leave the restoration up to the developer.
A class-level boolean called something like flush_db_after_hard_fail that would basically enable my call_command('flush') snippet from before, defaulting to False.
As above but defaulting to True, though this changes existing behaviour and may introduce the problem you found for others.
Something else, maybe?

I like Option 1 but could it be this option:
Run a savepoint() the setUp after having ran the migration to the first migration and then call savepoint_rollback() in the tearDown before to run the migrations again?

So you mean make the savepoint just after we run the migrations down in setUp, then restore to the savepoint just before we run them back again in tearDown?
Or make the savepoint just before we run the migrations down in setUp, then just restore in tearDown, no migrations back again needed?
The second option has the benefit that removes the tearDown migration completely, but has the problem that it will not work at all on mysql. But the first option may well work, and I'd be interested to know if it works for the situation you encountered if you can try it out.

I run tests with sqlite and MySQL.
I did some tests with rollback and it does work inside a transaction block. See documentation
So I made this decorator that actually works pretty well.
def safe_migration(func):
    @transaction.atomic
    def func_wrapper(*args, **kwargs):
        sp = savepoint()
        try:
            func(*args, **kwargs)
        except:
            raise
        finally:
            savepoint_rollback(sp)
    return func_wrapper

When I decorate my test function with it the issue in the tearDown does not occur.

Of course this decorator is only "safe" when testing a custom migrations that does not change the schema.
I suppose the Django migration table is also rolled back but the schema remain changed. This could leave the DB in a pretty bad state.

Here's a test for the transaction:
class TestIdempotentTransaction(TestCase):

    def test_is_idempotent(self):
        @idempotent_transaction
        def create_user():
            models.User.objects.create(
                username='foo',
            )
        create_user()
        self.assertFalse(models.User.objects.exists())

@plumdog I was thinking to create a PR(with tests) for this decorator. Does that make sense to you?

Yeah, it looks like a neat solution to me.

@plumdog, I created the pull request. However I couldn't make it to work with django < 1.7.

PR merged. Version 0.0.13 now on PyPI. Thanks for contributing!


Metrics from the lakom Pods running in the kube-system Namespace are not collected

What would you like to be added:
Our Seeds are running lakom Pods in their kube-system Namespace. These lakom Pods are responsible for the signature verification of the all Pods in the Seed (except from kube-system Namespace Pods).
The lakom Pod expose several useful metrics https://github.com/gardener/gardener-extension-shoot-lakom-service/blob/v0.11.0/pkg/lakom/metrics/metrics.go.
These metrics right now are not collected by any prometheus instance.
Why is this needed:
To be able to check these lakom metrics.

This enhancement is blocked until https://github.com/gardener/gardener/issues/8924 or alternative solution is implemented.


Cannot build sigar: "error: called object ‘minor’ is not a function or function pointer"

Issue
When I run make it breaks with error:
error: called object ‘minor’ is not a function or function pointer
Steps to reproduce
./autogen.sh
./configure
make

Info
I use Arch linux, linux-5.3.7

What target architecture are you building for? Have you tried the ant approach outlined in https://github.com/hyperic/sigar/wiki/source?

My target architectures are arm and x86_64, i want to use C/C++. I did not try ant, example build looks like is only for java. Thanks for fast reply!

Tried compiling with ant, but comman ant gives this:
Buildfile: /home/cigla/Documents/Git/sigar.git/bindings/java/build.xml

jni-init:
    [mkdir] Created dir: /home/cigla/Documents/Git/sigar.git/bindings/java/build/classes
     [echo] jni.src=linux, jni.jdk.os=linux, 64-bit
    [javac] /home/cigla/Documents/Git/sigar.git/bindings/java/hyperic_jni/jni-build.xml:165: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 6 source files to /home/cigla/Documents/Git/sigar.git/bindings/java/build/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.4
    [javac] error: Source option 1.4 is no longer supported. Use 7 or later.
    [javac] error: Target option 1.4 is no longer supported. Use 7 or later.

BUILD FAILED
/home/cigla/Documents/Git/sigar.git/bindings/java/hyperic_jni/jni-build.xml:165: Compile failed; see the compiler error output for details.

Total time: 1 second

Sorry, just seen this. Do you have JAVA_HOME set to point to a jdk dir?

JAVA_HOME is not set, but when I set it using export JAVA_HOME=/usr/lib/jvm/default, also I read that on arch JAVA_HOME doesn't need to be set because it is already set in $PATH. I also tried openjdk 7 and 8 still doesn't work. But I am trying to build for C++, so why am I using Java?
Thank you in advance!

Is this up?


edit file dialog is not scrollable.

Reproduce:

open publication
go to tab "full text"
click on the ".." on right of a file, and choose option "Edit.."
a modal appears, allowing you to edit and save file metadata

Problems:

if your screen is not height enough, you cannot see or access the top and bottom (where the save and cancel button is!), nor can you scroll to it.

Inserting a form element into the layout in between modal and modal-body messes up the whole layout.
If I put the form around the whole modal, the layout problem is gone. I guess the layout
did not take that into account, or did not say where to put the form element itself?

The Mono prototype does take this issue into account.

Open the Mono prototype
Navigate to http://localhost:3000/add-publication/multiple/step-3/edit/full-text.html
Click on the "edit" button of a single file to see the same pop up.
Use the dev tools in the browser to inspect the HTML of the pop up.

You'll notice that the HTML of the popup looks something like this:

file.pdf

                    <form action="">

                    </form>

            <button class="btn btn-link" data-dismiss="modal">Cancel</button>
            <button class="btn btn-primary" data-dismiss="modal">Save</button>

The overflow-hidden and overflow-auto classes are Bootstrap 4 classes that trigger a scrollbar inside the popup.

@netsensei the issue was that the form tag also has to enclose the submit button in the modal-footer

Another way of solving this is using hx-include:  https://htmx.org/attributes/hx-include/
e.g. hx-include=".modal-dialog .modal-body form > input"
This way, the form tag doesn't have to encapsulate both body and footer.


Gamejolt / Unpackager

I have a problem.
I use the gamejolt api but basically everyone can see the api key if they unpackage my html file to sb3 so how can i prevent this cause the extension gamejolt documentation said that it is safe????

Even without the unpackager it was unsafe, I was able to get my friend's API keys just by using inspect element.

thats pain do you know any alternative way?

thats pain do you know any alternative way?

I don't, someone else might.

Okay, thanks.

sadly because turbowarp packager does not have some sort of environment variables system I don't think it is currently possible 😭

Although you could make it connect to some sort of external server and grab the api keys

sadly because turbowarp packager does not have some sort of environment variables system I don't think it is currently possible sob

Maybe custom JS?

sadly because turbowarp packager does not have some sort of environment variables system I don't think it is currently possible sob

Maybe custom JS?

Thats just thrown into a script tag for anyone to see.

Although you could make it connect to some sort of external server and grab the api keys

people could snoop the network.

You could put the key in a variable and use the reporter of sensing plus and LMS or more events to detect if it is packed or not, and if it is not, delete the variable with the key and for more security you could encrypt the key.

Maybe just have your own server handle making sensitive requests so the API key isn't ever in the project

Maybe just have your own server handle making sensitive requests so the API key isn't ever in the project

Thats really not safe why shouldn't people be able to see it in the console?

Because the API key is saved in an environment variable on the server and never exposed

Maybe just have your own server handle making sensitive requests so the API key isn't ever in the project

Thats really not safe why shouldn't people be able to see it in the console?

Because the API key is saved in an environment variable on the server and never exposed

Maybe just have your own server handle making sensitive requests so the API key isn't ever in the project

Thats really not safe why shouldn't people be able to see it in the console?

Could you give an example how this would work in blocks

well the app would just tell the server to make the requests and return the output

You could put the key in a variable and use the reporter of sensing plus and LMS or more events to detect if it is packed or not, and if it is not, delete the variable with the key and for more security you could encrypt the key.

Because the API key is saved in an environment variable on the server and never exposed

Maybe just have your own server handle making sensitive requests so the API key isn't ever in the project

Thats really not safe why shouldn't people be able to see it in the console?

I mean in the console of the packaged html file if i play the game

I believe that in the consoles extension there is a block that allows you to remove all information from the console.
Just make it active all the time.

you can save the console history before its cleared 🪄

From: penta-quark-neutro @.>
Sent: Saturday, August 5, 2023 10:05 PM
To: TurboWarp/extensions @.>
Cc: Surv @.>; Comment @.>
Subject: Re: [TurboWarp/extensions] Gamejolt / Unpackager (Issue #739)
I believe that in the consoles extension there is a block that allows you to remove all information from the console.
Just make it active all the time.
—
Reply to this email directly, view it on GitHubhttps://github.com/TurboWarp/extensions/issues/739#issuecomment-1666677961, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAGGRIHL3POEQSL25FPIQVTXT33VRANCNFSM6AAAAAA2JSUNBM.
You are receiving this because you commented.Message ID: @.***>

Even if it clears the console, you can still see keys in the network tab.
On Sun, Aug 6, 2023 at 2:44 PM Surv @.***> wrote:

you can save the console history before its cleared 🪄

From: penta-quark-neutro @.>
Sent: Saturday, August 5, 2023 10:05 PM
To: TurboWarp/extensions @.>
Cc: Surv @.>; Comment @.>
Subject: Re: [TurboWarp/extensions] Gamejolt / Unpackager (Issue #739)
I believe that in the consoles extension there is a block that allows you
to remove all information from the console.
Just make it active all the time.
—
Reply to this email directly, view it on GitHub<
https://github.com/TurboWarp/extensions/issues/739#issuecomment-1666677961>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/BAGGRIHL3POEQSL25FPIQVTXT33VRANCNFSM6AAAAAA2JSUNBM>.
You are receiving this because you commented.Message ID: @.***>
—
Reply to this email directly, view it on GitHub
https://github.com/TurboWarp/extensions/issues/739#issuecomment-1666942189,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARAN5UTSH7EB6IS2G26JQUTXT7QX3ANCNFSM6AAAAAA2JSUNBM
.
You are receiving this because you commented.Message ID:
@.***>

I have a problem.
I use the gamejolt api but basically everyone can see the api key if they unpackage my html file to sb3 so how can i prevent this cause the extension gamejolt documentation said that it is safe????

don't make it downloadable


Convert Stem script functionality to C++

This would reduce our dependency on Stem and by extension Python, which would be huge. Doing this would also help reduce the complexity of porting to Windows.
We already communicate with Tor's control port, so it wouldn't be that hard to do.

This was accomplished on the json-rcp branch a while back.


Variables to dimension a crawler system

We need to set up a non commercial system to search several internet sites, about un million documents to begin with. We need to make a preliminary budget and need to know the variables that influence the dimension of the system. We'd appreciate if you can give us some clue about internet sites where we could find studies or articles that can help us to value hardware, storage, people, time, that is, money, specifically on the crawler side, say, using your HTTP Collector.
Thank you very much
Carlos

FYI, in case you wonder, you can use the HTTP Collector for commercial solutions as well.  It is licensed under the business-friendly Apache License 2.
I would be glad to help. I would like to ask you more questions on your project to better answer you.  I think we'd be better of using a more appropriate channel for this discussion.  Do you mind firing me an email?  You can use:
pascal.essiembre AT norconex.com

You are right.

Do you have trouble reaching me via email?  If you do not mind giving me yours, I will try to reach you.


My Day feature enable page

It should
a) exist
b) have screenshots and text

@thatoddmailbox I'll work on that.
Once My Day is a thing

@thatoddmailbox Paging, when will a very rough draft for beta testing of this be due?

@medensqui Idk.
On Wed, Nov 4, 2015 at 5:50 PM medensqui<EMAIL_ADDRESS>wrote:

@thatoddmailbox https://github.com/thatoddmailbox HOW DO I ACCESS
—
Reply to this email directly or view it on GitHub
https://github.com/PlanHubMe/PlanHub/issues/19#issuecomment-153894736.

@nywillb what do you wanna be added to?

@willweinstein @thatoddmailbox the server whitelist.

@nywillb FOR WHAT THO

@willweinstein for a database space so you can run a local server without having to bug new lab.
@nywillb check your FirstClass email.


ros2 launch depthai_examples yolov4_publisher.launch.py not publishing topics

I am having a problem with this script. When I echo topics of this script it is not showing me any data on the terminal. I have tried to echo "/color/yolov4_Spatial_detections, /color/image, /stereo/depth" topics which should be published according to the script. Even I do not see any errors.

I am seeing the same thing. This is an issue with the depthai_examples package though, so can you move this issue to https://github.com/luxonis/depthai-ros-examples?

I have already posted it in their forum.

Issue discussed at https://github.com/luxonis/depthai-ros/issues/140


CupertinoTabView is not hot reload friendly

Hot reload won't apply changes made to the builder of a CupertinoTabView. A hot restart is required to see the effect of those changes. This was hit by participants in a UX study and no one had any clue about why hot reload stopped working. The code below can reproduce the issue:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return CupertinoApp(
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CupertinoTabScaffold(
      tabBar: CupertinoTabBar(items: [
        BottomNavigationBarItem(
          icon: Icon(CupertinoIcons.home),
          title: Text('Home'),
        ),
        BottomNavigationBarItem(
          icon: Icon(CupertinoIcons.settings),
          title: Text('Settings'),
        ),
      ]),
      tabBuilder: (context, index) {
        if (index == 0) {
          return Center(
            child: Text("Home Screen",
                style: Theme.of(context).textTheme.display1),
          );
        } else {
          return CupertinoTabView(
            builder: (context) {
              return Center(
                // Changing the text style of the Text widget below requires a
                // hot restart to see its effect.
                child: Text("Settings Screen",
                    style: Theme.of(context).textTheme.display1),
              );
            },
          );
        }
      },
    );
  }
}

Cc: @jacob314 @Hixie

This may actually be a bug in the VM. Initially hot reload worked for me for this example and then it stopped working.

@pq here is the quick fix that we should suggest any time there is a closure within a closure in a build method to keep users writing code that will hot reload well. This code pattern is also reasonable to suggest in general as it helps keep build methods from getting too large.
Before:

After:

@DaveShuckerow you've been recommending this sort of pattern of refactors for unrelated style reasons while reviewing the DevTools in Flutter code. Would you like a general lint and quick fix for this case?

https://github.com/flutter/flutter/pull/43585
I've added a pull request that makes @InMatrix's original code hot reload properly.
Users who use CupertinoPageRoute directly can still end up with code that won't hot reload but I'm having trouble figuring out how I would fix that case.

This quick fix is certainly helpful, but it's hard to discover. Is there something we can do from the framework side or the VM side to make code in such a closure reloadable?

https://github.com/flutter/flutter/pull/43585
would eliminate the need for any changes on the user side for this case. Hot reloads on the builder would just work as expected.
On the other hand, closures passed to the onGenerateRoute named parameter to CupertinoTabView will not hot reload and as far as I understand it from talking to @xster will never hot reload which is by design with the current routing model.
In general, I think a reasonable mental model to give users is that closures defining routing are not hot-reloadable but it is reasonable to expect that closures passed to arguments named builder are hot reloadable. We should audit all methods named builder in the framework to verify that they are hot reloadable and for cases where they cannot be hot reloadable we should deprecate the names and provide a different name that makes it less surprising that hot reload is not possible. Another option would be to provide an annotation on arguments to widgets that are not hot reloadable make it easy to provide lints that explain exactly what went wrong and what the fixes.

Fyi @goderbauer I hear you are investigating some enhancements to routing that might make some code like this more amenable to hot reload.

Seems like the reason is each CupertinoTabView is a parallel navigation stack whose first page is really following
https://api.flutter.dev/flutter/widgets/ModalRoute/buildPage.html

This method is only called when the route is first built, and rarely thereafter. In particular, it is not automatically called again when the route's state changes unless it uses ModalRoute.of. For a builder that is called every time the route's state changes, consider buildTransitions. For widgets that change their behavior when the route's state changes, consider ModalRoute.of to obtain a reference to the route; this will cause the widget to be rebuilt each time the route changes state.

On the one hand, it's very similar to other edge triggered imperative calls like showDialog or showModalBottomSheet where you you rebuilt the 'parent' to the caller and changed the builder closure instance given to the call to [showDialog] it, nothing happens. The closure is only run once in an edge triggered way. (These route builders have a builder instead of taking a child to make Navigator.of(context) get the right context underneath it). Similarly, MaterialPageRoute.builder and CupertinoPageRoute.builder don't change if the builder closure changed.
On the other hand, from the outside, this builder kinda looks very similar to CupertinoTabScaffold.tabBuilder which has no routes involved and does hot reload if the closure changes because it's entirely level-triggered.
The fact that some builders are invoked once (indirectly) imperatively and some declaratively is indeed not obvious at all and confusing. CupertinoTabView.builder has some dartdoc but it's likely not enough.
I think I'm leaning towards the change @jacob314 is proposing. Perhaps in addition, we should deprecate the builder arg and call it defaultRouteBodyBuilder (don't know what would be a good name) or some such to make it sound more level-triggered-y?

Does Navigator 2.0 address this issue?

I was able to reproduce this on latest stable channel.
flutter doctor -v
[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.6 19G2021, locale en)
    • Flutter version 1.20.3 at /Users/pedromassango/dev/SDKs/flutter_stable
    • Framework revision 216dee60c0 (9 days ago), 2020-09-01 12:24:47 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.7, Build version 11E801a
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2020.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 48.1.4
    • Dart plugin version 202.7206

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

[✓] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5556 • android-x86 • Android 11 (API 30) (emulator)

! Doctor found issues in 1 category.
Process finished with exit code 0

Interesting, is the bug still there for many years?

Reproducible on stable 3.3 and master 3.7 changing CupertinoTabView.builder's widget does not update unless we hot restart.

code sample
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return const CupertinoApp(
      home: HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return CupertinoTabScaffold(
      backgroundColor: Colors.white,
      tabBar: CupertinoTabBar(items: const [
        BottomNavigationBarItem(
          icon: Icon(CupertinoIcons.home),
          label: 'Home',
        ),
        BottomNavigationBarItem(
          icon: Icon(CupertinoIcons.settings),
          label: 'Settings',
        ),
      ]),
      tabBuilder: (context, index) {
        if (index == 0) {
          return Center(
            child: Text("Home Screen",
                style: Theme.of(context).textTheme.headlineMedium),
          );
        } else {
          return CupertinoTabView(
            builder: (context) {
              return Center(
                // Changing the text style of the Text widget below requires a
                // hot restart to see its effect.
                child: Text("Settings Screen changed",
                    style: Theme.of(context).textTheme.headlineMedium),
              );
            },
          );
        }
      },
    );
  }
}

flutter doctor -v (mac)
[✓] Flutter (Channel master, 3.7.0-13.0.pre.131, on macOS 13.1 22C65 darwin-arm64, locale en-IN)
    • Flutter version 3.7.0-13.0.pre.131 on channel master at /Users/mahesh/Development/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 0196e6050b (2 days ago), 2022-12-31 11:10:23 -0500
    • Engine revision 932591ec04
    • Dart version 3.0.0 (build 3.0.0-76.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks
      and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

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

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 13.1 22C65 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 108.0.5359.124

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

• No issues found!

[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale en-IN)
    • Flutter version 3.3.9 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (24 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

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

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

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

• No issues found!


Rex and expandable in other shells

This applies to any version up to 2.40.3 as far as I can tell.
Rex does expandvars("${VAR}") correctly regardless of the platform:
https://github.com/nerdvegas/rez/blob/master/src/rez/utils/formatting.py#L203
However, the default expandable will only work on shells that happen to support the ${VAR} or $VAR syntax.
On windows the tests check for %VAR% but in fact the documentation make it sound as if the ${VAR}/$VAR is the portable form that should work on any platform.
I assume that we should implement the necessary conversion for the expandable case on shells that require it.
So for cmd.exe we would replace ${VAR} with %VAR% and for Powershell we would replace it with ${Env:VAR}.
This way we can keep the package definitions platform independent. The risk is minimal since users are free to choose literal.
The question arises is expandvars should also replace the variables in the case where the variable is not found in the environment.
In both cases we might want to introduce rez configuration options for backwards compatibility.

Got feedback from @nerdvegas in Slack that this is incorrect behavior.
As such I wonder if it is even necessary to introduce backwards compatibility options.
The only case where I see a danger is when people relied on ${VAR} syntax in variables without declaring them literal. One could argue that this is an inaccurate declaration.

Actually I found a duplicated reported by myself some time ago:
https://github.com/nerdvegas/rez/issues/443

So yes, I think we need to support $VAR and ${VAR} forms, which should be translated to their shell equivalents. Are you saying that currently, %VAR% is expected on windows, and that $VAR/${VAR} does not work? I am assuming so (and of course %VAR% would work because it simply ends up verbatim in the cmd source - but I think that that incidental behaviour is fine).

I have a branch which fixes this and many other shell related issues. This allowed to pass all shell tests cross platform. Still having some issues with zsh which might not be related to it, but I'll investigate before creating a PR.
https://github.com/bfloch/rez/tree/issue_694-rex-expandable-windows
Stay tuned.


AI Human detection support

https://github.com/roleoroleo/yi-hack-Allwinner/blob/860c007d78289dfb1bd5563f5a5f0bd494503dff/src/ipc_cmd/ipc_cmd/ipc_multiplexer.c#L76
How can i debug IPC messages, id like to add support for AI Human detection.

Try this sniffer:
ipc_sniff.tar.gz

I receive the following messages, i presume this is in hex format?
 And what do you think are the values before the 03 and 04?

Try the reverse test: save the string as a binary file and send it with ipc_cmd.
You should get a notification on the app.

@roleoroleo it turns out the above IPC messages where for something else.
I opened a PR for AI Human Detection here: https://github.com/roleoroleo/yi-hack-Allwinner/pull/114


Record level access filter

something like this extension for yii1: http://www.yiiframework.com/extension/acl/
it would provide us filtering in the records itself not just the controller-actions
it would also give a more complex way of accessing records by applying groups not just the typical 'owner id' column per table

it's alright, this kind of feature is probably too application specific to write a generic implementation for Yii, however if a design can be suggested i can help work on it

agreed. Feel free to create your own extension in github. Perhabs one day it will be published as a yii-extension. For now its out of the cores scope.


Post comment on PR build

Added possibility to enable posting comments for builds which was triggered by PR. All you need to do is to define POST_JIRA_COMMENT_ON_PR environment variable and set its value to true. If this env var doesn't exist comment will be not posted on build triggered by PR.

I came here to do this also! 👍

I guess we should add POST_JIRA_COMMENT_ON_PR as an input in the step.yml so the user can choose it directly from the UI without having to worry about creating a new environment variable. What do you think ?

Yup, that would be a way better solution! I also think this should be a default configuration available directly on all Bitrise plugins, but it's not the cas for now.

By the way, if you try to edit your workflow using the YAML editor and set the run_if to the value that is best for you ?
Ex: run_if: .IsCI
More infos here : http://devcenter.bitrise.io/docs/lesson-5-a-complex-workflow

By the way, if you try to edit your workflow using the YAML editor and set the run_if to the value that is best for you ?

Yup that's working ! Thanks you, but it's not really user friendly thought, my coworkers may not be aware of this part of the configuration while editing the workflow.

I'm checking this with Bitrise guys (https://github.com/bitrise-io/bitrise-steplib/issues/731)

@Loadex , are you still interested to have this feature ?


[Latte PHPStan compiler] Changed IRenderable to Control

Should resolve #3682

With failing test I can point out the bug :)

Thanks for your work. I've merged it here https://github.com/symplify/symplify/pull/3693


feat: return timestamp from GetIDs

Overview
Enhanced the GetIDs functionality to include a timestamp in the response, both in the proto files and Go structures. Updated relevant files and added checks for the new field in the tests.
Resolves #101

Summary by CodeRabbit

New Features

Introduced a new GetIDsResult structure that includes both IDs and a timestamp, enhancing the context of retrieved data.
Added a timestamp field to the GetIdsResponse message for improved temporal context.

Bug Fixes

Updated methods to ensure they return the new structured response, improving data handling and validation.

Tests

Enhanced test cases to validate the new structure and ensure robustness in response handling.

could you fix golangci-lint? otherwise, LGTM


Can't make ForceAtlas2 work on 1.2.0

Hi,
After multiple attemps (configuration changes, etc.) I still cannot make forceAtlas2 work on my sample (see CodePen here, just submit multiple inputs to create nodes).
Basically what I'm doing is:

adding nodes (and edges from latest node) with random x and y
calling refresh + startForceAtlas2 each time I add a new node.

...but can't see any redraw (i.e. the nodes remain at the random x/y I initially set). However noOverlap seems to do something.
Could you help? The full code is included in the CodePen. Thanks.

You need to kill the layout and restart it when adding nodes else the underlying byte array is not refreshed (this is a design issue).

Thanks for the reply. I'm new to sigma.js and so not sure about "killing the layout" means. To me the layout is forceAtlas2, about which I don't have a reference so far. Maybe you mean the graph (or the sigmajs instance) ? By "killing" do you mean graph.kill() or just graph.clear() as pointed in another issue? Does that mean that I should "save" all the nodes and edges before, then re-add them afterwards?
Thanks by advance for those clarifications!

I guess you start the layout using sigInst.startForceAtlas2(), so killing the layout would simply be sigInst.killForceAtlas2().

Okay, this works now, thanks a lot!
By the way, some node are giggling more on less, depending on the total number of nodes are present (odd total number seems to be a factor), but I assume this is another issue?

This layout is not really fitted for small networks and some of its optimizations can make specific structures giggle (stars notably). I don't remember the autoStop option. The layout is not deterministic and most of the heuristics we tried to stop it automatically tend to fail on some network typologies. Usually people use a timeout or let the user stop the layout.

I would advise you to scale the timeout time on the size of your network. But if 100ms works for you I guess you are working with relatively small graphs, no?

Good advice indeed. Yes I was testing with less than 10 nodes only.


I'm working in colab and  changed tf.gfile.GFile to tf.io.gfile.GFile but still get this error

@mihaimaruseac I'm working in colab and  changed tf.gfile.GFile to tf.io.gfile.GFile but still get this error
AttributeError: module 'tensorflow' has no attribute 'gfile'
Originally posted by @mitramir55 in https://github.com/tensorflow/tensorflow/issues/31315#issuecomment-643277101

I tried the way mentioned but still it is not working

I tried https://www.tensorflow.org/io/tutorials/avro tutorial which shows tf.io.gfile.GFile usage example. I didn't see AttributeError raised.
Perhaps you can confirm at your end. Thanks!

Please fill in issue template. Please make sure you are using TF 2.x. Please post full error and code sample.
Without a reproducer we cannot do anything here.

@ishkabir1401  If you are using TF 1.x, change import tensorflow as tf to import tensorflow.compat.v1 as tf and it works.
As suggested by @mihaimaruseac, Please fill the issue template. Thanks!

Closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!


Minimum Java version required

I tried to integrate the library in a Spring Boot 2 project compiled in Java 11 but it seems the library has been compiled with Java 15
java: cannot access io.micrometer.logzio.LogzioConfig
  bad class file: /C:/Users/sydney/.m2/repository/io/logz/micrometer/micrometer-registry-logzio/1.0/micrometer-registry-logzio-1.0.jar!/io/micrometer/logzio/LogzioConfig.class
    class file has wrong version 59.0, should be 55.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

Is it a correct assumption?

Hey @sydneyhenrard you are correct the library is compiled in Java 13.
We are currently working on a new release that will be compatible also with Java 11, will keep you updated shortly about that.

@sydneyhenrard We released a new version that is compatible with java 11
When you define your dependencies use:
io.logz.micrometer:micrometer-registry-logzio:1.0.1
Instead of:
io.logz.micrometer:micrometer-registry-logzio:1.0
Let me know if it worked for you

The project is now compiling. Thanks


AsyncWebServer on GSM connection. Is possible?

This is not issue, but a question. Is it possible to get organized such a web server on GSM/GPRS connection. The WiFi is not required to be in use. Please, introduce an simple "Hello World" web page, with for example, Sim800l modem. I know, each connection sessions gives newer IP to the connected client. So, additional implementation of dealing with this host by EasyDDNS library is possible to do. Thanks in advance.

Sorry, this question has noting to do with this library.
You can create a WebServer using SIM800L if you'd like. I have no time and interest in doing that.
Just search/ask for help on some forums and/or write the WebServer by yourself based on these libraries

TinyGSM
Arduino-SIM800L-driver
SIM800
SIM800-for-TCP


CTRL+V Not working for png tools

I was using the change-colors-in-png tool and the action to paste from clipboard with CTRL + V is not working (either with web version and locally with Docker)

Yes, you are right, it is not yet implemented.

By the way how did you know about the project? Which tools would you be interested to see?


Figure Out How to Implement Rate Limiting Downloads

Summary
I tried out two rate-limiting options with absurd settings to make it really obvious whether limiting is happening. Rate limiting with nginx worked and was really easy. Rate limiting with Ad Hoc Labs' akka http contrib library seems super configable and would live alongside all of our other server side code but is broken for us in some confusing way. We could implement the nginx version in about 10 minutes, just by changing the settings in the example branch. We should do the nginx version.
Option 1: nginx rate limiting + redirect to signed url
For this option, we'd make the download request return a 302 to a signed url, make the signed url (very) short-lived, and rate limit the requests for the redirect.
Pros: really easy. You add a few lines to your nginx config and bam, rate limiting.
Cons: Lives far from the rest of the api server code, which could have unforeseen consequences if we want to start doing tracking on who gets rate limited.
Example branch: feature/jis/rate-limit-1-nginx(simple rate limiting -- no redirect or server logic, just demonstration of rate limiting at all; we can also do more complicated rate limiting based on headers if we want)
What to do on the branch:

start up your server and frontend
request something from /api/scenes/, then less than a minute later, request something form /api/scenes/ again
the second should fail

Option 2: Ad Hoc Labs' akka.http.contrib throttle directive
For this option, we'd throw throttling settings into the api's application.conf file. Unfortunately it seems broken in some way that I can't tell whether it's worth it to debug.
Pros: api settings live with the api code :tada:, library looks not too difficult to extend if we want to throttle post-authentication
Cons: not actually a mature lib, adds dependencies to the api-server service (requires git to install), might actually be broken (?)
Example branch: feature/jis/rate-limit-2-throttle-directive
What to do on the branch:

./scripts/console api-server bash
install git from source
./sbt
start up your server
request something from anything other than /api/scenes/
request something from /api/scenes/ -- this fails with an java.lang.IncompatibleClassChangeError (I tried forking and matching dependency versions to Raster Foundry, but that did nothing to the presence or type of error)
be sad

Ok, let's do the NGINX one then - we should add the redirect logic though I think for the individual downloads


Deploy the plugin in QGIS registry

We need to run the upload_plugin scripts from this repo.
But first, we need to

Wait for pytransition to be in pypi officially (I think it is)
Test it locally ourselves
Document a deployment strategy (tag the commit for each deployment, then deploy and update the minor version?)

Just to clarify the deployment part, the tag should contain the version to be release. After the tag is done, is possible to update the repo to have the information of the next relesae.

I attempted to upload from plugin registry (https://plugins.qgis.org/plugins/add/) and got this message: You cannot modify this plugin. Very helpful...
I then used the plugin_upload.py script provided in this repository, with my OSGEO credentials, and got this response:
Plugin ID: 3349
Version ID: 17375

Number which I'm not 100% sure represent what they say as it is just our output saying that.
The plugin is not [yet?] listed in my plugins in the registry. But they say it can take a few days for admins to accept new plugins. Maybe this absence of any kind of confirmation/positive feedback means it is in a queue to be accepted? I'll wait a few days before investigating this further.

It seems to have worked: https://plugins.qgis.org/plugins/Transition-QGIS/#plugin-details
But @mathildebrosseau seems to be the official maintainer of the plugin. @mathildebrosseau si jamais tu sais comment m'ajouter comme maintainer du plugin (tahini), je pourrai plus facilement le mettre à jour via l'interface et le gérer. Mais le script d'upload fonctionne bien.

Allô!! Je viens d'aller éditer les configurations du plugin, en principe @tahini est maintenant maintainer. Vous me direz si ça fonctionne au niveau des droits d'accès.


Remove Juniper SRX and F5 plugins from documentation

ISSUE TYPE

Documentation Report

COMPONENT NAME

CLOUDSTACK VERSION

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

update documentation according to https://github.com/apache/cloudstack/pull/7023
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

was done in https://github.com/apache/cloudstack-documentation/pull/348


Support to reverse proxy into Docker Containers

A useful feature that would be good to use Caddy as the frontend server in front of 1+ Docker Hosts (or Docker Swarm).
The caddy configuration file would have one or more docker hosts specified so that specifically tagged/named docker container instances running on those hosts could be looked up based on the Host header requested via HTTP. When a request comes in, take the Host header and do a lookup (full, partial or regex) against the Docker API to match the Host header to a Docker Instance running on the docker hosts (load balancing if multiple instances are running).
This would make it easy to launch docker containers that are configured in a specific way (i.e. a container tagged as dockerhubacct/www.example.com -or- via environment variables). There are many different ways this could be setup, container names need to be unique per docker host, but tags and environment variables do not.
Docker Proxy - Possible Caddyfile Directives
docker_proxy / dockerhost1 dockerhost2 {
  # Use the same things as a normal proxy. docker_proxy would just be a smarter proxy module
}

Here is a very sketchy bit of code that could provide as an example of what is being accomplished. This code was prototyped on a mac, running boot2docker with specifically tagged docker containers. I had to setup extra hostnames in /etc/hosts to match the container tags.
package main

import (
    "log"
    "net/http"
    "net/http/httputil"
    "fmt"
    "strings"
    "os"
    "math/rand"
    "strconv"
    "github.com/fsouza/go-dockerclient"
)

func main() {
    endpoint := os.Getenv("DOCKER_HOST")
    path := os.Getenv("DOCKER_CERT_PATH")
    ca := fmt.Sprintf("%s/ca.pem", path)
    cert := fmt.Sprintf("%s/cert.pem", path)
    key := fmt.Sprintf("%s/key.pem", path)
    client, _ := docker.NewTLSClient(endpoint, cert, key, ca)
    // use client

    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {

        requestedHost := strings.Replace(strings.Split(r.Host, ":")[0], ".localdomain", "", 1)

        var appName string
        if strings.Contains(requestedHost, ".") {
            appName = strings.Split(requestedHost, ".")[0]
        } else {
            appName = requestedHost
        }

        // Lookup Requested Host from Docker API (host name)
        imgs, _ := client.ListContainers(docker.ListContainersOptions{All: false})
        containers := []string{}
        fmt.Println("Running Containers\n------------------")
        for _, img := range imgs {
            fmt.Printf("%s [%s]\n", img.Image, img.ID)

            var imageName string
            if strings.Contains(img.Image, "/") {
                imageName = strings.Split(img.Image, "/")[1]
            } else {
                imageName = img.Image
            }
            if strings.ToLower(imageName) == strings.ToLower(appName) {
                containers = append(containers, img.ID)
            }
        }
        fmt.Printf("\nContainers that can fulfill request: \n%v\n", containers)

        if len(containers) <= 0 {
            w.Write([]byte("BACKEND DOWN"))
            return
        }
        containerID := containers[rand.Intn(len(containers))]
        fmt.Printf("\nPicking Container: %s\n", containerID)

        container, _ := client.InspectContainer(containerID)
        fmt.Printf("Ports: %v\n", container.NetworkSettings.Ports)
        port, _ := strconv.Atoi(container.NetworkSettings.Ports["3000/tcp"][0].HostPort)
        fmt.Printf("\n\n%#v\n", port)

        director := func(req *http.Request) {
            req = r
            req.URL.Scheme = "http"
            req.URL.Host = fmt.Sprintf("<IP_ADDRESS>:%d", port) //r.Host
        }
        proxy := &httputil.ReverseProxy{Director: director}
        proxy.ServeHTTP(w, r)
        fmt.Printf("Requested Host: %s\n", requestedHost)
        fmt.Printf("App Name: %s\n", appName)
    })
    log.Fatal(http.ListenAndServe(":8000", nil))
}

This is from memory, but to follow through this example, there would be some setup to do on your mac. You need boot2docker installed and running.
Edit /etc/hosts
<IP_ADDRESS>  www.example.com
Make a container that we can 'reverse proxy' into, listening on port 3000 with the url as a part of the tag.
FROM busybox

WORKDIR /

COPY ./testsvr_linux_amd64 /testsvr

EXPOSE 3000
CMD /testsvr

This would be the command to create the container with the right tag.
docker build -t username/www.example.com .

Just wanted to chime in real quick to let you know that you're not speaking into a vacuum. :smile: I am paying attention to this feature suggestion, just traveling the next few weeks. (Anyone with Docker experience is invited to discuss here in the meantime!)

This will make a nice add-on.
If I get this right, the middleware will intelligently detect ip and port of running containers (meeting a filter criteria) and reverse proxy into it (or load balance if multiple).
I'll try looking into this.

This feature can be done with docker-template with haproxy, registrator to handle docker events, consul as a container / service registry.
In fact you could replace haproxy by caddyserver, docker-template will fill a default Caddyfile then ask to caddyserver to restart.
Ref:
Using HAProxy and Consul for dynamic service discovery on Docker

awesome... was looking for something around that :+1:

There is also https://github.com/jwilder/docker-gen which already does a lot of the work of watching docker socket, configuration and such. Unfortunately their code is not (yet) reusable as a library. We can look at their code to see most of the possible config options needed to contact docker in different environments.
I like the scheme that https://github.com/jwilder/nginx-proxy uses for detecting config. Namely VIRTUAL_HOST, VIRTUAL_PORT, and VIRTUAL_PROTO environment variables. I pretty much want that magic for caddy.
My thought was generate a file like docker.conf from running docker containers, and import that into your main caddyfile. When changes are detected, the plugin can regenerate all of docker.conf and restart caddy.
My idea would be watch

Now that Caddy has restart capabilities (in the letsencrypt branch) this is possible. :smiley:

The idea of querying docker [on multiple hosts] for every request sounds like an extreme amount of overhead, and an absurd amount of added latency.  I don't think caddy as an http server needs to care or remotely know where or what docker is.  Next you will have people asking that it track when they create new droplets on digital ocean or instances on AWS and automatically proxy to them.
I would agree with @zenithar and @captncraig.  This should be handled by something like docker-gen or bigger such as registrator / consul / docker-template.  containers specifically stating via env vars where/what they need to be doing and where they need to be getting injected.  This is far less magic, less complexity, and less overhead.

I feel like the ideal for this would be some api to the proxy module that allows you to change the downstreams at runtime. Restarting the entire server seems tricky, and there are a lot of possible use cases for reconfiguring the downstream servers.
It would be nice if either a custom middleware, or an outside application could change the set of proxied servers without a full restart.

It would be nice if either a custom middleware, or an outside application could change the set of proxied servers without a full restart.

That's really, really hard to do right. It's inherently racy.

Restarting the entire server seems tricky

Restarts are pretty lightweight (I haven't tried doing dozens of restarts per second or anything like that, but they work well enough in succession). You may have a few processes hang around for a couple seconds while it closes connections, but each restart is graceful and race-free. I'm going for robust restarts here; you can trust them to work.

I'm currently using confd to manage a very similar scenario with docker - but I haven't looked into graceful restarts yet. I think the should be possible with the new caddy API.

I use jwilder/nginx-proxy but if this was a directive or feature of Caddy, oh man, that'd be killer.

:+1: :)

@joshmanders
I make caddy-proxy do this use docker-gen, but I cannot let its response newly containers, any advice?

Looks like you need to use the notify feature in docker gen to restart
caddy.
On Dec 25, 2015 6:57 AM, "BlackGlory"<EMAIL_ADDRESS>wrote:

@joshmanders https://github.com/joshmanders
I make caddy-proxy https://github.com/BlackGlory/caddy-proxy do this
use docker-gen, but I cannot let its response newly containers, any advice?
—
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/issues/199#issuecomment-167236537.

Interesting topic. Would love to use Caddy as http / https proxy fpr docker containers.

docker-gen should be a different docker container than caddy-proxy because docker-gen needs docker.sock.
I would try to build it with alpine linux.

I played a little bit with my caddy-proxy docker image (based on @BlackGlory build) with additional CADDY_OPTS.
Usage example
sudo docker run -d --name Flarum -e VIRTUAL_HOST=dev.flarum.lan -e CADDY_OPTS="tls off;log access.log;errors error.log" echo511/docker-flarum

Generated Caddyfile:
dev.flarum.lan {
      proxy / <IP_ADDRESS>:80
      # Additional Caddy options by CADDY_OPTS
      tls off
      log access.log
      errors error.log
}

It's combined with docker-gen because of the reload problem. Primary container process is docker-gen, so it's easy to reload caddy with a sigusr1 signal.

@pwFoo can I see the source of this? I'm looking at swapping out jwilder/nginx-proxy for Caddy.

Hi @joshmanders
at the moment I haven't a git / docker repo for that.
dockerfile
FROM alpine:3.3

ADD 	files/* /tmp/

RUN	/sbin/apk -U add sudo libcap ca-certificates && rm -rf /var/cache/apk/* \
	&& mkdir -p /var/www/logs /var/www/.caddy \
 	&& /bin/chown -R nobody:nobody /var/www \
	&& awk -F ":" 'BEGIN{OFS = ":"} /nobody/{$6="/var/www"}{ print}' /etc/passwd > /etc/passwd.nwe && mv /etc/passwd.nwe /etc/passwd \
	&& /bin/chmod +x /tmp/caddy /tmp/docker-gen /tmp/caddy.sh \
	&& mv /tmp/caddy /tmp/docker-gen /usr/local/bin/ \
	&& mv /tmp/caddy.sh /caddy.sh \
	&& mv /tmp/Caddyfile.tmpl /etc/Caddyfile.tmpl \
	&& /usr/sbin/setcap cap_net_bind_service=+ep /usr/local/bin/caddy

EXPOSE 80
EXPOSE 443
WORKDIR /var/www

ENTRYPOINT ["/caddy.sh"]

Usage
docker run -d --name caddy-proxy -v /var/run/docker.sock:/var/run/docker.sock:ro -p 80:80 -p 443:443 caddy-proxy [additional caddy options]

caddy.sh start script
#!/bin/sh

set -x

WORKDIR=/var/www
PID=$WORKDIR/caddy.pid
CONF=/etc/Caddyfile
TMPL=/etc/Caddyfile.tmpl
CUSTOM=$WORKDIR/Caddyfile_custom
LOG=$WORKDIR/logs/caddy.log
PORT=80

# Update because of changed Caddyfile by Docker-Gen
if [ "$1" == "update" ]; then
    /bin/kill -SIGUSR1 `cat $PID`
else
    rm -f $LOG

    if [ ! -f $CONF ]; then
        touch $CONF
    fi

    if [ ! -f $CUSTOM ]; then
        touch $CUSTOM
    fi

    # Caddy ReverseProxy
    /usr/bin/sudo -u nobody touch $LOG
    /usr/bin/sudo -u nobody /usr/local/bin/caddy -conf=$CONF -pidfile=$PID -log=$LOG -port=$PORT -agree=true $@ &

    # Docker-Gen
    /usr/local/bin/docker-gen -watch -notify="/caddy.sh update" $TMPL $CONF
fi

Caddyfile.tmpl
{{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }}
{{ $host }} {
  {{ range $index, $value := $containers }}
    {{ $addrLen := len $value.Addresses }}
    {{ if eq $addrLen 1 }}
      {{ with $address := index $value.Addresses 0 }}
      proxy / {{ $address.IP }}:{{ $address.Port }}
      {{ end }}
    {{ else if $value.Env.VIRTUAL_PORT }}
      {{ range $i, $address := $value.Addresses }}
        {{ if eq $address.Port $value.Env.VIRTUAL_PORT }}
        proxy / {{ $address.IP }}:{{ $address.Port }}
        {{ end }}
      {{ end }}
    {{ else }}
      {{ range $i, $address := $value.Addresses }}
        {{ if eq $address.Port "80" }}
        proxy / {{ $address.IP }}:{{ $address.Port }}
        {{ end }}
      {{ end }}
    {{ end }}
  {{ end }}

      # Additional Caddy options by CADDY_OPTS
      log logs/{{ $host }}-access.log {
        rotate {
          size 10 # Rotate after 100 MB
          age  30 # Keep log files for 14 days
          keep 5  # Keep at most 10 log files
        }
      }
      errors {
        log logs/{{ $host }}-error.log {
          size 10 # Rotate after 50 MB
          age  30 # Keep rotated files for 30 days
          keep 5  # Keep at most 5 log files
        }
      }

  {{ range $index, $value := $ }}
  {{ $opts := $value.Env.CADDY_OPTS }}
    {{ if $opts }}{{ range $index, $option := split $opts ";" }}
      {{ $option }}
    {{ end }}{{ end }}
  {{ end }}
}
{{ end }}

import Caddyfile_custom

The dockerfile requires the caddy binary, docker-gen binary, Caddyfile.tmpl and caddy.sh in a folder "files"
It works for me (non production environment), but should be improved...
Tested it with some containers and also with load balancing.
Maybe I'll create a repo, but at the moment there is no time...

Hello, I always like the idea of automating things a bit.
I try to build trimed down container by building them from scratch.
And don't think it would play well with having docker-gen and caddy in the same container.
I must admit i liked the idea of having caddy directly lisening to docker events to get restarted/created/stopped container and be able to adapt itself. But if i get the feeling, it would be a bit too much specialisation for Caddy (why not aws and digitalocean then... -well because docker is docker not A paas-).
Additionally i don't like the idea of templates...
this should stay simple: label your container, they get proxied
I would think of very default options then standard 3 liners (forwarded proto/host and host header). Evetnualy a bit of log separation but... what for in a docker container.
So my two cents: a docker template/gen would need much customisation for the app (template mgmt, link to container, ...): shouldn't it basic reverse proxying be simplier ?

Hi All,
For this specific use case, you can look at trafeik project (https://traefik.io/)
I haven't tested it for now but it seems promising.

Traefik is a good option if dynamically reverse proxying into Docker is your primary goal. That's a very specific use case and it's good at that.
I'm pretty confident Caddy will be able to do this in the future without too much trouble; Caddy 0.9 will be much more extensible than Caddy currently is, which may make this possible with a plugin.
If someone would like to make a concrete proposal that is very specific so that it could be implemented from those instructions, maybe somebody could write a plugin to do it. And I could help make sure it's possible to plug into Caddy like that. Maybe a new directive is all that's needed.

It looks like @BlackGlory got it working! Caddy restarts automatically when a new docker container with -e VIRTUAL_HOST is created. Good job @BlackGlory.

With Caddy 0.9 it works fine, also with separated caddy and docker-gen containers. I use it few weeks and it works fine.

No need to support this as far as Docker Swarm Mode is concerned.
To illustrate, please read https://github.com/ibmendoza/go-examples/tree/master/docker
The gist of the matter is this: You direct or proxy incoming request from Caddy to backend(s) located at Docker Swarm manager node(s). Docker Swarm takes care of relaying those requests to the underlying worker nodes.
From my example above, all incoming requests from Caddy will be proxied to port 8080 at any of three (typically) Docker Swarm manager nodes. Docker Swarm then takes care of load balancing and high availability amongst the worker nodes. Great separation of concerns!

I think this would be a good case for a Caddyfile loader plugin: https://github.com/mholt/caddy/wiki/Writing-a-Plugin:-Caddyfile-Loader
I stearted this plugin some days ago: https://github.com/lucaslorentz/caddy-docker-proxy
It's a way I have to learn golang 😄
@mholt I'm using signals to reload caddy configuration, it's working fine. I'm looking forward for more instructions on "Dynamic Reloads" wiki section.
Traefik is awesome for proxying and service discovery, but caddy has more http features. I also had issues with Traefik gzip compression when container returns already compressed data. Caddy is working fine for me so far.

(Yeah, I'll get around to that sooner or later. Gonna see how the API plays into it.)

@lucafavatella
Nice, I'll take a look into it soon :)

I forked a dynamic caddy reloader backed by Consul here: https://github.com/krishamoud/caddy-consul
The use case was actually exactly dynamic proxying to Docker containers.  I have been using this setup in production a docker hosting platform I run.
Heres a demo: https://www.youtube.com/watch?v=uKJJgRxoo8o

@krishamoud That's cool! Thanks for sharing. I noticed Caddy's 404 near the end there. :)

Does Docker Swarm use DNS? The proxy directive now supports SRV backends.

It does use DNS, but I understand it simply makes resolution possible using the service name as a host name, just like Compose (e.g. caddy. 600 IN A <IP_ADDRESS>).
I think Kubernetes uses SRV records, though.

I use Docker Swarm with Caddy in production. Swarm provides a DNS for A records of service names. So I can just mention the service name on the Caddyfile and it all works.

Recently I was setting up a server for our research projects. Our requirement was to be able to host new service stacks in a Docker Swarm cluster and make them accessible on specified sub-domains automatically. Being a contributor of Caddy, I was very interested in using it as the reverse proxy. We had a similar setup using popular jwilder/nginx-proxy image in the past, but we wanted a simpler and more modern approach to it. However, making it work in Caddy (as of now) would have required us to ave some custom code and plumbing in place.
We ended up using Traefik, which has solved the dynamic service discovery and loadbalancing in Docker Swarm pretty nicely. When defining a Docker service stack, we add a few labels in the Stackfile (such as the domain name that is intended to proxy requests to the service) and create the service. Traefik runs in a container which has Docker's socket file mounted, so it can react to any changes, scan through all the containers, filter against certain labels, and automatically generate a reverse proxy configuration file (behind the scene) to reroute traffic.
Once we have similar capabilities baked into Caddy, we might reconsider it as it has some features that Traefik is lacking.

@ibnesayeed Thanks for writing your story -- it's really handy to know how people are using the software!

Once we have similar capabilities baked into Caddy

Which capabilities, exactly? Your post talked about a lot of stuff and I want to be sure I understand exactly what you'd need Caddy to do. (I assume using Swarm's DNS A records is not an option or something?)

Which capabilities, exactly? Your post talked about a lot of stuff and I want to be sure I understand exactly what you'd need Caddy to do. (I assume using Swarm's DNS A records is not an option or something?)

I have described it in the second paragraph of my previous comment, but I can explain it more. Exploiting Swarm's DNS records will work as it adds an entry with the name of each defined service. However, this would require us to update a Caddyfile manually, each time a new service is added or removed (or taken down temporarily) in the Swarm. This manual setup would work great if there are just a few services to be deployed and they do not change very often. However, in an academic research lab like ours, we come up with new ideas every other day, build a tool around it, deploy it for internal testing, advertise to masses when we feel comfortable sharing it with the world, and take them down when we can't afford to maintain them. In a situation like this, we really want something that automates things as much as possible to minimize manual configuration and lower the learning barrier for new researchers joining the team and taking the torch from those who are graduating.
Here is roughly how I would envision Caddy to solve this issue. Say, we have a Caddy plugin for Docker that provides this functionality. The plugin would by default know the well-known location of the Docker socket, but can be configured to read from a TCP URL if necessary. Having access to the socket, plugin will be notified about every change that happens under the connected Docker engine. Using well-documented Docker API, the plugin can query all the running containers along with all their metadata at anytime. Whenever a new service is added or existing services die, the plugin reacts to the notification and scans all the services currently present to identify those matching certain criteria to be selected for being proxy routed to. The criteria would be some well-known labels (defined by the plugin) that are added to those services. Using values in those labels, a config file is generated and loaded. This process will happen each time there is a change in the Docker Swarm that adds or removes services.
Consider the following sample Stackfile.
version: "3"

services:
  assets:
    image: httpd
    volumes:
      - /web/root/directory:/usr/local/apache2/htdocs
    networks:
      - public
    deploy:
      replicas: 3
      labels:
        - "caddy.vhost=static.example.com"
        - "caddy.port=80"

networks:
  public:
    external: true

When this stack is deployed (say, with the name static), it adds a new service named static_assets in the Swarm. The service has three replicas, but each of them will have the two labels as defined above. The Docker plugin of Caddy gets notification of the change, it scans services again and finds one that has the caddy.vhost label defined, so it adds a new backend with the name of the service, assets (this is where utilizing the Swarm's DNS automatically will be helpful) which can be accessed when a request comes with Host: static.example.com header. The caddy.port label tells which port number of of the container is the listening port. In this case, basically we are going to route traffic to static_assets:80. Docker Swarm will take care of loadbalancing among replicas of the same service. We can add some other labels to allow more configuration options, such as disabling TLS for certain routes or enabling automatic redirects to corresponding HTTPS URL.

Caddy supports graceful reloading and custom Caddyfile loaders, so the Traefik approach of adapting to Docker socket changes with hot reloads is a very approachable feature with plugins; the annoying part, I imagine, would be writing a Caddyfile loader that interprets results from the Docker API.
Also, for your consideration, a while back I tinkered with jwilder/docker-gen (the Docker-monitoring and template-writing half of jwilder/nginx-proxy) and graceful reloading based on environmental variables, and packaged it with Caddy in a single container. Conceptually it's identical to nginx-proxy, but with Caddy - as a proof-of-concept, it's pretty solid: https://github.com/Whitestrake/caddy-gen

Also, for your consideration, a while back I tinkered with jwilder/docker-gen (the Docker-monitoring and template-writing half of jwilder/nginx-proxy) and graceful reloading based on environmental variables, and packaged it with Caddy in a single container. Conceptually it's identical to nginx-proxy, but with Caddy - as a proof-of-concept, it's pretty solid: https://github.com/Whitestrake/caddy-gen

Even I experimented a while ago with the same combination of jwilder/docker-gen + Caddy to replicate what happens in jwilder/nginx-proxy and I was able to get things working, but I did not use it in production, because such a setup would be brittle from maintenance perspective in the academic research environment I work. Currently, there is just an official Docker image for Traefik that we use and there is a config file associated with it. Any changes in Traefik are not expected to break current setup anytime soon. When a plugin for Caddy is built with the similar promise, we can use it with more comfort.

Thanks for the details, @ibnesayeed -- I think that's helpful. In the meantime, anyone is welcome to write a plugin that does what you describe!

@ibnesayeed
Have you tried https://github.com/lucaslorentz/caddy-docker-proxy ? I posted it some comments above.
It does watch for new services on docker swarm, it generates in-memory caddyfiles and reload caddy using signals.
It supports any configuration for caddy by converting docker service labels into caddy directives.
You can include the plugin on your own build, like this:
https://github.com/lucaslorentz/caddy-docker-proxy/blob/master/main.go#L5
Or just use the docker image I provided.
I've been using it for months in production. I still need to add it to caddy pages, but I really suck at writing docs 😄 . Any help would be welcome.

@lucaslorentz this is fabulous. I casually looked at its code. It just needs some polish and documentation, then it should be added in the official Caddy docs.

@lucaslorentz Great! Let me know if I can help get it on the Caddy website for others to use. :+1:

Thanks @mholt  @ibnesayeed
I will improve readme, tests and build, then I will open PRs to add it to caddy website.
I'm sure an experienced golang developer would see a lot to improve. So, PRs are welcome.

I have reported a couple of issues in your repo @lucaslorentz.

@ibnesayeed Awesome! Thanks for taking time to do that.

@mholt
Just updated the repository and registered the plugin. It's being analyzed.
I felt this plugin didn't fit very well on the current format of description + examples.
That's because instead of creating Caddyfile configuration, the user must create labels on Docker Swarm services.
Maybe it's my lack of creativity. 😄

@mholt
Just downloaded a build from Caddy Download and it worked!

@lucaslorentz Awesome! That's great news!

I felt this plugin didn't fit very well on the current format of description + examples.
That's because instead of creating Caddyfile configuration, the user must create labels on Docker Swarm services.

Indeed; most plugins do have some Caddyfile configuration. But you should feel free to put any kind of example in there that makes sense, even if it is not about Caddy.
So glad to hear that it worked! Thanks for registering your plugin! I'll try to tweet about it tomorrow.
Does that close this issue then?

This issue requests something a bit different than the plugin, but a lot of things changed in docker scene since 2015, when the issue was opened.
The plugin is aligned with similar products, like Traefik and Kubernetes Ingress controller and is tailored to explore the most of Caddy features.
I vote on closing the issue.

That's because instead of creating Caddyfile configuration, the user must create labels on Docker Swarm services.
Maybe it's my lack of creativity. smile

In this case these configurations are well-suited as Docker labels to allow ad-hoc routing. If we can think of some configurable behavior of thee plugin itself then that can go in a Caddyfile.

And I do think something like this is best implemented as a plugin -- at least, for the foreseeable future. So, thanks!
For Kubernetes, see https://github.com/wehco/caddy-ingress-controller or maybe https://github.com/drud-archive/router. :)


How to change input text to textarea input field?

Hi, I am using this plugin by this work file with input field text. But I am trying to use in textarea, this is showing error:-
error :- InvalidValueError: not an instance of HTMLInputElement
Please help me to use in text area like this:- <textarea placeholder=" text " googleplace></textarea>

js?libraries=places&sensor=false:40 InvalidValueError: not an instance of HTMLInputElement
error generated by google. but it is working o)


Add PaLM connector and it's example (new)

Motivation and Context

Description

it's using Hugging Face Connectors style of coding, so the usage is similar.
Contribution Checklist

[ ] The code builds clean without any errors or warnings
[ ] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
[ ] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
[ ] All unit tests pass, and I have added new tests where possible
[ ] I didn't break anyone :smile:

Ok, take a look the new commit..  https://github.com/microsoft/semantic-kernel/pull/1621/commits

all ok

Please fill the Motivation, Context and Description sections of this PR header so everyone understands what's the PR about.

@mifmasterz Thank you for contribution!
In order to proceed with this PR, please complete following steps:

Extend PR description and provide an information with links included about PaLM, what changes have been added, how to test them, in case local setup is needed, provide a description how to setup an environment.
Add unit and integration (if possible) tests. Current PR doesn't contain any tests.
Check Contribution Checklist section in PR description, make sure all checklist items are completed and mark them as Done.

Please do the same for LLama Connector PR: https://github.com/microsoft/semantic-kernel/pull/1622.
Let us know when all steps are completed, so we will proceed with review and manual testing from our side.
Thanks again!

Please build in using Release configuration in VS and fix all warnings.


Are GaloisKeys or Ciphertexts PODs? If not, could you make them?

Is there any way I can write raw bytes of GaloisKeys or Ciphertexts to memory, and later just get a pointer, typecast it, and get my galoiskeys and ciphertext back intact without having to serialize/de-serialize? The serialization is really killing me.

In principle a ciphertext is pretty simple: a dynamic heap-allocated byte array and a couple of fields. It would certainly be possible to merge all of the fields into the same buffer and have one big byte array representing the data. I know this could be convenient in some scenarios, but serialization (without compression, and soon with Zstandard compression) is pretty fast compared to many of the HE operations. What aspect of serialization is most problematic for you at the moment? Maybe there is a way we could fix that instead?
A public key is the same as a ciphertext, and Galois/relinearization keys are collections of ciphertexts, so any change to ciphertext should immediately apply to these classes as well.

Essentially, I am reusing ciphertexts/GaloisKeys/RelinKeys a lot....like a lot...but, functions go in and out of scope, so I need to store some ciphertexts in memory often -- I am restricted to a C interface. If it was a POD type, I could use a pointer, typecast it and save a tonne of computation and memory accesses traversing kilobytes of data to decompress once and then reading again to do the actual operations. That is a cost that scales with my computations and is totally unnecessary.
My problem with serialization is that it exists at all -- not true, that's a bit extreme, but its the only available way to store ciphertexts/galoiskeys/relinkey types into memory ...I don't need it, it hinders performance; like, the hindering scales with the amount of computation I do, which makes it infinitely worse as I process more data. I want simple POD types, fixed sizes, that can be type casted to compute stuff.
If it was a struct, I just mem copy the bytes into a block of memory, keep the pointer around, and every time i need to use data in that struct, I just type cast it (which costs like two instructions, instead of thousands like decompressing) and access members as normal. Almost no overhead -- literally a few instructions.
I must mention, compression does nothing for my use case. Memory is not a bottleneck at all and I have plenty of it.
 Could you just allocate the ciphertexts or key objects from the heap and pass those pointers around?
seal::Ciphertext *my_ct = new seal::Ciphertext();
// use it and pass around wherever.
delete my_ct;

If you want to use SEAL purely from C, that's possible as well with the SEAL_C wrapper library, which is almost complete in terms of functionality. It was not really meant to be used directly (we used it to build the C# wrappers), so you may have to replicate some of the work we did for C# in C, but it's all possible and shouldn't be too much work unless you really need the complete SEAL API available.

No.
I need to allocate a block of memory, and place the ciphertext/relinkeys/galois in that block of memory I allocated; new will allocate its own thing somewhere and in C land I dont want to know what happens over time with memory alloc/dealloc with new/delete nor do I want to find out. Not to mention the Ciphertext class itself has its own memory pool manager.  I need to place ciphertexts, relin keys, and GaloisKeys in a struct and be able to treat it like legit POD; i need the typecasting to avoid serializing/deserializing and to avoid unnecessary reads, but also to keep track of memory to avoid leaks over time and unnecessary headaches between C/C++ subtleties when it comes to memory management.
I want to be able to manage the memory where these objects are placed because I don't know what will happen in C land, also because over time I can reuse the stuff I allocate magically without having to alloc/dealloc unnecessarily with new/delete. Memcopy is a great simultaneous destructor/constructor; I would just overwrite stuff, no allocations needed. To do so I need a POD.
In short, if I get to allocate the memory with, say malloc, and then place the ciphertext/relin-keys/galoiskeys objects in that block of memory as a POD in any order I see fit, then yes.

To answer your question: Unfortunately the data structures in SEAL are really far from POD and I don't think there is any chance to change the library so much to make that happen.
SEAL uses its own memory manager to ensure reuse of allocated memory; this works well because the allocations are often of only very specific sizes. I'm still not sure I understand what headaches you would expect from differences in C and C++ memory allocation. Are you writing your own HE implementation in C that would be able to operate on SEAL objects? Otherwise I don't see the problem of allocating memory in C++ and using it again in C++ (in SEAL function calls).

The POD would be read only. It would never be used as an output; there would never be any writes to it. I just need to be able to convert a Ciphertext into a POD so that I may use it as input for future calculations.
My suggestion above takes care of the internal memory allocation; that is, it would be unnecessary as once a POD is created it would never change size or need reallocation or fancy pointers pointing outside the POD itself; pointers for internal structures should be at an offset of the beginning of the POD into the right "member".

Objects in SEAL such as Ciphertext, PublicKey, RelinKeys, and GaloisKeys do require resizing. The data_ member of a Ciphertext is a pointer to a memory occupied by a variable number of polynomials whose sizes can change. Without resizing, memory consumption in SEAL goes up, and many memcpy calls should be made instead of one.

Objects in SEAL such as Ciphertext, PublicKey, RelinKeys, and GaloisKeys do require resizing. The data_ member of a Ciphertext is a pointer to a memory occupied by a variable number of polynomials whose sizes can change. Without resizing, memory consumption in SEAL goes up, and many memcpy calls should be made instead of one.


Support the native snapshotter on FreeBSD

This PR adds support for the native snapshotter on FreeBSD using FreeBSD nullfs.
The native snapshotter passes its test suite and is able to unpack an image for the freebsd/amd64 platform:
% freebsd-version
12.1-RELEASE-p4
% pwd
/home/sam/go/src/github.com/containerd/containerd/snapshots/native
% sudo go test -v -test.root .
[...trimmed output...]
--- PASS: TestNaive (0.01s)
    --- PASS: TestNaive/Basic (0.03s)
    --- PASS: TestNaive/128LayersMount (4.04s)
    --- PASS: TestNaive/RootPermission (0.01s)
    --- PASS: TestNaive/CloseTwice (0.00s)
    --- PASS: TestNaive/StatInWalk (0.01s)
    --- PASS: TestNaive/ViewReadonly (0.01s)
    --- SKIP: TestNaive/Rename (0.00s)
    --- PASS: TestNaive/MoveFileFromLowerLayer (0.03s)
    --- PASS: TestNaive/DeletedFilesInChildSnapshot (0.03s)
    --- PASS: TestNaive/RemoveIntermediateSnapshot (0.01s)
    --- PASS: TestNaive/DirectoryPermissionOnCommit (0.04s)
    --- PASS: TestNaive/Chown (0.03s)
    --- PASS: TestNaive/RemoveDirectoryInLowerLayer (0.04s)
    --- PASS: TestNaive/LayerFileupdate (3.85s)
    --- PASS: TestNaive/Walk (0.01s)
    --- PASS: TestNaive/Remove (0.01s)
    --- PASS: TestNaive/Update (0.03s)
    --- PASS: TestNaive/PreareViewFailingtest (0.01s)
    --- PASS: TestNaive/TransitivityTest (0.01s)
    --- PASS: TestNaive/StatComitted (0.01s)
    --- PASS: TestNaive/StatActive (0.01s)
PASS
ok      github.com/containerd/containerd/snapshots/native       8.226s

% sudo ctr i ls
REF     TYPE                                    DIGEST                                                                  SIZE      PLATFORMS     LABELS
freebsd application/vnd.oci.image.index.v1+json sha256:960c76846cd112e09032c88914458faee8d03c04b8260dfbc4da70b25227534a 236.8 MiB freebsd/amd64 -

samuelkarp force-pushed the samuelkarp:freebsd-native-snapshotter branch from 2fb04a0 to b667c15

Rebased on top of the current master; no changes to the diff.

samuelkarp force-pushed the samuelkarp:freebsd-native-snapshotter branch from b667c15 to b624486

Rebased on top of the current master; no changes to the diff.

I believe the devicemapper failures are unrelated to my change as the only change on Linux is a reordering of mount options for the native snapshotter.


Compatible TFT screens / or replacements

Can I replace the screen from your project by this https://aliexpress.ru/item/4000302982264.htm ?
May be you have list of compatible screens?

When I tried to access your aliexpress link got an error page.
The TFT is very speciried 320x480, ILI9488 controller, capacitive touch
screen, and 16 bit parallel data pins. I spent a lot of time on aliexpress
and didn't find any better than the one from buydisplay.com which is also a
stable source.
Recently somebody pointed me to the "3.5 LCD CTP" here and I ordered two
for evaluation. If it will work, it will require some changes in the PCB.
https://www.aliexpress.com/item/32862869103.html?spm=a2g0s.90423<IP_ADDRESS>1c4c4dHx7266
For now, I strongly recommend getting the one from buydisplay.com.
On Sun, May 9, 2021 at 2:23 AM vakuliniv @.***> wrote:

Can I replace the screen from your project by this
https://aliexpress.ru/item/4000302982264.htm ?
May be you have list of compatible screens?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/zapta/simple_stepper_motor_analyzer/issues/7, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAQVMQK25V7KW6LHCLVFZRDTMZICDANCNFSM44OZIFXQ
.

Sorry, that is right link
https://aliexpress.ru/item/4000302982264.html
as I can understand this screen is maximal close to original screen, perhaps.
I asked, because is some problems with delivery to my country from  buydisplay.com

FYI, I just released a new design which is based on a bare TFT (cheaper) and the Raspberry Pi Pico (more RAM, ROM, speed).
https://github.com/zapta/simple_stepper_motor_analyzer
It also include a general BOM and in the JLCPCB directory bom and pos file for the JLCPCB SMD service for some of the parts.
https://github.com/zapta/simple_stepper_motor_analyzer


On browser's screen taller then 700px custom dialogs look bad

Custom dialog goes to top hiding its upper side behind the screen. I guess it happens because:
@media all and (max-height: 700px) {
.dg-content-cont--floating {
    position: relative;
    top: 10%;
    -webkit-transform: none;
            transform: none;
    margin-top: 0;
}

and on the screens taller than 700px it switches to absolute position with transform:
.dg-content-cont--floating {
  position: absolute;
  top: 35%;
  -webkit-transform: translateY(-70%);
          transform: translateY(-70%);
  margin-top: 0;
}

And I cannot find the way to override it...

Hi @symonsoft , were you able to find a solution?


switch between mouse and touch without reload doesn't work on windows devices.

Still the issue persists. On a device which doesn't have touch support I was able to sign on the pad with the mouse. But when a device with touch support, only touch is working where as when I tried to use mouse it is not working.

@princeallennoel would you be able to submit a fix?


#676 pk constraint

Resolves #676
Description
This PR makes sure that the column constraints are added before the table constraints.
The order matters for the primary_key constraint, which requires the column to have a not_null constraint. At a later moment, I suppose, the unique constraint should be present too.
I don't think the order matters for other (supported) contraints.
Checklist

[ ] I have run this code in development and it appears to resolve the stated issue
[ ] This PR includes tests, or tests are not required/relevant for this PR
[X] I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

I am not sure how to build and test this yet. Existing unit tests seem to still work.

I'm going to pull-push to run the integration tests

This fails an integration test:
  Cannot create the primary key `475b7994e83a4721f278bf15984ac8d8` because its child column(s) `n` is nullable. Please change the column nullability and retry.

The failing test is the exact thing I'm trying to fix. Will investigate.

The failing test is the exact thing I'm trying to fix. Will investigate.

It's not actually. It's a FK constraint that is failing now.

@benc-db Could you re-run the integration-tests?

Assuming you are done, I'm ready to merge.  Thanks again.

Assuming you are done, I'm ready to merge. Thanks again.

If  you are happy, go ahead :)


[DRAFT] For Discussion - Add spid to Locale as a app/whitelabel translation solution

Add spid to Locale as a app/whitelabel translation solution
NOTE: Just for discussion
Work in progress, does not compile, not in any way finished code.

Close for now, another option is extra Menu entries and permissions for each. or a Link menu - with the permission.


Make products to double column for products in Mobile view

Hello contributors, as you can see i am using bootsrap class 'container' and flex box to display the products, i want someone to fix the responsiveness and make two columns for products in mobile view.

Hey, @arpittyagi102, I want to work on this issue. Please assign it to me.

Hello @vatan999, I have assigned you the issue, you may start working on it


Translation API and agents

Translation agent and Language agent officially work, you can say something like "Change language to Spanish" so that assistant talks back in Spanish or something like "Translate dog from English to French"
Also agents from previous PRs (tip, currency, unit, maps)

Had to change commit email


Tweaks: resource-> resource object

:+1: i've got a few of these in my read through pr but i haven't gotten this far.

thanks @ethanresnick!


What's the syntax to hipify an entire application?

What's the syntax to hipify an entire application (https://gitlab.com/unigehpfs/palabos) i.e. all the files containing cuda code located in a program source directory and its subdirectories?
The application uses c++ std parallel offloading and meets the requirements described here: https://rocm.blogs.amd.com/software-tools-optimization/hipstdpar/README.html . According to my quick check which offloading policy is implemented searching for the string "execution::par..." , only "execution::par_unseq" came up.
I am using Ubuntu 22.04 with the latest ROCm rocm-6.2.0 installed.

Hi @klausbu, I haven't looked into the specific repo, but hipify-clang supports JSON compilation databases (see documentation at https://rocmdocs.amd.com/projects/HIPIFY/en/latest/hipify-clang.html#using-json-compilation-database); give this a shot for automation of HIPIFY.

hipify-clang accepts multiple source files in a single command line: https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/hipify-clang.rst#usage
For per-directory hipification, there is a script: https://github.com/ROCm/HIPIFY/blob/amd-staging/bin/hipconvertinplace.sh


Added a demo-build script.

Added a demo-build script. Fixed a typo on the demo page. Fixed a typo in the server script.

@adampickeral @underbyte @willcumbie What say you?

LGTM

scripts/server already builds the demo files and starts an http server serving them up

@adampickeral It didn't when I ran it this morning. No demo/bundle.js was created.

@wpwood make a change and it will.
you can add this line ./node_modules/.bin/grunt demo-build before this line ./node_modules/.bin/grunt watch & node node_modules/.bin/http-server in scripts/server and it will build it when you first run the script

i tried checking this out and i can't install without the sudo command

i guess it works if i run sudo scripts/setup... but sudo is still required

@adampickeral Dunno. You shouldn't have to sudo npm unless you're installing something globally. Usually the issue is that you ran npm with sudo sometime in the past and forced a node module to be owned by root.

ok i think i fixed my sudo issue. get rid of the demo-build script and update the server script and :+1:

@adampickeral I did
./node_modules/.bin/grunt demo-build && ./node_modules/.bin/grunt watch & node node_modules/.bin/http-server

so that the server command will exit if the demo-build fails.

I'd also love to rename the branch, but I think it will require a new pull request and losing the discussion :)

cool, no need to rename the branch. do squash those two commits into one, and follow the commit message guidelines here: https://github.com/rackerlabs/canon-react/blob/master/CONTRIBUTING.md (this would be a 'chore' type of change). you can look at some of the recent merges for example commit messages

LGTM


Feature Request: Row Grouping

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

Row grouping based on like properties. I am using this table to load in massive amounts of data, as much as 16k rows. I would like to be able to have these condensed into groups based on defined an array of defined properties (So that I can have groups within groups). For example if I had a list of cities and wanted to group the rows first by country and then by city.
data = [
    {company: 'aaa', city: 'Berlin', country: 'Germany'},
    {company: 'bbb', city: 'Berlin', country: 'Germany'},
    {company: 'ccc', city: 'Aachen', country: 'Germany'},
]

...

<ngx-datatable [rows]="data" [groupBy]="[{name: 'Country'}, {name: 'City', prop: 'city'}]" ...

Dupe of #35


example_data_generator doesn't create users or assignments

The current version of the example_data_generator only creates motions and topics (or it adds the motions as topic).
But it does not create admin_users or staff_users, even though the script shows no error:
$ python manage.py create-example-data
Start creating 100 topcis ...
100 topcis successfully created.
Start creating 100 motions ...
100 motions successfully created.
Start creating 100 assignments ...
100 assignments successfully created.
Start creating 100 staff users ...
100 staff users successfully created.
Start creating 100 default users ...
100 default users successfully created.

It seems they are somewhere, because on a second execution the script throws an error:
$ python manage.py create-example-data
Start creating 100 topcis ...
100 topcis successfully created.
Start creating 100 motions ...
100 motions successfully created.
Start creating 100 assignments ...
100 assignments successfully created.
Start creating 100 staff users ...
FAILED: The requested staff users to create are already existing...
Start creating 100 default users ...
FAILED: The requested staff users to create are already existing...

But the users are not selectable (as in motion assignemnts) or viewable (as in user overview) in the client. Assignments are also not visible in the client. Motions and Topics work as expected.

Still the same error with current master...
FAILED: The requested staff users to create are already existing...

Retested with fresh (sqlite) database. Works now. 100 normal users and 100 staff users are created successfully.


Show missing roles in err msg and fix err code

https://github.com/rancher/rancher/issues/18326

LGTM


Add "isDestroyed" method for objects with "destroy" method

We had lots of different APIs for checking whether an object is destroyed, and none of them is public, this PR tries to add a isDestroyed API to balance the destroy API and makes styles more consistent.
The isDestroyed API will stay undocumented for a while in case there is better way to do this.

:+1:

@zcbenz I tried using this in Electron 0.35.3, but it seems it's not available.

Thank you! Works fine now :)