InvalidRequestError: Class does not have a table or tablename specified and does not inherit from an existing table-mapped class.

Hi,
First of all congrats on the new release! This will allow us to go back to a pinned version of flask-sqlalchemy instead of the master branch 👍
On the other hand, the change #467 now generates this stack-trace in the Flask-AppBuilder project which I would need some help investigating to be able to use release 2.2 directly:
12:48:03   File "/src/<module_name>/models.py", line 10, in <module>
12:48:03     from flask_appbuilder.security.sqla.models import User
12:48:03   File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/security/sqla/models.py", line 12, in <module>
12:48:03     class Permission(Model):
12:48:03   File "/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/__init__.py", line 602, in __init__
12:48:03     DeclarativeMeta.__init__(self, name, bases, d)
12:48:03   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/api.py", line 55, in __init__
12:48:03     _as_declarative(cls, classname, cls.__dict__)
12:48:03   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/base.py", line 88, in _as_declarative
12:48:03     _MapperConfig.setup_mapping(cls, classname, dict_)
12:48:03   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/base.py", line 103, in setup_mapping
12:48:03     cfg_cls(cls_, classname, dict_)
12:48:03   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/base.py", line 133, in __init__
12:48:03     self._setup_inheritance()
12:48:03   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/base.py", line 429, in _setup_inheritance
12:48:03     "table-mapped class." % cls
12:48:03 InvalidRequestError: Class <class 'flask_appbuilder.security.sqla.models.Permission'> does not have a __table__ or __tablename__ specified and does not inherit from an existing table-mapped class.

The error message contradicts the model declaration as it does have a __tablename defined:
class Permission(Model):
    __tablename__ = 'ab_permission'
    id = Column(Integer, Sequence('ab_permission_id_seq'), primary_key=True)
    name = Column(String(100), unique=True, nullable=False)

    def __repr__(self):
        return self.name

I understand that this change is related to the @declared_attr decorator but despite reading http://docs.sqlalchemy.org/en/latest/orm/extensions/declarative/api.html#api-reference I don't really know exactly how I should apply it to the model.
Thanks for your help

BoundDeclarativeMeta must be paired with a subclass of flask_sqlalchemy.Model. Is there a reason you're not using db.Model? If nothing else, your base model needs to inherit from flask_sqlalchemy.Model.

@davidism This does seem to be an issue. Using a tablename declared_attr from a 'mixin' does not work:
    def test_tablename_mixin(self):
        app = flask.Flask(__name__)
        db = fsa.SQLAlchemy(app)

        class Duck(db.Model):
            __abstract__ = True

        class NameMixin():

            @declared_attr
            def __tablename__(cls):
                return 'drake_mallard'

        class Darkwing(Duck, NameMixin):
            id = db.Column(db.Integer, primary_key=True)

        class Donald(Duck):
            id = db.Column(db.Integer, primary_key=True)

        self.assertEqual(Darkwing.__tablename__, 'drake_mallard')
        self.assertEqual(Donald.__tablename__, 'donald')

Results in the following test failure:
======================================================================
FAIL: test_tablename_mixin (__main__.TablenameTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_sqlalchemy.py", line 359, in test_tablename_mixin
    self.assertEqual(Darkwing.__tablename__, 'drake_mallard')
AssertionError: 'darkwing' != 'drake_mallard'
- darkwing
+ drake_mallard

I do notice in the execution the following error is spawned:
sqlalchemy/ext/declarative/api.py:182: SAWarning: Unmanaged access of declarative attribute __tablename__ from non-mapped class Base
  (desc.fget.__name__, cls.__name__))

Perhaps I'm using my name mixin wrong?

@davidism it also appears that the solution that I had previously used in my own project, monkey patching _should_set_tablename with a lambda that always returns false, does not work any more and renders the following error:
sqlalchemy.exc.InvalidRequestError: Class <class MyClass > does not have a __table__ or __tablename__ specified and does not inherit from an existing table-mapped class.
ERROR: could not load /some/path/test/conftest.py

@davidism @MichaelPereira
I think I might have found something. The ordering of the base classes is important (now). If you add your name-mixin class as the first base-class, the error goes away. For the test case I posted above, changing to:
    def test_tablename_mixin(self):
        app = flask.Flask(__name__)
        db = fsa.SQLAlchemy(app)

        class Duck(db.Model):
            __abstract__ = True

        class NameMixin():

            @declared_attr
            def __tablename__(cls):
                return 'drake_mallard'

        class Darkwing(NameMixin, Duck):
            id = db.Column(db.Integer, primary_key=True)

        class Donald(Duck):
            id = db.Column(db.Integer, primary_key=True)

        self.assertEqual(Darkwing.__tablename__, 'drake_mallard')
        self.assertEqual(Donald.__tablename__, 'donald')

eliminates the problem. This isn't a desirable solution, however.

The order of base classes has always mattered in Python, bases are scanned left to right. So I'm not going to consider that part a bug.
__tablename__ being ignored in mixins is a bug and is already reported in #470.
I'm fairly sure this issue has to do with their use of a completely separate Model.

@MichaelPereira did you have a chance to try out my initial suggestion? I'd like to know if this is actually a bug so I can work on 2.2.1 over the weekend.

I'm quite sure it is a bug, it also fails in my application in this model - and no mixins are involved there: https://github.com/indico/indico/blob/master/indico/modules/events/registration/models/items.py

I'm going to need a minimal example. These projects are nice but it's hard to trace what's going on. Just to confirm, you're saying this is a different bug, not a duplicate of the other __tablename__ issues? From my initial look at this bug, the op is using a completely independent base model that does not have the expected interface.
Their base model class should look like
from flask_sqlalchemy import Model as _BaseModel

# no as_declarative here, that's what make_declarative_base does
class Model(_BaseModel):
    ...

@davidism thanks for looking into the problem. I'm sorry for not getting back earlier as we got swamped with the S3 outage in the meantime. I will try to get a reproducible example out of it since our tool is not open-source to help the resolution of the bug.

@MichaelPereira oh, I was under the impression that your project was Flask-AppBuilder, since you linked to its source. The issue appears to be there, although an example is still useful.

I contributed a little to it, but our project builds upon-it. Anyway, if it's fixed for Flask-AppBuilder, it will be fixed for everyone using it :)
It took me a few hours but I was able to get a reproducible error with just the bare minimum. Here are the steps:

clone https://github.com/MichaelPereira/Flask-AppBuilder.git
create a docker image from that repo: docker build -t . Note the docker container id at the end
go to the registration_user example folder: cd examples/user_registration/
run the docker image with that example: docker run -v pwd:/app <container_id>  python /app/run.py
You should get the following stack-trace:

$ docker run -v `pwd`:/app 1741cdc3a399  python /app/run.py
/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
  'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
Traceback (most recent call last):
  File "/app/run.py", line 1, in <module>
    from app import app
  File "/app/app/__init__.py", line 16, in <module>
    appbuilder = AppBuilder(app, db.session)
  File "/usr/local/lib/python3.5/site-packages/flask_appbuilder/base.py", line 130, in __init__
    self.init_app(app, session)
  File "/usr/local/lib/python3.5/site-packages/flask_appbuilder/base.py", line 147, in init_app
    from flask_appbuilder.security.sqla.manager import SecurityManager
  File "/usr/local/lib/python3.5/site-packages/flask_appbuilder/security/sqla/manager.py", line 7, in <module>
    from .models import User, Permission, PermissionView, RegisterUser, ViewMenu, Role
  File "/usr/local/lib/python3.5/site-packages/flask_appbuilder/security/sqla/models.py", line 12, in <module>
    class Permission(Model):
  File "/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py", line 602, in __init__
    DeclarativeMeta.__init__(self, name, bases, d)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/ext/declarative/api.py", line 64, in __init__
    _as_declarative(cls, classname, cls.__dict__)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/ext/declarative/base.py", line 88, in _as_declarative
    _MapperConfig.setup_mapping(cls, classname, dict_)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/ext/declarative/base.py", line 103, in setup_mapping
    cfg_cls(cls_, classname, dict_)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/ext/declarative/base.py", line 133, in __init__
    self._setup_inheritance()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/ext/declarative/base.py", line 430, in _setup_inheritance
    "table-mapped class." % cls
sqlalchemy.exc.InvalidRequestError: Class <class 'flask_appbuilder.security.sqla.models.Permission'> does not have a __table__ or __tablename__ specified and does not inherit from an existing table-mapped class.

About the make_declarative reference, I don't have enough knowledge to properly understand what it is doing but I know that Flask-AppBuilder defines it this way https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/models/sqla/init.py#L23-L39
We had an issue with the number of argument, so we had to change it this same way in our project too: https://github.com/MichaelPereira/Flask-AppBuilder/pull/1/files#diff-d35cb966075d5560db04866a27e50fc8
Thanks again for your help and please let me know if I can be of more help

Closing this as it seems to be an issue with Flask-AppBuilder, not directly related to the tablename issue. Check #541.


Use swagger with Spring 5 Functional Web Framework with Java

Hi All,
I try to use swagger with swagger with Spring 5 Functional Web Framework and Java.
An example, I have this router class and I want to generate the swagger specification.
Is this functionality exists in latest version ?
@Configuration
public class Routes {

@Autowired
private CyclistHandler cyclistHandler;

@Bean
public RouterFunction<ServerResponse> routerCyclist() {
    return route(GET("/cyclists"), cyclistHandler::handleFindAll)
            .andRoute(GET("/cyclists/{id}"), cyclistHandler::handleFindById)
            .andRoute(POST("/cyclists"), cyclistHandler::handleCreate)
            .andRoute(PUT("/cyclists/{id}"), cyclistHandler::handleUpdate)
            .andRoute(DELETE("/cyclists/{id}"), cyclistHandler::handleDelete);
}

}
Thanks for the help.

Swagger-core is not intended to be used with Spring but rather JAX-RS. Please take a look at Springfox.


 creates  which only links to "/child", not "/parent/child" – despite correct data shown in Vue devtools

Versions
nuxt: v2.15.7
node: v16.13.1
Reproduction
https://62ea4489e332eb0008df7682--middle-plane.netlify.app/stories/christo-jeanne-claude-me
Click on "cart" at the above link. It should link to /stories/christo-jeanne-claude-me?cart=open but it only links to /christo-jeanne-claude-me?cart=open
Steps to reproduce
<NuxtLink :to="$route.path"> creates <a> which only links to "/child", not "/parent/child" – despite correct data shown in Vue devtools. For evidence, please see below screenshot of the slug in mappedSubheader, vs. the url revealed by Chrome for the hovered cart link.

Hi! In this case,  $route.fullPath would be more suitable.

Thanks @houdiini! But actually either should work for my needs in this use-case and neither does.

Please note – this happens even if I just do:
<nuxt-link class="navigation-link" :to="$route.fullPath">
i.e. no computed properties, nothing – referencing the $route directly.  Vue Devtools still reports the correct value for $route.fullPath, but the <nuxt-link> does not.

As a workaround I’m using @click="$router.replace(${$route.fullPath}?cart=open)" on a span tag, but this feels like a bug with Nuxt that I can’t use <NuxtLink> in the way described above.

Can't reproduce this anymore.


fix diagnose if hashtag not found.

Description
Fix diagnose message if not installed from pip
Checklist
Essentials

[x] Changes are complete (i.e. I finished coding on this PR)
[x] To my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@szha


Question: Suggestion for an integration with Oauth (2)

For sharing of session on other sites.  Im hoping for someone with experience with Aqua or its dependancies who might be able to suggest to me a high level architecture or hints before I start this.
Ideally, I would be able to allow users to Authenticate using OAuth on 3rd party sites, but my aqua based API will allow them to securely allow their data to be shared on that site.

For authentication take a look at Bell.
https://github.com/hapijs/bell

Thanks, looks great!

Anybody has tried the integration of bell with aqua? I think will be quite useful to support also OAuth in aqua using Bell

The bell docs should have all the code examples necessary. Server side Aqua is just a vanilla hapi server.
I've decided against having 3rd party auth being built-in by default. It's a reasonably easy upgrade for anyone creating their own project.


docs: Add SSM Public Param usage to docs

Detail

Add SSM Public Param usage to docs

Relates

#2434

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

AWS CodeBuild CI Report

CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
Commit ID: 40dd2e41e8404c9476604d6c9e9be98770cbfb9c
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
Commit ID: fe49c7906f7cfbcca365dc566a85a24448df31bd
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
Commit ID: 40dd2e41e8404c9476604d6c9e9be98770cbfb9c
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
Commit ID: fe49c7906f7cfbcca365dc566a85a24448df31bd
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Thank you @malachi-constant !


Komanda on Linux?

Do you plan to support linux — make a .deb available / add it to the ubuntu software centre / make a ppa?
Thanks!

Yep, that fixes it on fedora as well: sudo ln -s /usr/lib64/libudev.so.1 /usr/lib64/libudev.so.0
yum provides libudev.so.0 doesn't seem to find packages providing it so I guess that's a way to fix it.


nix: don't filter source

this prevents the current issue where required files are filtered out by nix before building. this was originally meant to avoid rebuilds due to non-code changes, but it should be fine

Thanks so much for your work!


refact: Breaking Change - Modify named params style in Athena formatter

Feature or Bugfix

Refactoring

Detail
Modifying named parameters style in Athena queries so it follows PEP 0249 convention
https://peps.python.org/pep-0249/#paramstyle
As a result user must pass :name instead of :name;
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

AWS CodeBuild CI Report

CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
Commit ID: 61f7b829b8f59be81c5c032688c96a2e6b1ac617
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: GitHubLoadTests5656BB24-s6u9F3qN9oFy
Commit ID: 61f7b829b8f59be81c5c032688c96a2e6b1ac617
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: GitHubStandardCodeBuild8C06-llutOAimTATs
Commit ID: 61f7b829b8f59be81c5c032688c96a2e6b1ac617
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido What happens if there are two parameters where one is a prefix of the other?
So we have :date and :date2. When the caller provides parameter values for date and date2, date will replace both of the parameters in the query, except the latter will be suffixed by 2. We need to make sure we are only replacing full tokens.


TriviaHelper does not handle SingleLineDocumentTrivia correctly when removing blank lines

Given the following code:
public class Foo
{
    private int i = 0;

    public int Prop
    {

        /// <summary>
        /// The setter documentation
        /// </summary>
        set
        {
            i = value;
        }
    }
}

TriviaHelper incorrectly asserts this accessor to not have leading blank lines because of it's documentation. I fixed this in #1252 and added a test for it. However, WithoutLeadingBlankLines() also doesn't work and I can't figure out how to fix that method.

After discussion, I would suggest moving this method back to SA1501 as it is specific for that. It's not as general purpose as you might guess from the title.

This method appears to be used in the code fixes for both SA1510 and SA1511. It does sound like it needs greatly improved documentation.

Grabbed

the previous PR was a typo :(

#1338 is still a valid PR for this issue though


No Pipeline Template for 'Node.js Function App to Windows on Azure'

https://learn.microsoft.com/en-us/azure/devops/pipelines/create-first-pipeline?view=azure-devops&tabs=javascript%2Ctfs-2018-2%2Cbrowser
I am testing a deployment for a node.js Windows function app. After I select the appropriate repo, the Configure step does not offer a template for 'Node.js Function App to Windows on Azure'. I've resorted to modifying a yaml file for the 'Node.js Function App to Linux on Azure' template but would be nice if there were an official template for this. Thanks.

@m365ken -- thank you for your feedback.  This repo is solely for documentation issues, and this seems product-related.  Please add it here:

Developer Community

I am closing this issue now.  You are welcome to @ mention me for any followup.  We hope to hear from you again.


docs: add basic contributor guide for docs

Description
Finishes the work started in https://github.com/apache/druid/pull/13868, which was to add basic contributor information for the Druid docs. That PR can be closed.
This PR has:

[x] been self-reviewed.

Couple nits otherwise LGTM.


Where to offer the JAR file that contains the JTLV-based solver?

As of<PHONE_NUMBER>9067960fbd021008393b4d4d90dd1b, gr1c is the default GR(1) solver. However, the JAR file that contains the JTLV-based solver (tulip/interfaces/jtlv_grgame.jar in the source tree) is still included among release distribution files, via MANIFEST.in. Because it is

an optional dependency and
a large file (2.3 MB) relative to other parts of a TuLiP release,

we should consider providing some other means to obtain the solver. However, I am not aware of any alternative point of distribution for it. Also note the current location of the JAR file: package data, as declared in setup.py. While we may continue to include it in the TuLiP repository, as an optional dependency it may be more appropriate under some other directory, like extern/.
The issue to be resolved here is how users should be able to obtain the JTLV-based solver if they want it. Possibilities:

keep it as-is, included in TuLiP releases and under tulip/interfaces/ (i.e., part of the tulip package itself).
include it as a supplemental file in the TuLiP release, but move it outside tulip, so that is not a part of the tulip Python package.
remove it entirely from the repository and place it on some public file server. In this case, we could try coordinating with other projects, e.g., LTLMoP.

The response that I originally favored was to move it under extern, and not include it in MANIFEST.in, because it blows up the distribution on PyPI, unnecessarily increasing the server load.
I support deleting it completely from the tulip repository, for the following reasons:

moving it to extern may create a new object in the git history, unnecessarily increasing the repository size (though I am not sure about this)

source code is not available for this particular binary, so its maintenance is impossible. Over time, its use will decrease, until it is deprecated completely, and useful only for archiving reasons to compare with past studies.

since optional, it is not by definition necessary to include it in the Python distribution archive.

if a Python solver is included or imported in the future, then that can serve as a default, inefficient pure-Python solver.

Instead, I suggest that a (very simple) script be added under extern, which:

fetches the file directly from either:

the GitHub repository (an older commit, where it exists undeleted, in a similar way as we can navigate to a specific "raw" file at a specific commit hash), or
from an archive placed at GitHub.

checks for java, and raises a warning or error if it is not found in the PATH.

This script can be included in MANIFEST.in, which conforms also to the purpose of extern.
Note that this treats (this specific binary of) jtlv as a separate entity for distribution.
In the future, command-line or "extras" options could be added to setup.py that invoke scripts from extern to fetch dependencies selected by the user.

I strongly support the recommendation by @johnyf above to delete it from the repository. This issue has been open for a while, and no one has provided arguments to keep the JAR file, so we shall wash ourselves. The action item is as follows.
Create a script under extern that fetches the JAR file. It will be easiest and most robust to obtain the file using an old commit, e.g., the last one in which the file was touched, f2c2d7203e795cbabcf9c75516f437475f9faa9e. The corresponding GitHub URI is https://github.com/tulip-control/tulip-control/raw/f2c2d7203e795cbabcf9c75516f437475f9faa9e/tulip/interfaces/jtlv_grgame.jar

I think that a fetching script is a good idea. Related projects (gr1c and others) use similar approaches for fetching CUDD, slugs or other dependencies, especially for automated testing with Travis.
Regarding the status of jtlv, I can confirm that it is currently unmaintained. There do exist current users, but I do not think that there is any reason for not using a pure Python solution, instead of one in Java.

I agree we should delete it from the distribution.  Leaving a path for people who want to install it to fetch it from our old distribution seems fine.  I wouldn't install it by default (for the many reasons already listed above).

Could someone using Mac OSX try extern/get-jtlv.sh ?

Regarding the solution proposed above by @johnyf , I do not check for java in the script that fetches the JAR file. The presence of java is already checked in setup.py, and I think that the script is generally more useful without requiring java.

Tested under OS X v.10.8.5 as of 1fa52c06dc14d7e7ba2c930a489c72225cdf7dc6.
I agree that the check for presence of java should better happen at a single place.
Regarding the comment above about a Python solver, noting that such a solver will become available for import in the near future.


scons does not remove dangling link target before buid

Hi
According to https://scons.org/doc/3.1.2/HTML/scons-user/ch13.html, when SCons determines that an target file needs to be rebuilt and removes the existing version of the target before executing.
Unfortunately the above is not true, when the target file for some reason is a symbolic link to non-existing file. In such a case scons leaves the broken symlink as is, and then runs target build action, which then might try to create target file in the destination of the symlink (for example g++ works like this).
Is there any possibility to convince scons to remove the target's dangling symlink before starting  build?

Do you have a small test case to demonstrate this issue?

Yes, I'm attaching a simple test case with two broken symlinks, that are not removed by scons, what causes g++ to follow them.
test-case.tar.gz

In your test case the symlink isn't created by SCons..
Is that the actual situation you're working with? Or is SCons creating the symlink for you?

Hi,
What I am trying to do is using symlinks to files in cache instead of copying them. (I know hardlinks would be much better, but the cache is on separate storage, so they can't be used.) The aim is to have better performance and lower disk usage.
Anyway, I've already created my own versions of  SCons.CacheDir.CacheRetrieve & CacheRetrieveSilent actions, in which I create those symlinks. I even remove dangling symlinks from there as well.
I'm still testing this solution, but everything seems to work pretty well so far unless the --cache-disable option is used, after the link target had already been removed, for example by a cron job that clears old files from the cache. In such a case g++ happily creates new file via the symlink in the cache. That's why I am seeking for solution that would allow me to remove the broken symlinks  before g++ is run.
I've recently learnt about AddPreAction(), but I am not sure if is it possible to add such action for any target. I do not know scons so well yet to get a list of all targets. But maybe it would be simpler if scons could somehow  remove such broken links on its own? I think it must use os.path.exists() somewhere; maybe it would be easy to use to replace it with  os.path.lexists()?
Thanks,
Robert


Full Hashicorp Vault integration

This builds on the existing Vault integration by moving all the login and auth code into the executor itself in Go, rather than relying on the external scripting to provider a valid token. Currently supports userpass auth, which is what has been supported in the shell script.

cc @dselans

Also, it's great you implemented the token cache reuse logic from VAULT_TOKEN_FILE directly in the executor instead the wrapper in bash script we had, great job as usual! 💯


[java] Stuff to reconsider once the editor uses RecyclerView

Set<Class> noSpans of classes we know we don't contain any spans of

Get rid of EmptyArray too

Maybe we can afford to run calcMax on the main thread & remove UiThreadWatcher

Then we can get rid of the synchronization and Threading and the Tuple* types and the nasty flushing code for UiThreadWatcher 👍

The noSpans optimization and EmptyArray were deleted
UiThreadWatcher and the tuple code were deleted


Fix UnicodeDecodeError issue (#2930)

Added handling of unicode-decode error and return correct HTTP status code when error occurred.
fixes #2930

Thanks for working on this. However, I've concluded that a different change is needed, see https://github.com/pallets/werkzeug/issues/2930#issuecomment-2299406766.


VSCode for Android tablets

I would like to suggest and request that VSCode be released for Android tablets.
I like a lot this app and miss it at Android tablets that I use to applications development.
I have used VSCode at Linux but I am migrating to Android and would like to continue using VSCode on Android if it was available.
Thank you for your very valuable work on VSCode, I hope that I can continue having this app as my main development tool.
Best regards,
Fernando Lima

@reob-info have a look at this => https://marketplace.visualstudio.com/items?itemName=adelphes.android-dev-ext

We've made Linux ARM builds available. It's a step closer, but publishing an APK is out of our scope, sorry.


Support on ROS2 client to ROS 1 server

I am currently trying to use a ROS 2 action client to call the follow_joint_trajectory action server hosted on the Melodic gazebo_ros_control, since it is unavailable in Dashing yet.
Currently your action bridge only seems to support one direction, which is bridging the ROS 1 client and the ROS2 server. It will be nice to have the reversed direction as well.

Sorry for the late response. https://github.com/ipa-hsd/action_bridge/pull/6 takes care of it. I will close the issue once it is merged.


Fix destination filename for the helios-solo zip

Instead of having the filename be a long string containing the Maven
project name and version, just go with "helios-solo.zip". This matches what
we do for "helios-debs.tar.gz".

:+1:


CAP-0042 integration work in Horizon

What problem does your feature solve?
CAP-0042 was merged in the "vnext" tree. When the protocol that enables it switches on, Horizon ingestion will break (meta format changed and archive format for transactions changes as well).
What would you like to see?
Right now we're planning to enable it in the same protocol release than Jump Cannon, and more changes on the meta front are coming as part of this, but it does not mean that this work cannot be started now.
One area that needs some support from Horizon/data pipeline outside of the protocol is that in the CAP, we claim that it will be "easy" to audit what validators are doing during nomination.
There are probably a lot of things that can be done on that front, at a minimal we should ingest the SCP messages that are already in the meta so that they can be ingested and queried (as part of that we need to expose the StellarValue that has information on which validator "won" nomination, and import the corresponding TransactionSet/GeneralizedTransactionSet).
What alternatives are there?
none.

I looked into what is required to support GeneralizedTransactionSet in Horizon a the question is: do we want to separate each TxSetComponent somehow in Horizon API (in /transactions)? I believe the answer is yes.
If so, we need to change the underlying ingest.LedgerTransactionReader API to support streaming txs for multiple TxSetComponents. Probably the easiest solution is to modify ingest.LedgerTransaction to include component ID which will be the index of v0Components array and then stream transactions in component ID order.
When it comes to Horizon API:

/transactions and /ledgers/{id}/transactions can be backward compatible (we can add set_id to protocols/horizon.Transaction object). We may add endpoint extension to list tx of a given tx set component, like /ledgers/{id}/transactions/set/{set_id}.
/fee_stats will be really hard (if not impossible) to upgrade because, if my understanding is correct, new sets can be created right before any ledger by validators and txs can be filtered by arbitrary strategy/selection. This is a case we need more information from CAP owners.
Regarding SCP messages, I think we can add them to /ledgers/{id}/scp but it would be great to have a complete list of values we need to expose from ScpInfo.

per scrum review, let's carve out the SCP support in horizon ingest/api as a separate ticket for scope.

further discussion in scrum, break down to further smaller functional areas for multi-person.


Macros

Introduce custom macros in the BaseURL. For now only the $hostname
macro is available.
Do not merge before https://github.com/grisu48/pasta/pull/51

This would provide a solution for https://github.com/grisu48/pasta/issues/48


Set proxy for all connections, fixes #4326

Commit 3eaa1bfd3b040cb644c7974d32047dc70037cf95 removed the use of http.DefaultClient and created the client with a new transport - this removed the default setting for using a proxy (http.ProxyFromEnvironment).
This PR changes the http.Transport to use http.ProxyFromEnvironment again.
Signed-off-by: Christian Koeberl<EMAIL_ADDRESS>

Thanks!

Should I create another PR for the release branch release-2.10 or do you merge the change?

We cherry pick the changes into the release branch. I need to do that because there may be some manual patching involved. Thanks though!


Don't try to compare freed object to nullptr

Looks that object at which inspector pointed was freed during program work, so comparing this value with nullptr is dangerous.
I can't find exactly place when inspector starts to point at invalid memory, but since this code is executed at the end of life editor I'm almost sure that this will not create a new regressions.
This will again allow to check for memory leaks in the editor using Address Sanitizer
Fixes #37987

On IRC, reduz mentioned:
reduz> Akien: i have the feeling it should be set to null before the object is freed

I'm also confused by this issue, EditorInspector::edit() looks like this:
void EditorInspector::edit(Object *p_object) {
	if (object == p_object) {
		return;
	}
	if (object) {
		_clear();
		object->remove_change_receptor(this);
	}

	object = p_object;
...

You mean that object (here interface) is already freed when this happens? If so, doesn't memdelete(interface) on the next line still cause a double-free?

inspector is in scene tree, so it has been deleted before executing ShaderGlobalsEditor::~ShaderGlobalsEditor() inside NOTIFICATION_PREDELETE notification
https://github.com/godotengine/godot/blob/27763b67bb63139319bf611590c40e48663e72d6/scene/main/node.cpp#L154-L172
interface isn't in scene tree and isn't automatically deleted, so memdelete(interface) is valid and proper command which not cause any memory issue.

Should we then move inspector->edit(nullptr); to be handled in NOTIFICATION_PREDELETE for ShaderGlobalsEditor? Or is it good as is even without cleaning up the inspector's edit state?

For now there is no difference between cleaning state inside notification or not cleaning it at all, but looks that better is to leave variables with the correct state.

Thanks!


Firefox 63.0 breaks something in v. 3.7.0

It looks like in Firefox 63.0 the event animationEnd gets never fired if using v. 3.7.0
Using v. 3.5.2 of animate.css on Firefox 63.0, it works fine.
The website was working fine with 3.7.0 and Firefox 62.0.3.
The event has been found using this suggested code:
var animationEnd = (function(el) {
        var animations = {
            "animation": "animationend",
            "OAnimation": "oAnimationEnd",
            "MozAnimation": "mozAnimationEnd",
           "WebkitAnimation": "webkitAnimationEnd"
        }

        for(var t in animations) {
            if(el.style[t] !== undefined) {
                return animations[t];
            }
        }
})(document.createElement("fakeelement"));

I can't provide a non-working minimal example at the moment, I will try to provide more information tomorrow.

Ok, it looks like the animation does not start at all in Firefox 63.0, and therefore it never ends.
Try this jsfiddle with chrome and with Firefox, make sure that Firefox is updated: https://jsfiddle.net/bxjvLnc5/

Ok, I've found the source of the issue.
In the Windows Settings, the options "Show animations in Windows" needs to be enabled.
From Firefox's changelog: Firefox now recognizes the operating system accessibility setting for reducing animation

That's probably a bug in the prefers-reduced-motion media query implementation on the Firefox side. I  think it might be worth to file a bug directly to Firefox's issue tracker.
If you can take your take to file the bug, that would be great. You can do it here: https://bugzilla.mozilla.org/
Closing this as it's not fixable in the library itself.
Thanks for reporting!


Update dataviz getting started instructions to use GroupedBarChart, StackedBarChart & SimpleBarChart classes

@alisonjoseph How would I self-assign this issue? Not seeing the option to do that

Assigned you, not sure why you couldn't self-assign? Maybe github being weird? Or a setting we need to change?

Assigned you, not sure why you couldn't self-assign? Maybe github being weird? Or a setting we need to change?

It's a permissions issue, not sure what sort of permission I have on this repo

And thanks 🙂

Invited you to "maintainers" team for Carbon website, should have permissions to assign yourself to issues now I think. 🤞

yes I see the options now, perfect thanks!


Fail with error 'Amount must be greater than 0'

https://etherscan.io/tx/0x47e98c5e5b9388e908c9991131d67d5ec9b49602bf7191e6de37ede63ff0ac2d
Someone seems to have triggered a redeemAll for an amount of 0. I can't find a way to do this from our DApp. If it turns out that the DApp is passing 0 and displaying a number, this would be a big problem.

Closing this until someone can reproduce it 😐


Add Wren language

Added the Wren scripting language (grammar & sample). cc @munificent
Checklist:

[x] I am adding a new language.

[x] The extension of the new language is used in hundreds of repositories on GitHub.com.

Search results for each extension:

https://github.com/search?utf8=✓&type=Code&ref=searchresults&q=extension%3Awren+wren+NOT+nothack

[x] I have included a real-world usage sample for all extensions added in this PR:

Sample source(s):

Wren example on its website.
https://github.com/munificent/wrenalyzer/blob/master/parser.wren
https://github.com/munificent/wrenalyzer/blob/master/ast.wren

Sample license(s): MIT

[x] I have included a syntax highlighting grammar.
[ ] I have included a change to the heuristics to distinguish my language from others using the same extension.

Looks like licenses are still broken - could this be something to do with wren-sublime using a different header than just "MIT License"? GitHub the site doesn't seem to detect that it's MIT either.

Also the tests seem to fail due to origin/master not my changes. Have I done something entirely wrong? :fearful:

@lildude script/add-grammar is failing due to script/list-grammars throwing an error for the scope text.conllu :/
12:03 linguist > script/list-grammars
script/list-grammars:81:in `block in to_markdown': undefined method `chomp' for nil:NilClass (NoMethodError)
	from script/list-grammars:65:in `each'
	from script/list-grammars:65:in `to_markdown'
	from script/list-grammars:96:in `update_readme'
	from script/list-grammars:105:in `<main>'

Hmmm, I'm not sure why you're getting that error without seeing the full backtrace.
I'll see if I can reproduce this locally on a clean installation.

It's because licensee is throwing an error over a non-absolute system path.

Ahhhh. Makes sense. I like your fix better than mine. Stealing borrowing it for my PR 😉

Tried to apply your fix, @Alhadis, but nothing seems to have changed :/
Deregistering: vendor/grammars/wren-sublime
$ git submodule deinit vendor/grammars/wren-sublime
$ git rm -rf vendor/grammars/wren-sublime
$ script/grammar-compiler update -f
Registering new submodule: vendor/grammars/wren-sublime
$ git submodule add -f https://github.com/munificent/wren-sublime vendor/grammars/wren-sublime
$ script/grammar-compiler add vendor/grammars/wren-sublime
Confirming license
$ script/licensed
Updating grammar documentation in vendor/README.md
$ bundle exec rake samples
$ script/sort-submodules
$ script/list-grammars
  > script/list-grammars:81:in `block in to_markdown': undefined method `chomp' for nil:NilClass (NoMethodError)
  > 	from script/list-grammars:65:in `each'
  > 	from script/list-grammars:65:in `to_markdown'
  > 	from script/list-grammars:96:in `update_readme'
  > 	from script/list-grammars:105:in `<main>'
Command failed. Aborting.

I can try this on a clean branch from master if that might help?

@heyitsmeuralex It's an issue with your submodules list. Git submodules are managed outside the usual versioning mechanics. Make sure you've merged the latest changes from master, and with your branch checked-out, run script/bootstrap and git submodule sync.
This is I opened #4056 (which has been mostly addressed in #4097). It's a pretty nasty (and less-than-obvious) UX issue.

I notice you use a similar "$project is licensed under the MIT License:" header in a lot of your repositories. Is there a specific reason for this, as it looks like it trips up GH?

No specific reason. I've been copy/pasting that file for ages, since long before GitHub even existed, much less detected licenses. :) I can try to fix it to something GitHub can recognize.

No specific reason. I've been copy/pasting that file for ages, since long before GitHub even existed, much less detected licenses. :) I can try to fix it to something GitHub can recognize.

That would be ✨ for Linguist but also all the visitors to your repos that use this format for the license file as GitHub will be able to automatically detect the license and add it to the top of the repo just above the language stats bar.

I can try to fix it to something GitHub can recognize.

Licensee (the GitHub project that detects licenses) uses https://choosealicense.com/ as its primary source for license texts. If you use that formatting for the MIT license, you can be sure it will be recognized by Licensee.

OK, I went and fixed the LICENSE files for wren, wrenalyzer, and wren-sublime. I'll eventually work my way through all my various random little repos, but that might take a while. :)

Closing in favor of #4219. We'll monitor the popularity of the extension there.
If you have an improved search query compared to the one used in #4219, please post it here and I'll update #4219.


Add the query option for preserving types for a broker response

Added 'preserveType' option for query option
Added unit test

Can you add Some more info. Why are we doing this.  How will response change with this. Can we not do this by default?

@kishoreg This is for supporting unflattened multi-value selection result for internal restli endpoint. Since we need to introduce new API endpoint for pinot queries, we have decided to support preserving types as a cleanup. I don't want to do this by default for now because it's not backward compatible. With this option on, we will be returning the types correctly for BrokerResponseNative except groupKey.

Can you paste a sample response and what will the new endpoint look like

select AirTime from mytable limit 1
{
    "selectionResults": {
        "columns": ["AirTime"],
        "results": [
            ["154"],
        ]
    },
    "exceptions": [],
    "numServersQueried": 1,
    "numServersResponded": 1,
    "numDocsScanned": 120,
    "numEntriesScannedInFilter": 0,
    "numEntriesScannedPostFilter": 120,
    "totalDocs": 115545,
    "timeUsedMs": 8,
    "segmentStatistics": [],
    "traceInfo": {}
}

select AirTime from mytable limit 1 OPTION(preserveType='true')
{
    "selectionResults": {
        "columns": ["AirTime"],
        "results": [
            [154]
        ]
    },
    "exceptions": [],
    "numServersQueried": 1,
    "numServersResponded": 1,
    "numDocsScanned": 120,
    "numEntriesScannedInFilter": 0,
    "numEntriesScannedPostFilter": 120,
    "totalDocs": 115545,
    "timeUsedMs": 9,
    "segmentStatistics": [],
    "traceInfo": {}
}

select max(AirTime) from mytable
{
    "aggregationResults": [
    {
        "function": "max_AirTime",
        "value": "652.00000"
    }],
    "exceptions": [],
    "numServersQueried": 1,
    "numServersResponded": 1,
    "numDocsScanned": 115545,
    "numEntriesScannedInFilter": 0,
    "numEntriesScannedPostFilter": 0,
    "totalDocs": 115545,
    "timeUsedMs": 8,
    "segmentStatistics": [],
    "traceInfo": {}
}

select max(AirTime) from mytable OPTION(preserveType='true')
{
    "aggregationResults": [
    {
        "function": "max_AirTime",
        "value": 652.0
    }],
    "exceptions": [],
    "numServersQueried": 1,
    "numServersResponded": 1,
    "numDocsScanned": 115545,
    "numEntriesScannedInFilter": 0,
    "numEntriesScannedPostFilter": 0,
    "totalDocs": 115545,
    "timeUsedMs": 11,
    "segmentStatistics": [],
    "traceInfo": {}
}

select max(AirTime) from mytable group by Carrier top 3
{
    "aggregationResults": [
    {
        "groupByResult": [
        {
            "value": "652.00000",
            "group": ["HA"]
        }, {
            "value": "635.00000",
            "group": ["UA"]
        }, {
            "value": "583.00000",
            "group": ["DL"]
        }],
        "function": "max_AirTime",
        "groupByColumns": ["Carrier"]
    }],
    "exceptions": [],
    "numServersQueried": 1,
    "numServersResponded": 1,
    "numDocsScanned": 115545,
    "numEntriesScannedInFilter": 0,
    "numEntriesScannedPostFilter": 231090,
    "totalDocs": 115545,
    "timeUsedMs": 38,
    "segmentStatistics": [],
    "traceInfo": {}
}

select max(AirTime) from mytable group by Carrier top 3 OPTION(preserveType='true')
{
    "aggregationResults": [
    {
        "groupByResult": [
        {
            "value": 652.0,
            "group": ["HA"]
        }, {
            "value": 635.0,
            "group": ["UA"]
        }, {
            "value": 583.0,
            "group": ["DL"]
        }],
        "function": "max_AirTime",
        "groupByColumns": ["Carrier"]
    }],
    "exceptions": [],
    "numServersQueried": 1,
    "numServersResponded": 1,
    "numDocsScanned": 115545,
    "numEntriesScannedInFilter": 0,
    "numEntriesScannedPostFilter": 231090,
    "totalDocs": 115545,
    "timeUsedMs": 20,
    "segmentStatistics": [],
    "traceInfo": {}
}

TODO: This fix won't preserve types for group key for aggregation group by queries.


[BUG] Potential bugs on vm-dhcp-controller

Describe the bug

Potential bugs on vm-dhcp-controller, please double check and optimze in future releases.

The EventListener blocks on select {}, but (c *Controller) Run may fail when  !cache.WaitForCacheSync(stopCh, c.informer.HasSynced); if it happens, it blocks

The context in (a *Agent) Run(), is not passed to later procssing, the program can only be terminated forcely without early termination.

func (e *EventHandler) EventListener() (err error) {
...
	controller := NewController(queue, indexer, informer, e.poolRef, e.dhcpAllocator, e.poolCache)
	stop := make(chan struct{})
	defer close(stop)
	go controller.Run(1, stop)

	select {}
}

func (c *Controller) Run(workers int, stopCh chan struct{}) {
	defer runtime.HandleCrash()

	defer c.queue.ShutDown()
	logrus.Infof("(ippool.Run) starting IPPool controller")

	go c.informer.Run(stopCh)
	if !cache.WaitForCacheSync(stopCh, c.informer.HasSynced) {
		logrus.Errorf("(ippool.Run) timed out waiting for caches to sync")

		return
	}

	for i := 0; i < workers; i++ {
		go wait.Until(c.runWorker, time.Second, stopCh)
	}

	<-stopCh
	logrus.Infof("(ippool.Run) stopping IPPool controller")
}

func (a *Agent) Run() error {
	logrus.Infof("monitor ippool %s", a.poolRef.String())

	eg, egctx := errgroup.WithContext(a.ctx)

..
	eg.Go(func() error {
		select {
		case <-egctx.Done():
			return nil
		default:
			// initialize the ippoolEventListener handler
			if err := a.ippoolEventHandler.Init(); err != nil {
				logrus.Fatal(err)
			}
			return a.ippoolEventHandler.EventListener()
		}
	})

	if err := eg.Wait(); err != nil {
		logrus.Fatal(err)
	}

	return nil
}

The name := fmt.Sprintf("%s-%s-agent", ipPool.Namespace, ipPool.Name) may over 63 chars. (discussed before)

The ippool-register will try to create a POD at any change of the ip-pool status, should status.AgentPodRef be helpful to check if the POD exists first, avoid un-necessary API call to create and get an IsAlreadyExists error.

If the agent POD's namespace & name may change (not confirmed), then the status.AgentPodRef can also be used to delete previous POD and re-create the new one.
	ctlnetworkv1.RegisterIPPoolStatusHandler(
		ctx,
		ippools,
		networkv1.Registered,
		"ippool-register",
		handler.DeployAgent,
	)

func (h *Handler) DeployAgent(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error) {
	agent := prepareAgentPod(ipPool, h.noDHCP, h.agentNamespace, clusterNetwork, h.agentServiceAccountName, h.agentImage)

	agentPod, err := h.podClient.Create(agent)
	if err != nil {
		if apierrors.IsAlreadyExists(err) {
			return status, nil
		}

	status.AgentPodRef = &networkv1.PodReference{
		Namespace: agentPod.Namespace,
		Name:      agentPod.Name,
	}

The sequence question: the BuildCache and Allocate are running in parallel, and they are not using a high level control like networkv1.CacheReady

func (h *Handler) BuildCache(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error) {
...
h.cacheAllocator.AddMAC(ipPool.Spec.NetworkName, mac, ip)
...

func (h *Handler) Allocate(vmNetCfg *networkv1.VirtualMachineNetworkConfig, status networkv1.VirtualMachineNetworkConfigStatus) (networkv1.VirtualMachineNetworkConfigStatus, error) {
...
exists, err := h.cacheAllocator.HasMAC(nc.NetworkName, nc.MACAddress)
...
		// Recover IP from status (resume from paused state)
		if oIP, err := findIPAddressFromNetworkConfigStatusByMACAddress(vmNetCfg.Status.NetworkConfig, nc.MACAddress); err == nil {
			dIP = oIP
		}

		ip, err := h.ipAllocator.AllocateIP(nc.NetworkName, dIP)
		if err != nil {
			return status, err
		}

		if err := h.cacheAllocator.AddMAC(nc.NetworkName, nc.MACAddress, ip); err != nil {
			return status, err
		}
...

To Reproduce
Steps to reproduce the behavior:

Go to '...'

Expected behavior

Support bundle

Environment

Harvester ISO version:  v1.3.0 master-head
Underlying Infrastructure (e.g. Baremetal with Dell PowerEdge R630):

Additional context
Add any other context about the problem here.
Observed when reviewing PR: https://github.com/harvester/harvester/pull/4960

Validation Issue:
@starbops
From, https://github.com/harvester/vm-dhcp-controller/pull/19#issue-2114780175 , for:

╭─mike at suse-workstation-team-harvester in ~/Projects/test-5065/vm-dhcp-controller on main✔
╰─± kubectl get network-attachment-definitions -A
NAMESPACE   NAME                                                              AGE
default     dhcp900                                                           3h22m
default     fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n   2m41s
default     test                                                              6d1h
default     test-net                                                          22h
default     vlan104                                                           3d21h
╭─mike at suse-workstation-team-harvester in ~/Projects/test-5065/vm-dhcp-controller on main✔
╰─± cat ../ippool.yaml
apiVersion: network.harvesterhci.io/v1alpha1
kind: IPPool
metadata:
  namespace: default
  name: fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n
spec:
  ipv4Config:
    serverIP: <IP_ADDRESS>
    cidr: <IP_ADDRESS>/24
    pool:
      start: <IP_ADDRESS>
      end: <IP_ADDRESS>
    router: <IP_ADDRESS>
    leaseTime: 300
  networkName: default/fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n
╭─mike at suse-workstation-team-harvester in ~/Projects/test-5065/vm-dhcp-controller on main✔
╰─± kubectl create -f ../ippool.yaml
The IPPool "fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n" is invalid:
* spec.networkName: Too long: may not be longer than 64
* <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
╭─mike at suse-workstation-team-harvester in ~/Projects/test-5065/vm-dhcp-controller on main✔
╰─± kubectl describe network-attachment-definitions/fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n | yq
Error: bad file '-': yaml: line 7: mapping values are not allowed in this context
╭─mike at suse-workstation-team-harvester in ~/Projects/test-5065/vm-dhcp-controller on main✔
╰─± kubectl get network-attachment-definitions/fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n -o yaml | yq
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  annotations:
    network.harvesterhci.io/route: '{"mode":"auto","connectivity":"DHCP failed"}'
  creationTimestamp: "2024-03-05T23:05:06Z"
  finalizers:
    - wrangler.cattle.io/harvester-network-nad-controller
    - wrangler.cattle.io/harvester-network-manager-nad-controller
  generation: 1
  labels:
    network.harvesterhci.io/clusternetwork: cn-dhcptest
    network.harvesterhci.io/ready: "true"
    network.harvesterhci.io/type: L2VlanNetwork
    network.harvesterhci.io/vlan-id: "30"
  name: fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n
  namespace: default
  resourceVersion: "1672667"
  uid: 00d2713c-9fc0-48bc-8a0f-5c8630d0d418
spec:
  config: '{"cniVersion":"0.3.1","name":"fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n","type":"bridge","bridge":"cn-dhcptest-br","promiscMode":true,"vlan":30,"ipam":{}}'

It seems to not create even though the spec.networkName is valid via kubectl get network-attachment-definitions -A.

@starbops
Still noticing this as an issue on:

v1.3.0-rc4
0.3.0 chart version with v0.3.0 tags on the images

╭─mike at suse-workstation-team-harvester in ~/Projects/test-5065
╰─○ kubectl create -f ippool.yaml
The IPPool "fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n" is invalid:
* spec.networkName: Too long: may not be longer than 64
* <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation

@starbops Still noticing this as an issue on:

v1.3.0-rc4
0.3.0 chart version with v0.3.0 tags on the images

╭─mike at suse-workstation-team-harvester in ~/Projects/test-5065
╰─○ kubectl create -f ippool.yaml
The IPPool "fi6cx9ca1kt1faq80k3ro9cowyumyjb67qdmg8fb9ydmz27rbk5btlg2m5avv3n" is invalid:
* spec.networkName: Too long: may not be longer than 64
* <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation

The bug fix harvester/vm-dhcp-controller#19 has been completely shadowed by the enhancement harvester/vm-dhcp-controller#18, so it becomes unnecessary to validate this one. I suggest we skip this one since #5065 has been closed. Now the .spec.networkName cannot longer than 64 characters.
Thanks!
cc @irishgordo

Sounds good @starbops  I'll go ahead and close this one out then :+1: :smile:


Prime Palindrome Numbers

💥 Proposal
Prime Numbers which are Palindrome too
Have you read the Contributing Guidelines on Pull Requests?
YES

/assign


Types question

I'm having a heck of a time trying to transition between types. It seems like the "created", "modified", "entity" (default is _ct, _et, etc) are required for certain operations, and even if they are properly pulled with a get, the typing thinks they do not exist. I have dug around the docs but I'm just not clear on what it is I'm missing. Error and simple repro:
TS2345: Argument of type
{ type: CourseType. Normal; title: unknown; status: PrimitiveAttrFormattedValue<StringAttribute<{ required: "atLeastOnce"; hidden: false; key: false; savedAs: undefined; transform: undefined; defaults: { key: undefined; put: undefined; update: undefined; }; links: { ...; }; validators: { ...; }; enum: CourseStatus[];...
is not assignable to parameter of type
{ type: CourseType. Normal | GET<[ref: Paths<WithInternalAttribute<WithInternalAttribute<WithInternalAttribute<Schema<{ courseId: StringAttribute<{ required: "never"; hidden: false; key: true; savedAs: undefined; transform: undefined; defaults: { key: undefined; put: unknown; update: undefined; }; links: { ...; }; va...
Property entity is missing in type
{ type: CourseType. Normal; title: unknown; status: PrimitiveAttrFormattedValue<StringAttribute<{ required: "atLeastOnce"; hidden: false; key: false; savedAs: undefined; transform: undefined; defaults: { key: undefined; put: undefined; update: undefined; }; links: { ...; }; validators: { ...; }; enum: CourseStatus[];...
but required in type
{ type: CourseType. Normal | GET<[ref: Paths<WithInternalAttribute<WithInternalAttribute<WithInternalAttribute<Schema<{ courseId: StringAttribute<{ required: "never"; hidden: false; key: true; savedAs: undefined; transform: undefined; defaults: { key: undefined; put: unknown; update: undefined; }; links: { ...; }; va...

course1.item here is missing 'entity' according to the typing, but in the DB this is actually saved as _et. What am I missing here. I keep running into these walls and have just overridden the type which is not great. I'm not clear on when format/transform/parse need to be used. I'm not doing anything fancy with the schema, just 1-1 fields to the db for now.
Property entity is missing in type
const course1 = await CourseEntity.build(GetItemCommand).key({ courseId: "someid" }).send()
// Am I missing a format/transform/parse step here?
    course1.Item.title = "New Title"
    const response = await CourseEntity.build(UpdateItemCommand).item(course1.Item).send()

Loving it otherwise, thanks!

Here's the schema for reference, maybe I'm doing something wrong here

export const courseSchema = schema({
    courseId: string().key().putDefault(ulid()).optional(),
    type: string().enum(...Object.values(CourseType)),
    title: string(),
    status: string().enum(...Object.values(CourseStatus)),
    introSms: string()
})
export type DBCourseSaved = SavedItem<typeof CourseEntity>
export type DBCourseInput = Omit<InputValue<typeof courseSchema>, "courseId">
export type DBCourseValid = ValidValue<typeof courseSchema>
export type DBCourseUpdate = ValidValue<typeof courseSchema, { mode: "update" }>
export type DBCourseTransformed = TransformedValue<typeof courseSchema>

export const CourseTable = new Table({
    name: "Course",
    partitionKey: { name: "courseId", type: "string" },
    documentClient: ddbDocClient
})

export const CourseEntity = new Entity({
    name: "Course",
    table: CourseTable,
    schema: courseSchema,
    computeKey: ({ courseId }) => {
        if (courseId) {
            return { courseId }
        }
        return {
            courseId: ulid()
        }
    }
})

Hi @bailout00 and thanks for reaching out!
First, you should not use putDefault in your schema but keyDefault (or simply default ) as your attribute is key. keyDefault will also be used in every command that needs a key (e.g. GetItemCommand):
export const courseSchema = schema({
    courseId: string().key().default(() => ulid()),
    type: string().enum(...Object.values(CourseType)),
    title: string(),
    status: string().enum(...Object.values(CourseStatus)),
    introSms: string()
})

But seeing how you use it, I think it's simpler to not provide any default and explicitly call ulid() when writing the item for the first time.
About your initial problem now, normally the lib is thought out so you don't have to worry too much about formats, transforms or parses. The first thing I think about when I look at your code is that you don't need to get the item first. This should do the trick:
const response = await CourseEntity
  .build(UpdateItemCommand)
  .item({ courseId: "someid", title: "New Title" )
  // optional condition to make sure the item exists first
  .option({ condition: { attr: "courseId", exists: true }})
  .send()

However, the code that you showed in the second block should work: The internal entity attribute is normally not required in updates (set to "atLeastOnce" required option) and even if it was, it has a default update value so this error should not be raised.
Will run some tests this afternoon. Can you provide your TS config ?

Thanks, I did find keyDefault but I apparently didn't understand its purpose. My intention was to just have an auto-id field but only on put. I ended up using the putDefault/keyDefault because the typing for the Course type requires courseId field, which I don't want on the API side. I was hoping to use the in-built InputValue (which I thought would be only required fields) but that didn't seem to work. I can work around that.
One thing I found strange too, was that the derrived type's fields all have unknown types, for example:

Here's my tsconfig, its part of a monorepo hence the paths
{
    "compilerOptions": {
        "target": "ES2022",
        "lib": [
            "ES2022",
        ],
        "paths": {
            "utils/*": [
                "./src/utils/*"
            ],
            "ltcommon": [
                "../ltcommon/index.ts"
            ],
            "@*": [
                "./src/*"
            ]
        },
        "allowJs": true,
        "declaration": true,
        "strict": true,
        "resolveJsonModule": true,
        "noImplicitAny": false,
        "strictNullChecks": true,
        "noImplicitThis": true,
        "alwaysStrict": true,
        "esModuleInterop": true,
        "noUnusedLocals": false,
        "noUnusedParameters": false,
        "noImplicitReturns": true,
        "noFallthroughCasesInSwitch": false,
        "experimentalDecorators": true,
        "strictPropertyInitialization": false,
        "noEmit": true,
        "typeRoots": [
            "./node_modules/@types"
        ],
        "isolatedModules": false,
        "sourceMap": true,
        "outDir": "./dist",
        "skipLibCheck": true,
        "moduleResolution": "node",
        "allowSyntheticDefaultImports": true
    },
    "include": [
        "./src/**/*",
        ".eslintrc.js"
    ],
    "exclude": [
        "node_modules",
        "**/*.test.ts",
        "./dist"
    ],
    "references": [
        { "path": "../ltcommon" }
    ]
}

Any thoughts on the unknown thing? Happy to provide a small repro if its helpful. I feel like I must be doing something wrong there

Hi @bailout00 and thanks for reaching out!
I think it's a type bug, will look into that this week! Otherwise the code in itself should work fine so you can simply ts-ignore for now!

Thanks, I did find keyDefault but I apparently didn't understand its purpose. My intention was to just have an auto-id field but only on put. I ended up using the putDefault/keyDefault because the typing for the Course type requires courseId field, which I don't want on the API side. I was hoping to use the in-built InputValue (which I thought would be only required fields) but that didn't seem to work. I can work around that.

I was just thinking about adding an .internal() method on attribute to deny them from user inputs altogether. Would that fit your need?
About the unknown pb, I couldn't reproduce it in this repo, with the latest version of the code<EMAIL_ADDRESS>with this ts.config:

Can you update the tsconfig file and see if that changes


Adding metric to record the direct memory usage for index segment files

Adding metric so record the direct memory usage for index segment files, so combined with the netty bytebuf pool, we can get a much better understanding of the direct memory usage of ambry-server.

Codecov Report

Merging #2196 (897a246) into master (c81f87a) will decrease coverage by 4.39%.
The diff coverage is 55.55%.

@@             Coverage Diff              @@
##             master    #2196      +/-   ##
============================================
- Coverage     72.88%   68.48%   -4.40%
+ Complexity    10220     9642     -578
============================================
  Files           738      738
  Lines         56305    56321      +16
  Branches       6934     6934
============================================
- Hits          41038    38573    -2465
- Misses        13048    15538    +2490
+ Partials       2219     2210       -9

Impacted Files
Coverage Δ

...rc/main/java/com/github/ambry/store/BlobStore.java
81.99% <ø> (-3.18%)
:arrow_down:

...main/java/com/github/ambry/store/IndexSegment.java
86.58% <0.00%> (-0.62%)
:arrow_down:

...main/java/com/github/ambry/store/StoreMetrics.java
89.05% <14.28%> (-2.70%)
:arrow_down:

...n/java/com/github/ambry/store/PersistentIndex.java
90.46% <88.88%> (-0.38%)
:arrow_down:

...main/java/com/github/ambry/config/StoreConfig.java
100.00% <100.00%> (ø)

...java/com/github/ambry/notification/UpdateType.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...thub/ambry/notification/BlobReplicaSourceType.java
0.00% <0.00%> (-100.00%)
:arrow_down:

.../cloud/LeaderStandbyHelixVcrStateModelFactory.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...om/github/ambry/named/MySqlNamedBlobDbFactory.java
0.00% <0.00%> (-94.74%)
:arrow_down:

...ry/accountstats/AccountStatsMySqlStoreFactory.java
0.00% <0.00%> (-93.34%)
:arrow_down:

... and 148 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


App doesn't remember width and height when quitting

Seems to always open with 200px width and 100px height on app launch - regardless of previous window resizing

Thanks for reporting! I've seen this issue reported before, and there's code to keep the size (and it works for me), so I'm not sure why it doesn't work for some people.
Could you tell me which OS version you're running - and also which app version? (Menu bar -> Fastmate -> About Fastmate)

Actually - I may know what's causing this. Try going to System Preferences -> General, do you have the Close windows when quitting an application box ticked?
I think that might cause the behaviour.

Yes, I had that box checked. Disabling this setting works as a workaround. Is there a fix so I can leave this option enabled?

Yeah, I suppose I could store the state manually. I'll think about it

Fixed in 1.0.5


classList polyfill doesn't apply to SVGElement in IE11

This applies to scenario when SVG is embedded directly into HTML and you want to use classList.add on one of its nodes.

This will be fixed by #1347

Just in case I missed something in this PR (I'm not 100% sure SVGElement inherits from Element), one issue I ran through when trying to polyfill this myself is that SVGElement.className is not a String like on regular Element its an Object, so I had to revert to reading classes from attribute instead. I guess what I'm saying is make sure you test it with real SVG nodes :)

@stsvilik Thanks, we are aware of the difference between DOMTokenList support for Element and SVGElement, I haven't added SVGElement support yet, it will be added later before the PR is merged.

This will be fixed via #1347 as it has SVG support now

I believe I am still experiencing this issue.  If I use any of the following URIs, then the classList polyfill is not downloaded for IE11, and I get errors when trying to work with classList on SVG elements.

https://cdn.polyfill.io/v2/polyfill.js?features=default&flags=gated
https://cdn.polyfill.io/v2/polyfill.js?features=default,Element.prototype.classList&flags=gated

The following URI does download the polyfill, and has been my only workaround thus far.

https://cdn.polyfill.io/v2/polyfill.js?features=default,Element.prototype.classList|always&flags=gated


Long training time [Model Search]

Hi,
I've implemented the model search on my own since it is not available yet in your github repo.
Here is my SuperNet-Code of the encoder for the XLarge Model. Note, that I ommited the classifier and last_conv layer for simplicity.
class SqueezeNASSuperNet(nn.Module):
    def __init__(self, input_channels, hyperparams: InverseResidualMetaNetHyperparameters):
        super().__init__()
        self.hyperparams = hyperparams
        self.conv1 = conv3x3_bn(c_in=input_channels, c_out=hyperparams.init_channels, stride=2)
        self.residuals: nn.ModuleList[nn.ModuleList] = nn.ModuleList()

        gene_i = 0
        last_c = hyperparams.init_channels

        num_layers = 0
        for block_hyper in hyperparams.blocks:
            for i in range(block_hyper.num_repeat):
                if i == 0:
                    stride = block_hyper.stride
                else:
                    stride = 1
                ops = nn.ModuleList([InvertedResidual(op, last_c, block_hyper.num_channels, stride) for op in Ops])
                self.residuals.append(ops)
                gene_i += 1
                last_c = block_hyper.num_channels
                num_layers += 1

        self.alphas = nn.Parameter(1. / len(Ops) * torch.ones(num_layers, len(Ops)), requires_grad=True)

        self.register_buffer("active_cells", torch.ones(num_layers, len(Ops)))

    def forward(self, inputs, gt=None):
        cur_feat = inputs
        cur_feat = self.conv1(cur_feat)
        residuals_outputs = []

        softmax_alphas = F.softmax(self.alphas, dim=-1)
        if self.training:
            alphas = gumbel_softmax(F.log_softmax(self.alphas), hard=True)
        else:
            idx = F.softmax(self.alphas, dim=-1).argmax(dim=-1, keepdim=True)
            alphas = torch.zeros_like(self.alphas)
            alphas.scatter_(1, idx, 1)

        latency = 0
        for i, (supercell, cell_alphas, active_cells) in enumerate(zip(self.residuals, alphas, self.active_cells)):
            next_feat = 0

            for j, (op, alpha, active) in enumerate(zip(supercell, cell_alphas, active_cells)):
                if not self.training and alpha == 0:
                    continue
                if self.training and softmax_alphas[i, j] <= 0.005 and self.active_cells[i].sum() > 1:
                    self.active_cells[i, j] = 0
                    continue
                if self.training and active == 0:
                    continue
                next_feat += alpha * op(cur_feat)
                latency += alpha * op.forward_latency(cur_feat)
            cur_feat = next_feat
            residuals_outputs.append(cur_feat)

        return {'output': cur_feat, 'residuals_outputs': residuals_outputs, "latency": latency}

In a small test I tested my code with using only two Ops, e.g.:
class Ops(enum.Enum):
    inverse_residual_k3_e1_g1 = InvertedResidualOperation(group=1, kernel_size=3, padding=1, expand_ratio=1)

    residual_skipish = InvertedResidualSkipOperation()

    def __repr__(self):
        return super().__str__()

I trained on a custom dataset using a batch-size of 8. First I followed your suggestion to use SGD with lr=0.05 but it didn't seem to converge and I switched to Adam with lr=3e-4.
Now this (very simple) test took almost 6 hours to arrive at more or less decent alphas and I was wondering what could be the reason that the model search is so slow?
Also I disabled the latency loss as I observed that this will skew the alphas to favor the skip-op and hinder learning of useful features of the InvertedResidualOp.
Thanks!

Hi! What was the learning rate were you using for the architecture and weight parameters? Empirically I found that it necessary to use a seperate learning rate for the architecture parameters and the weight parameters. Also while unforunately, while I hope to release all the code soon, I am unsure when I will be able to due to work circumstances, I have released some a basic supernet utility here https://github.com/ashaw596/supernet-nas Also I might suspect that you weighted the latency loss too heavily if you were seeing a very heavy skew and some bias would be expected if your network is choosing between two networks. Depending on number of gpus, 6 hours isn't terribly unreasonable depending on network size. But you can always force faster architecture parameter convergence rate by increasing the architecture learning rate.
I might also recommend annealing the gumbel softmax temperature as that helps with the stability of the gradients at the start.

Thank you for your fast answer!
Could you share your learning-rates for architecture and weight parameters? As you suggested I did use the same learning rate for both.
For now I just weighted my latency-loss with 0.01 (e.g. loss = seg_loss + 0.01 * lat_loss). The skew was not too heavy but noticeable.
I trained the model on a single RTX 2080 Ti but can use up to 8 if I wanted to.
I am wondering though if a higher batch-size actually helps for faster convergence, as the gumbel-softmax-sampling is not done per batch-idx anyway. Or should I rewrite my code such that each image of the takes a different path through the super-network?

Another thing i noticed is that the architecture parameters in the "middle" of the network seem to converge very slow in comparison to parameters at the start or the end of the network.
Here you see active operations.

Do you have any idea why this might happen?

Yes I would definitely recommend doing image level sampling like in my utility. It will greatly decrease the variance an bias in the gradient updates due to the randomness.

Thank you, you helped me a lot!


🐛 Can't record at 60 FPS on a Google Pixel 6a

What's happening?
I want to record at 60 fps but the end result is at 30 fps.
Reproduceable Code
function App(): JSX.Element {
  const camera = useRef<Camera>(null);
  const device = useCameraDevice('back');
  const [recording, setRecording] = useState(false);

  const onPress = () => {
    if (!camera.current) return;
    if (recording) {
      camera.current.stopRecording();
    } else {
      camera.current.startRecording({
        onRecordingFinished: async video => {
          const path = video.path;
          await CameraRoll.save(`file://${path}`, {
            type: 'video',
          });
        },
        onRecordingError: error => console.error(error),
      });
    }
    setRecording(!recording);
  };

  if (device == null) {
    return (
      <View>
        <Text>No device</Text>
      </View>
    );
  } else {
    return (
      <View
        style={{
          flex: 1,
        }}>
        <Camera
          ref={camera}
          style={StyleSheet.absoluteFill}
          device={device}
          isActive={true}
          video={true}
          audio={true}
          fps={60}
        />
        <TouchableOpacity
          onPress={onPress}
          style={{
            position: 'absolute',
            bottom: 10,
            right: 10,
            padding: 20,
            backgroundColor: recording ? 'red' : 'green',
          }}>
          <Text>Start/Stop</Text>
        </TouchableOpacity>
      </View>
    );
  }
}

Relevant log output
10-16 09:46:20.002   985 15579 I Lyric   : tuning_provider_base.cc:491: Requested tuning for: SENSOR19,FULL_16_9_2160P_60FPS,VIDEO_RECORDING_3P but matched with SENSOR19,FULL_16_9_2160P_60FPS,VIDEO_RECORDING instead.
10-16 09:44:30.003   985 15579 W Lyric   : whi_tuning_controller.cc:325: Cannot find tuning use case: sensor 19, FULL_16_9_2160P_60FPS, VIDEO_RECORDING_3P. Using default tuning for IsSubBlockEnabled()

Camera Device
{
  "sensorOrientation": "landscape-right",
  "hardwareLevel": "full",
  "maxZoom": 7,
  "minZoom": 0.6009132266044617,
  "supportsLowLightBoost": true,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": true,
  "isMultiCam": true,
  "name": "BACK (0)",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",
  "id": "0"
}

Device
Google Pixel 6a
VisionCamera Version
3.3.1
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information

[ ] I am using Expo
[ ] I have enabled Frame Processors (react-native-worklets-core)
[X] I have read the Troubleshooting Guide
[X] I agree to follow this project's Code of Conduct
[X] I searched for similar issues in this repository and found none.

It doesn't look like you are using a format. See Choosing a Camera Format.
If your format can do 60 FPS, you can pass 60 FPS. Otherwise you can't. That's what it says in the docs, and that's also what it says in the fps prop's param-docs

I've changed the code to add
const format = useCameraFormat(device, [{fps: 60}]); ... <Camera           ref={camera}           style={StyleSheet.absoluteFill}           device={device}           isActive={true}           video={true}           audio={true}           format={format}           fps={60}         />
But the result video still with 30 fps.
This is the log for format:
{"autoFocusSystem": "contrast-detection", "fieldOfView": 65.59413150556766, "maxFps": 60, "maxISO": 7111, "minFps": 1, "minISO": 56, "photoHeight": 3024, "photoWidth": 4032, "pixelFormats": ["yuv", "native"], "supportsDepthCapture": false, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 2160, "videoStabilizationModes": ["off", "standard", "cinematic", "off", "cinematic-extended"], "videoWidth": 3840}

That's weird.
The only explanation I have at this point is that either your phone does not allow other apps to use 60 FPS (only their stock app can do it, Samsung often does this for whatever reason), or that it has "auto-framerate":

VisionCamera has a solid devices API, so if something does not work here, it might not work in any third party apps at all.
To confirm this, download the official Google example for Camera apps; camera-samples/Camera2Video and run it on your phone. If you can't record in 60 FPS there either, there's nothing we can do. It's your phone's fault.
Please try the camera-samples app and let me know if you can record in 60 FPS there.

Does the preview look like it has 60 FPS?

Just tested and works fine, it seems that the problem was that I had not added the camera format correctly.
Thanks!

🙃


touch: add support for --ref and --date together

This commit resolves issue #4608.
To make it relatively straightforward to implement I have taken some
code from parse_date and put it inside a function parse_relative_time.
This commit changes and adds some test as well to work with the new
functionality.

Thanks for your PR :)


🐛 Tabs - On hover close button flickering

Describe the bug
Using   fluent_ui: ^3.4.0, when mouse hovers on Tabs, the "X" close button flicks from grey to white. Maybe is some side effect of enabling/disabling the close button ?
To Reproduce
Steps to reproduce the behavior:

Go to https://bdlukaa.github.io/fluent_ui/
Click on 'Others'
Scroll down to the Tabs demo
Pass the mouse pointer over the tabs. The close button flicks and retains a darker grey background in comparison with the rest of the Tab.
Move the mouse again. The close button flicks again.

Expected behavior
I'm not expecting anything special
Screenshots
N/A
Additional context
N/A

More detail from #109

Expected behavior

Screenshots

Even though there are some new issues with tabs (https://github.com/bdlukaa/fluent_ui/issues/122), this specific change worked very well. Awesome!


Cookie Name validation too strict

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
Kong <IP_ADDRESS>-enterprise-edition
Current Behavior
I'm trying to configure an upstream with:
hash_on: cookie
hash_on_cookie: ASP.NET_SessionId

But that fails because the Cookie Name validation only allows A-Z, a-z, 0-9, '_', and '-' characters in the Cookie Name.
But per RFC-6265 a . is a valid character to be used in a Cookie Name.
Expected Behavior
Kong will allow configuring valid Cookie Names as defined in RFC-6265.
Steps To Reproduce
No response
Anything else?
No response

According to the specification of RFC 6265, the definition of cookie-name is as follows:
cookie-name       = token

The definition of the token comes from RFC 2616, which is defined as follows:
       token          = 1*<any CHAR except CTLs or separators>
       separators     = "(" | ")" | "<" | ">" | "@"
                      | "," | ";" | ":" | "\" | <">
                      | "/" | "[" | "]" | "?" | "="
                      | "{" | "}" | SP | HT

As can be seen from the above definition, the character . is not in the list of separators, so it is allowed to be included in the cookie-name.
So we need to fix this.

@tzssangglass We need to fix this.


Edge and IE problems.

This only happens on Edge, IE11, IE10 and lower. If you have an output window for zooming you'd normally get a nice border around the zoom container, instead the image you're zooming into appears twice, one is in the zoom container as normal and works fine and another is behind the zoom container removing the nice border. This doesn't always happen in Edge, however resize my browser it'll appear, as for IE11 and lower it always happens.
On IE11, 10 and lower when the zoom container is inside itself, a green background is presented inside the zoom container and the zoom image is hidden away out of view unless you do a scroll zoom.
Again this only happens on Microsoft browsers.

(function ($) {
    $(document).ready(function() {

        if($('#main_image').length === 1) { //If this ID is on the page, run this script.

            function manual_responsive(xzoom) {
                var width = $(window).width();
                if (width < 992) {
                    xzoom.options.position = "inside"
                } else if (width < 1200) {
                    xzoom.options.position = "right";
                    xzoom.options.Xoffset = 32;
                    xzoom.options.zoomWidth = 625;
                    xzoom.options.zoomHeight = 426;
                } else {
                    xzoom.options.position = "right";
                    xzoom.options.Xoffset = 100;
                    xzoom.options.zoomWidth = 667;
                    xzoom.options.zoomHeight = 425;
                }
            }

            var instance = $('#main_image, .xzoom-gallery').xzoom({
                tint: '#333',
                adaptive: false,
                smoothZoomMove: 0,
                smoothLensMove: 0,
                smoothScale: 0,
                hover: true,
                title: true,
                defaultScale: 0
            });

            var isTouchSupported = 'ontouchstart' in window;

            if (isTouchSupported) {
                //If touch device
                $('#main_image').each(function () {
                    var xzoom = $(this).data('xzoom');
                    xzoom.eventunbind();
                });

                $('#main_image').each(function () {
                    var xzoom = $(this).data('xzoom');
                    $(this).hammer().on("tap", function (event) {
                        event.pageX = event.gesture.center.pageX;
                        event.pageY = event.gesture.center.pageY;
                        var s = 1, ls;

                        xzoom.eventmove = function (element) {
                            element.hammer().on('drag', function (event) {
                                event.pageX = event.gesture.center.pageX;
                                event.pageY = event.gesture.center.pageY;
                                xzoom.movezoom(event);
                                event.gesture.preventDefault();
                            });
                        }

                        var counter = 0;
                        xzoom.eventclick = function (element) {
                            element.hammer().on('tap', function () {
                                counter++;
                                if (counter == 1) setTimeout(openfancy, 300);
                                event.gesture.preventDefault();
                            });
                        }

                        function openfancy() {
                            if (counter == 2) {
                                xzoom.closezoom();
                                $.fancybox.open(xzoom.gallery().cgallery);
                            } else {
                                xzoom.closezoom();
                            }
                            counter = 0;
                        }

                        xzoom.openzoom(event);
                    });
                });
            } else {
                //If not touch device

                //Integration with fancybox plugin
                $('#main_image').bind('click', function (event) {
                    var xzoom = $(this).data('xzoom');
                    xzoom.closezoom();
                    $.fancybox.open(xzoom.gallery().cgallery, {padding: 0, helpers: {overlay: {locked: false}}});
                    event.preventDefault();
                });
            }
            ;

            manual_responsive(instance);
            $(window).resize(function () {
                manual_responsive(instance);
            });
        }
    });
})(jQuery);

This is all the jQuery I'm using for xZoom

Changing the CSS fixes the double image problem with the preview container.
.xzoom-preview {
  border: 1px solid #888;
  background: #2f4f4f;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 999; //add z-index to bring the preview container forward.
}

This fixes the problem with Edge, and IE11 and later.


Fix waiting for volsync replication

We waited on .status.lastManualSync right after creating the replication source, but there is a small window where status is not reported, and the wait fails with:
drenv.commands.Error: Command failed:
   command: ('kubectl', 'wait', '--context', 'dr1', 'replicationsource/busybox-src',
           '--for=jsonpath={.status.lastManualSync}=replication-1', '--namespace=busybox',
           '--timeout=120s')
   exitcode: 1
   error:
      error: status is not found

Now wait until status is reported before waiting on lastManualSync.
Reported-by: Travis Janssen<EMAIL_ADDRESS>

Tested this branch out with volsync.yaml env and I'm still seeing the error. If this is dependent on another change, let me know. I used volsync.yaml so I didn't need to pull in changes for #907, but maybe that's not a good idea:
(ramen) tjanssen@eyewall4:~/go/src/github.com/nirs/ramen/test$ drenv start envs/volsync.yaml
2023-07-18 17:39:53,919 INFO    [volsync] Starting environment
2023-07-18 17:39:54,072 INFO    [hub] Starting minikube cluster
2023-07-18 17:39:55,803 INFO    [dr1] Starting minikube cluster
2023-07-18 17:39:56,083 INFO    [dr2] Starting minikube cluster
2023-07-18 17:42:45,084 INFO    [hub] Cluster started in 171.01 seconds
2023-07-18 17:42:45,085 INFO    [hub/0] Running addons/submariner/start
2023-07-18 17:44:46,004 INFO    [dr1] Cluster started in 290.20 seconds
2023-07-18 17:45:40,859 INFO    [hub/0] addons/submariner/start completed in 175.77 seconds
2023-07-18 17:45:40,859 INFO    [hub/0] Running addons/submariner/test
2023-07-18 17:46:14,800 INFO    [hub/0] addons/submariner/test completed in 33.94 seconds
2023-07-18 17:46:36,910 INFO    [dr2] Cluster started in 400.83 seconds
2023-07-18 17:46:36,912 INFO    [volsync/0] Running addons/volsync/start
2023-07-18 17:48:33,693 INFO    [volsync/0] addons/volsync/start completed in 116.78 seconds
2023-07-18 17:48:33,694 INFO    [volsync/0] Running addons/volsync/test
2023-07-18 17:48:51,484 ERROR   [volsync/0] Cluster failed
Traceback (most recent call last):
  File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/__main__.py", line 118, in execute
    f.result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/__main__.py", line 274, in run_worker
    run_addon(addon, worker["name"], hooks=hooks, allow_failure=allow_failure)
  File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/__main__.py", line 290, in run_addon
    run_hook(hook, addon["args"], name, allow_failure=allow_failure)
  File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/__main__.py", line 297, in run_hook
    run(hook, *args, name=name)
  File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/__main__.py", line 312, in run
    for line in commands.watch(*cmd):
  File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/commands.py", line 127, in watch
    raise Error(args, p.returncode, error)
drenv.commands.Error: Command failed:
   command: ('addons/volsync/test', 'dr1', 'dr2')
   exitcode: 1
   error:
      Traceback (most recent call last):
        File "addons/volsync/test", line 177, in <module>
          run_replication(cluster1)
        File "addons/volsync/test", line 123, in run_replication
          context=cluster,
        File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/kubectl.py", line 90, in wait
          _watch("wait", *args, context=context, log=log)
        File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/kubectl.py", line 106, in _watch
          for line in commands.watch(*cmd, input=input):
        File "/home/tjanssen/go/src/github.com/nirs/ramen/test/drenv/commands.py", line 127, in watch
          raise Error(args, p.returncode, error)
      drenv.commands.Error: Command failed:
         command: ('kubectl', 'wait', '--context', 'dr1', 'replicationsource/busybox-src', '--for=jsonpath={.status.lastManualSync}=replication-1', '--namespace=busybox', '--timeout=120s')
         exitcode: 1
         error:
            error: lastManualSync is not found

(ramen) tjanssen@eyewall4:~/go/src/github.com/nirs/ramen/test$ git branch
  hubless
  main
* volsync-status

(ramen) tjanssen@eyewall4:~/go/src/github.com/nirs/ramen/test$ git log | head -n 1
commit 95ca7948484bfd9ed4db412f486baa61e76e5409

Running it a second time was successful (results omitted).

@tjanssen3 thanks for testing! I wonder why this happens only on your system, but it is easy to fix by waiting until lastManualSync appears.

@tjanssen3 current version should work on your system now.
Tip for next time - when you see such failure, delete the environment and run
drenv start --verbose envs/volsync.yaml

to get more detailed logs.
It is also possible to start or test script directly:
addons/volsync/test dr1 dr2

@tjanssen3 current version should work on your system now.
Tip for next time - when you see such failure, delete the environment and run
drenv start --verbose envs/volsync.yaml

to get more detailed logs.
It is also possible to start or test script directly:
addons/volsync/test dr1 dr2

Confirmed fixed on 0dd27ba375751f0ef061e3b36e2d4b598ceff127 with Minikube v1.26.1, kubectl 1.24.3 on Ubuntu 18.04.


Restore Numpy 1.11 build for python 3.7 and below

Checklist

[ ] Used a fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

This is a minor change to restore building at Numpy 1.11 for python 3.7 and below. Numpy 1.14 is needed at Python 3.8 but not otherwise, and this preserves more compatibility. For version 2.0.2 this is already covered by previous builds, but as soon as we bump to a new version of gpi_core we'll lose that compatibility without implementing these changes.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


List elements with different heights don't work

I have a list with elements showing blog posts which all have very different heights (from 80px to, theoretically, infinity), there is also no way to know the height in advance because an individual post can contain many different media types. When I set the the childHeight to my minimum height of 80px as discribed in the README, I see the part of the post which fits on my screen, but as soon as I scroll more than 80px the list jumps to the start of the next post. Instead it should show the rest of the post, the same way it works in the example for constant height elements.

@zoehneto, it's very difficult to calculate height of each item beforehand without performance issues. I guess the minimum height is not going to work with cases like your's.

Wouldn't the following solution work to handle correctly elements with different heights ?

Specify the minimum height
For each visible element, ask for the real height with a callback function. If the next element is not longer visible, stop.
Use the real height to update the total scroll size.

We would have to following pseudo code to compute the visibles items

// The visible scroll height, so the available height to display the items.
let scrollVisibleHeight = this.getScrollVisibleHeight();

let currentVisibleHeight = 0;
let startIndex = this.getScrollOffset() / this.minItemSize;
let currentIndex = startIndex;
while(currentVisibleHeight < scrollVisibleHeight  && currentIndex < this.items.length) {
    let itemHeight = this.GetRealHeight(this.items[currentIndex]);
    currentVisibleHeight += itemHeight;
    index++;
}

// Update the total height with the real visible items height
this.totalScrollHeight = (this.items.length - (index - startIndex)) * this.minItemSize + currentVisibleHeight;

// Notify the new visible index range.
this.notifyVisibleIndexChanged(startIndex, index);

So the scroll bar size would change while scrolling, but I've seen website that behave this way.

Support for the variable height will be of great help, currently struggling to get it working. If we set the childHeight to certain minimum value, due to variable height of the child, the scroll stopa working after attaining the total-padding height.

@umeshv, this is a very difficult one to fix with the current logic. Any ideas please help.

@cpa-level-it your idea will not work.
The current logic is based on a given/calculated dimension, then slices out the source list, and notifies user to update the list. There is no rendered element(in fact, it has some, but doesn't matter) before slicing, in general. So there is no way to know the elements' dimension when slicing with current design.
unless we redesign the processing flow and add a extra directive for the list item to report its dimension and recalculate, this could be performance issue.

We have a simplistic implementation of variable heights (based on minimum height), but I don't think it'll work in your case since your items are drastically different.
I wonder if we could use a mix of min-childHeight & the idea from cpa-level-it ? The issue with calculating all items up front is we'd have to render them all to the DOM which is too expensive. We also can't assume the user will scroll from top to bottom, they might jump around randomly. However, we could use min-childHeight for any "unknown" element & keep a hash (as the PR from kykint uses) of known values for any elements that have actually been rendered. As the user scrolls more items in the hash would be have values causing the calculations to become more accurate.
Calculating scrollHeight would sum(knownValues) + minChildHeight*numUnknownValues.
I'm not sure how to calculate what records to display based on the current scrollPosition, but I'm wondering if you'd have to create an array of scrollPosition per item & do a binarySearch to find the closest one? The problem is every time an "unknown" value becomes "known" you'd have to update the scrollPosition array for all items after it (earlier items could remain unchanged).
I think if we keep brainstorming we could come up with something.
Thoughts?

kykint came up with a great solution to this in PR #217. I made a slight modification to use averageChildHeight instead of minChildHeight.
You can turn on this logic with the [enableUnequalChildrenSizes]="true" flag.
The demo has been updated & seems to work pretty well for items with very different sizes. (100-1000px).
This has been merged & published to npm.
The solution still isn't 100% perfect, but I'd say it's really good.
I'm closing this issue. Please re-open if it you continue to have problems.
Thanks.


test: update smoke test logic

After Office Fabric upgrade, the smoke test was broken due to changes needed in selectors.
This fixes them.

:tada: This PR is included in version 0.361.6 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket: