Slow speed seem not to work: Step Frequency lower than 32 Hz not supported

I am working on a project where I need speed of 1 to 100 steps per second. I use the following code in a test:
const int DISTANCE_TO_TRAVEL_IN_STEPS = 2000;

const int SPEED_IN_STEPS_PER_SECOND = 300;
const int ACCELERATION_IN_STEPS_PER_SECOND = 800;
const int DECELERATION_IN_STEPS_PER_SECOND = 800;
...
stepper.connectToPins(MOTOR_STEP_PIN, MOTOR_DIRECTION_PIN);
  stepper.setSpeedInStepsPerSecond(SPEED_IN_STEPS_PER_SECOND);
  stepper.setAccelerationInStepsPerSecondPerSecond(ACCELERATION_IN_STEPS_PER_SECOND);
  stepper.setDecelerationInStepsPerSecondPerSecond(DECELERATION_IN_STEPS_PER_SECOND);
  stepper.startAsService();
.......
stepper.setSpeedInStepsPerSecond(10);
  stepper.setTargetPositionRelativeInSteps(1000);
  SpeedPercent = 10;
  ShowDisplay();
  delay(5000);
  stepper.setSpeedInStepsPerSecond(20);
  stepper.setTargetPositionRelativeInSteps(1000);
  SpeedPercent = 20;
  ShowDisplay();
  delay(5000);
  stepper.setSpeedInStepsPerSecond(50);
  stepper.setTargetPositionRelativeInSteps(1000);
  SpeedPercent = 30;
  ShowDisplay();
  delay(5000);
  stepper.setSpeedInStepsPerSecond(0);
  stepper.setTargetPositionRelativeInSteps(0);
  SpeedPercent = 0;
  ShowDisplay();
  delay(5000);

There is no difference at speed 10, 20 and even with 30 I saw no increase. Only with 50 I saw a slightly fester movement.
Is there a problem with slow speeds?

are you using microstepping on your stepper driver?

I somehow solved the problem by enabling microsteps so that I do not need the very low frequency. The motor has lost torque due to the microsteps but it still works.
So, from my side all OK but I just wanted to report this issue as it is a quit unexpected behaviour (I would assume that high frequency’s are more challenging than very slow ones ...)
In also made the experienced that setting the steps per second to zero does not stop the motor in all cases - it sometimes continues to rotate very slow. Only setting the relative target position to zero as well will stop the motor (it actually turns a bit backward after deceleration which is actually helpful for my application (dosing pump, this feature prevents dropping)
Is there a simple command to stop the motor immediately?
Again, my application now works perfect - just for you to know that it had some surprises in the package.
thank you very much for creating this library,
Thomas

I guess what you are experiencing with the motor still spinning is either a problem of combining blocking and non blocking functions (see doc) or the deceleration algorithm has issues with the low speeds and overshoot. Did you check if the stepper eventually stops after some time of spinning slowly?
There is an emergency stop function with Should rapidly stop the motor.
After all when you set a target you tell the library to move to this target and maybe I did not foresee this case ever that someone wants to move to a specific position with the speed 0...after all a bit of a weird use case ;-)
So Setting target position to the current position is one possible way to achieve a more or less immediate stop (it still might try to gently decelerate depending on the current speed)

After a long time I digged out the Oscilloscope and verified your observations. It seems that around 32 hz is the lowest step frequency that is working. Values below that will always result in at least 32 hz stepping frequency. Values above seem to be fine.

Hello, all together,
I am running into the same problem :-/
In a bottling application, I need velocities going near zero (1Hz).
Any suggestions on how/where to change the source to make that possible?

If you need such low step speeds, why not simply use a timer interrupt function at 1 hz to get a precise slow step speed. I assume you do not need acceleration feature at such low speeds

I've been experiencing a similar issue. I need to be able to change the speed, acceleration, deceleration while running.   I can hit higher speeds (>800rpm) using any acceleration / deceleration. I can only hit slow speeds (~ <80 rpm) by dropping the acceleration and deceleration under 200.  So I just modify the accel / decel when the speed slows under a given amount.
Many thanks for publishing this library!!!


Fix for missing "this." in delFile loop

see https://github.com/ternjs/tern/issues/764

Thanks. I fired off 3da8392 before I noticed this PR.


Make the Ratchet\App more configurable: no xdebug error, allow flashServer to not be constructed

I'm having to extend the Ratchet\App and squelch the error for local development (XDebug is off in production :) ) and also I'm not using the flash server so I'm turning that off too. Can these be made configurable instead?
<?php

declare(strict_types=1);

namespace App\Broadcast;

use Psr\Log\LoggerInterface;
use Ratchet\App;
use React\EventLoop\LoopInterface;

class RatchetApp extends App
{
    /**
     * RatchetApp constructor.
     *
     * @param string        $httpHost
     * @param int           $port
     * @param string        $address
     * @param LoopInterface $loop
     */
    public function __construct(
        LoggerInterface $logger,
        string $httpHost = 'localhost',
        int $port = 8080,
        string $address = '<IP_ADDRESS>',
        LoopInterface $loop = null
    ) {
        @parent::__construct(
            $httpHost,
            $port,
            $address,
            $loop
        );

        $this->flashServer->socket->close();
        unset($this->flashServer);

        $logger->info('initialize RatchetApp', [
            'hostname' => $httpHost,
        ]);
    }
}

The App class was made to make 90% of what people wanted to do 0 configuration as well as be a full demonstration of how to put all the Ratchet components together. I didn't want to add a ton of configuration options because it was meant to be a simplification and example. If the class doesn't quite suite your needs I'd recommend building your own class, putting together the components with App being a guideline.
Alternatively, if you can think of a way to make App more flexible without complicating its API I'd be happy to review a pull request. 😀


Add support for SSL policy to net-lb-app-int module

Fixes #2391

how i can add custom ssl policy to ILB now?


feat: upgrade VCN module to 3.4.0

close #479

If I set create_drg       = true and then put the routing rules:
nat_gateway_route_rules = [    {       destination       = "<IP_ADDRESS>/16"       destination_type  = "CIDR_BLOCK"       network_entity_id = "drg"       description       = "To Sydney"     } ]
this fails:
│ Error: Invalid index
│
│   on .terraform/modules/vcn/vcn_gateways.tf line 157, in resource "oci_core_route_table" "nat":
│  157:       network_entity_id = module.drg_from_vcn_module[0].drg_id
│     ├────────────────
│     │ module.drg_from_vcn_module is empty tuple
│
│ The given key does not identify an element in this collection value: the collection has no elements.
╵
╷
│ Error: Invalid index
│
│   on .terraform/modules/vcn/vcn_gateways.tf line 157, in resource "oci_core_route_table" "nat":
│  157:       network_entity_id = module.drg_from_vcn_module[0].drg_id
│     ├────────────────
│     │ module.drg_from_vcn_module is empty tuple
│
│ The given key does not identify an element in this collection value: the collection has no elements.
╵
╷
│ Error: Invalid index
│
│   on .terraform/modules/vcn/vcn_gateways.tf line 157, in resource "oci_core_route_table" "nat":
│  157:       network_entity_id = module.drg_from_vcn_module[0].drg_id
│     ├────────────────
│     │ module.drg_from_vcn_module is empty tuple
│
│ The given key does not identify an element in this collection value: the collection has no elements.
The reasoning behind the value of network_entity_id = "drg" is that the route table will add a rule that will set the destination to the drg created by the vcn module. The only way I can get this to work is by first running terraform to create the drg, and then running terraform again to set the drg ocid directly.

@snafuz Please use v3.4.0 instead so we can include the provider change

@hyder  WIP - I've found a side-effect caused by the latest changes on vcn module that occurs when drg submodule is created in the network submodule. I'm working on a solution to fix it.

@hyder - I've upgraded VCN module to 3.4.0

Caveat: the DRG is still handled as an internal submodule


Update dbt_utils dependency to v0.9.x

Describe the feature
This package has a dependency on dbt_utils that restricts its version to <0.9.0. dbt_utils recently released compatibility release v0.9.x in preparation for their v1.0.0 release. It would be nice to be able to test against that release in preparation for the 1.0 release. Slack announcement
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I suppose it's not mission critical to be compatible with v0.9.x, but there are some breaking changes in v1.0 (they moved certain macros into dbt-core) that it would be nice to prepare for.
Additional context
Is this feature database-specific? Which database(s) is/are relevant? Please include any other relevant context here.
Who will this benefit?
What kind of use case will this feature be useful for? Please be specific and provide examples, this will help us prioritize properly.
dbt_utils is one of the most popular dbt packages. It seems compatibly with that package is more or less a necessity.
Are you interested in contributing this feature?

Perhaps. I just don't have the time at the moment.

Hi, bumping this to see if there's any headway on this? dbt_utils has already released v1.0. Thanks!

Resolved by https://github.com/dbt-labs/segment/pull/89
Please note that this package is no longer being maintained by dbt Labs - you may want to change to https://github.com/fleetio/dbt-segment who have adopted it.


UX improvements for adding multiple categories

When adding a category, the focus should we set on the New Category input, so the next category can be typed without first clicking the field again.
Current undesired behavior:
https://github.com/user-attachments/assets/4c8ebc26-ea8f-49f7-9499-ae1e44d72773

Closed by:
https://github.com/ProfessionalWiki/PageApprovals/pull/116


feat: extract division and unit pack data necessary for deck building

This pull request implements the data extraction for all relevant deck builder data.

I think this is basically good to go barring any issues with the most recent test file


2023-12-16 Release

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (95d4342) 99.61% compared to head (f9e9570) 99.61%.
 Consider uploading reports for the commit ac1bf1c to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #775   +/-   ##
=======================================
  Coverage   99.61%   99.61%
=======================================
  Files         105      105
  Lines        2361     2363    +2
  Branches      342      342
=======================================
+ Hits         2352     2354    +2
  Misses          9        9

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Track errors

Overview
This PR aims to add functionality for collecting error data within the app.
Here's an example of how we capture error data for a link that failed to op
telemetry.trackException(
  new Error(LINK_ERROR),
  SeverityLevel.Error,
  {
    ComponentName: 'Documentation link',
    SampleId: 'ef1b25b4-e6c7-4e91-88a1-6358f5fff714',
    Link: 'https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/users'
  });

The categories of errors to be captured will be:

LINK_ERROR
Errors in external links that have been malformed or that return status code that do not indicate success
COMPONENT_ERROR
Errors when a component fails to render
NETWORK_ERROR
Errors from HTTP requests
OPERATIONAL_ERROR
Any other errors caught within code that are temporary e.g. those originating from user input

is there a blocker on getting this in?

is there a blocker on getting this in?


🐛 [Joplin Server] Health Check / Watchdog fail if APP_BASE_URL not localhost

Which addon?

Addon name : Joplin Server
Addon version : 2.10.11

Describe the bug
Docker Health Check / Home Assistant Watchdog fails if APP_BASE_URL is not set to localhost / <IP_ADDRESS>. If Watchdog is activated the add-on constantly restarts, because Container Health Check fails.
As far as is can tell the problem is the Environment Variable HEALTH_URL (see image). It sets the path for the health check, default is "/health". This works fine as long as APP_BASE_URL is localhost. But if APP_BASE_URL is configured for external access, connections from all other origins including localhost are blocked by default, resulting in a container health check fail, docker marking the container as unhealthy and therefore Home Assistant Supervisor/Watchdog continuously restarting the add-on.
I tried setting HEALTH_URL to "https://example.duckdns.org/health", but since it seems the variable only is for a path at localhost and not a complete url, that doesn't work and prevents the add-on from starting at all.
Possible solution could be to make the variable accessible in supervisor interface and change the variable to accept a complete url instead of only a path with localhost as server fixed (or change the default host if APP_BASE_URL is changed). But this might to lead to further confusion down the road if access is configured to be behind a reverse proxy, since by default connection for health check is established via port 22300, which is usually closed and only port 80/443 are open.
Best Solution I can think of would be to persistently whitelist access from origin localhost/<IP_ADDRESS>, even if APP_BASE_URL is configured to a different location.
I have no clue how to do that though.
I'm pretty sure the problem lies in this line of code: https://github.com/alexbelgium/hassio-addons/blob/d58ed747e5c22fc0e0f67202f271a70ce21e5f17/joplin/Dockerfile#L124

To Reproduce

Install Addon with HomeAssistant
Configure APP_BASE_URL for external access (i.e. https://example.duckdns.org)
Activate Watchdog
Check log

Full addon log
2023-04-25 14:59:41: [error] App: 404: GET /health: ::ffff:<IP_ADDRESS>: Invalid origin: http://<IP_ADDRESS>:22300
2023-04-25 14:59:41: App: GET /health (404) (2ms)
2023-04-25 14:59:46: [error] App: 404: GET /health: ::ffff:<IP_ADDRESS>: Invalid origin: http://<IP_ADDRESS>:22300
2023-04-25 14:59:46: App: GET /health (404) (1ms)
2023-04-25 14:59:51: [error] App: 404: GET /health: ::ffff:<IP_ADDRESS>: Invalid origin: http://<IP_ADDRESS>:22300
2023-04-25 14:59:51: App: GET /health (404) (1ms)
2023-04-25 14:59:56: [error] App: 404: GET /health: ::ffff:<IP_ADDRESS>: Invalid origin: http://<IP_ADDRESS>:22300
2023-04-25 14:59:56: App: GET /health (404) (1ms)

Full addon config
APP_BASE_URL: https://example.duckdns.org
data_location: /config/addons_config/joplin
DB_CLIENT: pg
POSTGRES_DATABASE: joplin
POSTGRES_PORT: 5432
POSTGRES_HOST: 77b2833f-timescaledb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ***
MAILER_HOST: smtp.gmail.com
MAILER_ENABLED: 1
MAILER_AUTH_USER<EMAIL_ADDRESS>MAILER_SECURITY: starttls
MAILER_PORT: 587
MAILER_NOREPLY_EMAIL<EMAIL_ADDRESS>MAILER_NOREPLY_NAME: Joplin
MAILER_AUTH_PASSWORD: ***

System

Supervisor version: 2023.04.1
Host system version: 10.0

Hi, thanks you are totally right, and I see that it seems to be an issue others have experimented : https://github.com/laurent22/joplin/issues/7606#issuecomment-1452995483
It seems it is not possible to add additional whitelisted addresses. I'll probably remove the healthcheck if I don't find a way

Thanks for looking into that.
Just for you to know. Yesterday I poked around with the "ALLOWED_HOSTS" in the 99-run.sh a bit, adding <IP_ADDRESS> but to no avail. Still the same error as before.
https://github.com/alexbelgium/hassio-addons/blob/3e8a1c8394f1dda36ffbb12794dbd2824167c0cf/joplin/rootfs/etc/cont-init.d/99-run.sh#L63

I wonder if we can check if the joplin app is running rather than doing an ip check

I have no clue tbh. But as far as I understand it is that Supervisor Watchdog just monitors Dockers Standard Container health check. It seems to be possible to customize the docker heath check procedure (https://scoutapm.com/blog/how-to-use-docker-healthcheck -> How to Write a Custom Health Check). But I cant think of a way to customize it that works for everybody, ie. using APP_BASE_URL/health, without running into further issues with external access and ports etc.

Thanks, indeed I've written a custom healthcheck command for each of my addon. I've adapted it with a new logic, let's see if this works

Should be good now in the latest version

Nice. Gonna try and report as soon as I'm home.

Works fine now with 2.10.11-3.
Watchdog activated, addon running stable, no errors in log.
Thanks a lot!


[GitLab] Unable to find repository for group (404)

Plying with a PAT token generated for one project and for one group works fine if a particular repos are pointed in REPOS. However, if for the same group token, I point test-group/test-subgroup where a few projects I would like to analyze are located, I've got 404.
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/gitlab/exceptions.py", line 340, in wrapped_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gitlab/mixins.py", line 123, in get
    server_data = self.gitlab.http_get(path, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gitlab/client.py", line 827, in http_get
    result = self.http_request(
             ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gitlab/client.py", line 793, in http_request
    raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 404: 404 Project Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/conf.py", line 83, in load_and_verify_configuration
    configuration.repos.append(scm_client.get_repository(owner_or_repo))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/client_impl/gitlab_client.py", line 27, in get_repository
    project = self._gitlab_client.projects.get(owner_and_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gitlab/v4/objects/projects.py", line 787, in get
    return cast(Project, super().get(id=id, lazy=lazy, **kwargs))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gitlab/exceptions.py", line 342, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabGetError: 404: 404 Project Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/main.py", line 11, in <module>
    configuration = load_and_verify_configuration()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/conf.py", line 85, in load_and_verify_configuration
    raise ValueError(f"Unable to find repository {owner_or_repo}, aborting: {e}")
ValueError: Unable to find repository test-group/test-subgroup, aborting: 404: 404 Project Not Found
datascraper exited with code 1

(REPOS=test-group/test-subgroup)
@robrobert99 Have you played with the groups in your environment? Is it supported for GitLab?

I took a closer look at that problem and there seem to be more than one place to enhance.

"/" is not necessarily an indication that the value is a repository. GitLab allows subgroups which can be handy in the corporation environment. E.g. department1/teamA/projectX, department2/teamT/projectY:

https://github.com/MShekow/renovate-pr-visualization/blob/63078a0b71abe4ed40e1dc88cf5caf7b5544e245/conf.py#L81-L87
In my case it tried to get a project based on the subgroup name.

Even with 1 fixed, the related problem occurs in:

https://github.com/MShekow/renovate-pr-visualization/blob/63078a0b71abe4ed40e1dc88cf5caf7b5544e245/client_impl/gitlab_client.py#L88
Configuration check successful, starting to fetch Renovate PRs (this may take a few minutes) ...
Traceback (most recent call last):
  File "/app/main.py", line 13, in <module>
    renovate_prs = get_renovate_prs(configuration)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/renovate_parser.py", line 78, in get_renovate_prs
    for pr in git_repo.get_pull_requests(pr_author_username=config.renovate_scm_user, renovate_pr_label=config.renovate_pr_label):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/client_impl/gitlab_client.py", line 88, in get_pull_requests
    for mr in self._gl_project.mergerequests.list(**mr_params):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gitlab/base.py", line 134, in __getattr__
    raise AttributeError(message)
AttributeError: 'GroupProject' object has no attribute 'mergerequests'

<class 'gitlab.v4.objects.projects.GroupProject'> was created via a
list() call and only a subset of the data may be present. To ensure
all data is present get the object using a get(object.id) call. For
more details, see:

https://python-gitlab.readthedocs.io/en/v4.6.0/faq.html#attribute-error-list

A group is fetched which obviously doesn't  have merge requests.
There could be some extra logic in get_repository() to recursively fetch projects from group subgroups, but I didn't like the scratchy implementation I did (I'm not a Python developer), so I paste here only pseudo code:
    def get_repositories(self, owner_or_username: str) -> List[GitRepository]:
        if owner_or_username.startswith("user:"):
            owner_or_username = owner_or_username[5:]
            if self.get_username().lower() == owner_or_username.lower():
                projects = self._gitlab_client.projects.list(owned=True)
            else:
                user = self._gitlab_client.users.list(username=owner_or_username)[0]
                projects = self._gitlab_client.projects.list(user_id=user.id)
        else:
            group = self._gitlab_client.groups.get(owner_or_username)
            projects = self.get_repositories_from_subgroup_recursively(group)

        repos: List[GitRepository] = [GitLabRepository(project.id, self._gitlab_client, project) for project in
                                      projects]

        return repos

    def get_repositories_from_subgroup_recursively(self, group: Group) -> List[GitRepository]:
        projects = group.projects.list()
        sub_groups = group.subgroups.list()

        sub_projects = []
        for sub_group in sub_groups:
            sub_projects += self.get_repositories_from_subgroup_recursively(todo_create_domain_group_object_from_rest_group_object(sub_group))

        return projects + sub_projects

hoping that you will figure out any better solution to handle that :-/
@robrobert99 @MShekow WDYT?

Closed in https://github.com/MShekow/renovate-pr-visualization/pull/11


ValueError: You must specify an aggregation method to update a MirroredVariable in Tower Context.

Does anyone meet this error:
ValueError: You must specify an aggregation method to update a MirroredVariable in Tower Context.

my tensorflow version is 1.10.0, I wanna know whether the tensorflow version causes this error

Try https://github.com/guotong1988/BERT-multi-gpu/blob/master/run_pretraining_gpu_v2.py

Try https://github.com/guotong1988/BERT-multi-gpu/blob/master/run_pretraining_gpu_v2.py

Thanks, it works when I update my tf to 1.12.0


Update Content “2024-09-07-just-a-test”

Automatically generated by Decap CMS

👷 Deploy Preview for legendary-empanada-86b18b processing.

Name
Link

🔨 Latest commit
7e1cf7b85997f2b91df9ab96fedae7b8879c1827

🔍 Latest deploy log
https://app.netlify.com/sites/legendary-empanada-86b18b/deploys/66dccd383975a80008b09c52


ENG-894 - AI hackstack beta release and modal promotion

@mrfinch a few minutes before committing my changes did I realise that you asked to "Let's use our existing modal and..."

New modal created for for AI HackStack Promotion together with a ModalDynamicPromotion which is prepared to show modals, and save if user has seen them.
AI HackStack option shown for all teachers

Users will see the modal if they've been registered for more than 2 days.
Users won't see the modal again if they've seen it once.
backend pr: https://github.com/codecombat/codecombat-server/pull/988

Summary by CodeRabbit

New Features

Introduced tracking functionality for events within the application.
Added new content and entries for AI teaching, HackStack Beta release, and empowering students with AI in the curriculum.
Included new methods for managing promotions visibility within the user profile.
Implemented a dynamic promotion modal for displaying promotional content conditionally.
Added a modal for promoting the AI HackStack beta release to teachers.

Improvements

Simplified the logic for displaying the HackStack modal in the teacher dashboard.
Enhanced user profile management with new methods for tracking seen promotions.

oh any updates here? i want to reuse this promotion modal in my pr 😂


new version of Font-Awesome

Hey,
do you thinking about implement new version of font awesome ?
https://fontawesome.com/

https://github.com/ublaboo/datagrid/pull/612


v. 3.1.1 Should the select2 widget be initialized manually?

Is it my responsibility to initialize the widget?  The docs don't say anything about that.
Or if the widget is to be automatically initialized by DAL, it is not happening.  The select is rendering un-initialized.

I just saw {{ form.media }} in the docs. The initialization is done automatically through form.media.


WASM fixes

Fixes issues that came up while parsing the human encoding in WASM.

thread_local is more efficient than Once because it doesn't need to use synchronization every time that it's accessed.

If WASM can't handle thread_local, even though I wrote the original code specifically with WASM in mind (in which it should be a no-op because WASM has no threads), then I guess it's fine to hack around it by making our code less efficient and unsafe. But I'm not thrilled about it.

I can't test this until we update the vendored version of Simplicity for the recent CI fixes.

For now, I reordered the commits to make the tests work.

thread_local! works, so I added it back in. The borrow error no longer occurs.
We could share the same powers of two across threads using RwLock or OnceLock, but this requires MSRV 1.63.0 and MSRV 1.70.0, respectively, to work in const.

RwLock is extremely slow and should basically never be used unless your problem architecture really requires it. Not sure about OnceLock. It's likely to be better.


Feature request: Temporarily stop time tracker / pause

A very handy feature that seems to be missing is to temporarily pause the timer. This is possible in the integrated time tracker inside jira and has been quite helpful. Any plans in adding a similar feature in chronos?

I do not know how useful it would be, because if you pause the timer and resume let say after 30min, it should have it start delayed in 30min or be log as done when you hit stop.
I mean it beacuse in this example you would have a 30min gap inside your worklog, that 30min gap can't be placed inside the worklog, it has to be ajusted at it's start or at it's end.
So in this same example stopping and starting a new one after 30 min makes more sense.

I came here to request this same thing. I think it would be okay to just take the time from the end of the time block. The alternative is getting a bunch of small logs recorded on the ticket. If I work for three hours and every 30 minutes someone is coming in and talking with me and I want to not have that time recorded as active work I get a bunch of broken up worklogs on the ticket.
I've tried some worklog tools that have recorded lots of 5 and 10 minute worklogs. They've worked around this by allowing worklogs to be merged into one big ticket as an after the fact thing. This big ticket though is the time worked, not the exact hours, which is the same thing as if you just took the paused time off the end of the ticket.
I'd also appreciate a pause being implemented in Chronos (which I'm loving so far). I'm okay with the knowledge that the paused time would be taken off the end of the worked period.

@ksclarke Nice that someone finds this functionality useful. It is actually default on the integrated time tracker in Jira, so i use that instead of Chronos now. It is useful because my work environment is flexible. I switch between tasks often while working on a main task. I want to pause the main task if my time is interrupted with something else :)

Hmm, my work's Jira must not have that plugin (or be up to that version yet). I don't see an integrated tracker in Jira, just a way to manually enter a worklog and time period.

Not sure if it's integrated or a plugin. But it looks like this:


REST API

Provide RESTful APIs for accessing content
Definitions

Endpoint - The API URL (without hostname) to retrieve the full item.
Slug - The sluggified version (all lowercase, underscores and spaces replaced with single dashes) of the mentioned item

Feature: REST API
  As an application developer
  I want to access the content in the CMS from my application
  So that I can maintain my application and its content separately

  Scenario: All Content
    Given I would like to retrieve all available content
     When I hit the root of the API
     Then I should be given a list of all available content
      And be provided with their IDs, type, key attribute value, key attribute slug, and endpoint
      And it should be sorted by the key attribute value

  Scenario: All Content Types
    Given I would like to retrieve all of the types of content that are available
     When I hit the `types` endpoint
     Then I should be given a list of all available content types
      And be provided with their name, name slug, description, endpoint, and count of available content
      And it should be sorted by name

  Scenario: All Content of Given Content Type
    Given I would like to retrieve all of the content of a given content type that are available
     When I hit the `types/type` endpoint
     Then I should be given a list of all available content of the provided content types
      And be provided with their IDs, type, type slug, key attribute value, key attribute slug, and endpoint
      And it should be sorted by the key attribute value

  Scenario: Individual Piece of Content
    Given I would like to retrieve an individual piece of content
     When I hit the `types/type/id` endpoint
     Then I should be given the full display of requested content
      And be provided with its IDs, type, type slug, key attribute value, key attribute slug, and all attributes

Scenario: Paginate Results
    Given I am retrieving a list of items from an API
     When the list of items is larger than 30 items
     Then I should be provided results in groups of 30 items
      And I should be able to set the total number of items to return, up to 100
      And I should be able set the grouping offset I would like to retrieve
      And if I do not specify an offset I should be given the first grouping (starting at 1)
      And I should be provided with the endpoint for the next grouping
      And I should be provided with the endpoint for the previous grouping
      And I should be provided with the endpoint for the first grouping
      And I should be provided with the endpoint for the last grouping
      And it should paginate after sorting has occurred

Scenario: Sort Results
    Given I am retrieving a list of items from an API
     When the list of items is returned to me
     Then it should be sorted in ascending order by the default key of the list
      And I should be able to set the key to sort on
      And I should be able to set if sorting is ascending or descending

REST API

[x] All Content
[x] All Content Types
[x] All Content of Given Content Type
[ ] Individual Piece of Content
[x] Paginate Results
[x] Sort Results

Pagination and Sort Results: https://github.com/Snugug/punchcard/commit/c1a48fcb45e49e6b861701b849e6c5c48740ef89
All Content API: https://github.com/Snugug/punchcard/commit/f6ae57fcb5b0f0f5f888c474fd333ff64e25c30e

All Content Types: https://github.com/Snugug/punchcard/commit/e68af4dccc34d98d71fd858a07713ac5bfa4d97e

All Content of Given Type: https://github.com/Snugug/punchcard/commit/8d41194185b5120cce0631d3856fac49346f4180

Individual Content: https://github.com/Snugug/punchcard/commit/1beb24d4c9f52af1fd3b46acd00d618d86d0df9f

I'm writing tests now, then PR


[Accessibility][Usability]A11y_VSCode_ViewSearch_Keyboard: Keyboard focus is not clearly visible on checkboxes when already checked.

Environment Details:
VSCode Version : 1.24.0
OS Version : Win10
Additional Details:
Issue Type : Usability
Repro Steps:

Launch VS Code.
Navigate to Activity Bar and select "Search"(Cntrl+Shift+F) button.
Navigate to checkboxes - "Match Case" , "Match Whole Word" , "Use RegEx", "Use Exclude settings and Ignore Files" and check them.

Actual:
When we navigate from "Search" text field to move to next controls i.e. checkboxes the focus is not visible when all the checkboxes are checked. Unable to identify the currently focused checkbox.
Same issue is for "Use Exclude settings and Ignore Files" checkbox where user is unable to identify focus when checkbox is already checked.
Expected:
Focus on "Match Case" , "Match Whole Word" , "Use RegEx", "Use Exclude settings and Ignore Files" (in checked state) checkboxes should be clearly visible when focused.
Recommendations:
Refer below link which is repository of bug fixes code snippets:
https://microsoft.sharepoint.com/teams/msenable/mas/pages/browse-fixes.aspx
User Impact:
Low vision /visually impaired users will not be able to identify the focus on focused element when all the checkboxes are checked.
Attachment For Reference:
A11y_VSCode_ViewSearch_Usability_FocusIssueOnCheckboxes.pptx
Does this issue occur when all extensions are disabled?: Yes

Basically a theme issue, we also have https://github.com/Microsoft/vscode/issues/48855 for this. Also #8017.
For seeing-impaired users, they may want to use the "high contrast" theme.


add coformer

Signed-off-by: gexy5<EMAIL_ADDRESS>

Codecov Report

Merging #1506 (3b69383) into main (be2124e) will increase coverage by 0.02%.
The diff coverage is 81.56%.

:exclamation: Current head 3b69383 differs from pull request most recent head 76d5aa8. Consider uploading reports for the commit 76d5aa8 to get more accurate results

@@            Coverage Diff             @@
##             main    #1506      +/-   ##
==========================================
+ Coverage   68.69%   68.72%   +0.02%
==========================================
  Files         303      322      +19
  Lines       16777    18642    +1865
  Branches     2708     3032     +324
==========================================
+ Hits        11525    12811    +1286
- Misses       4496     4970     +474
- Partials      756      861     +105

Impacted Files
Coverage Δ

towhee/models/coformer/position_encoding.py
49.18% <49.18%> (ø)

towhee/models/coformer/utils.py
76.66% <76.66%> (ø)

towhee/models/coformer/coformer.py
80.00% <80.00%> (ø)

towhee/models/coformer/backbone.py
87.71% <87.71%> (ø)

towhee/models/coformer/transformer.py
92.99% <92.99%> (ø)

towhee/models/coformer/config.py
100.00% <100.00%> (ø)

towhee/types/image.py
77.41% <0.00%> (-20.02%)
:arrow_down:

towhee/functional/entity.py
75.75% <0.00%> (-17.10%)
:arrow_down:

towhee/engine/factory.py
85.45% <0.00%> (-5.54%)
:arrow_down:

towhee/utils/pil_utils.py
71.42% <0.00%> (-5.05%)
:arrow_down:

... and 56 more

Continue to review full report at Codecov.

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


OS X virtualenv Handling is Broken

When running hatch install -l, the following error appears:
Installing...
Obtaining file:///Users/pblair/views/test-project
Installing collected packages: test-project
  Running setup.py develop for test-project
    Complete output from command /opt/local/bin/python3 -c "import setuptools, tokenize;__file__='/Users/pblair/views/test-project/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
    running develop
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:

        [Errno 13] Permission denied: '/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/test-easy-install-67789.write-test'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

        /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/

    Perhaps your account does not have write access to this directory?  If the
    installation directory is a system-owned directory, you may need to sign in
    as the administrator or "root" account.  If you do not have administrative
    access to this machine, you may wish to choose a different installation
    directory, preferably one that is listed in your PYTHONPATH environment
    variable.

    For information on other options, you may wish to consult the
    documentation at:

      https://setuptools.readthedocs.io/en/latest/easy_install.html

    Please make the appropriate changes for your system and try again.

The problem appears to be in the virutualenv handling:
 λ test-project git:(master) ✗ > hatch shell . pip --version
Running `pip --version` in this project's env...
pip 9.0.1 from /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (python 3.6)
 λ test-project git:(master) ✗ > . ./venv/bin/activate && pip --version && deactivate
pip 9.0.1 from /Users/pblair/views/test-project/venv/lib/python3.6/site-packages (python 3.6)
 λ test-project git:(master) ✗ >

Further investigation seems to indicate that the culprit is the __PYENV_LAUNCHER__ variable:
 λ test-project git:(master) ✗ > hatch shell . env | grep LAUNCHER
__PYVENV_LAUNCHER__=/opt/local/bin/python3
 λ test-project git:(master) ✗ > . ./venv/bin/activate && (env | grep LAUNCHER) && deactivate

And, sure enough, unsetting it manually fixes the issue:
 λ test-project git:(master) ✗ > hatch shell .
source "/Users/pblair/views/test-project/venv/bin/activate"
 λ test-project git:(master) ✗ > source "/Users/pblair/views/test-project/venv/bin/activate"
(venv) λ test-project git:(master) ✗ > pip --version
pip 9.0.1 from /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (python 3.6)
(venv) λ test-project git:(master) ✗ > unset __PYVENV_LAUNCHER__
(venv) λ test-project git:(master) ✗ > env | grep LAUNCHER
(venv) λ test-project git:(master) ✗ > pip --version
pip 9.0.1 from /Users/pblair/views/test-project/venv/lib/python3.6/site-packages (python 3.6)
(venv) λ test-project git:(master) ✗ >

Would it be possible to add a del os.environ["__PYVENV_LAUNCHER__"] in the venv code to remedy this problem?

Found this too https://bugs.python.org/issue22490
I'm working on it now!

@belph Please try fix in 0.17.1 and let me know!

Yes, that seems to have fixed it. Thank you!

Yay, thanks for the report!


WIP: Enable and use import maps

Resolves #3199
Description

Type of change

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update
Documentation update

How Has This Been Tested?

Screenshots

@heyapricot I've made some updates since the last week. Mainly:

Fix issue in which line items UI supported by cocoon was not working
Migrate turbo from webpack to importmaps
Fix dropdown not working

The next step I'd take is to make sure the system tests start passing again. Pick one or a few and try to get it to start passing by adding JS that may have been left out from https://github.com/rubyforgood/human-essentials/blob/main/app/assets/javascripts/application.js or need to be moved from the webpack version.
This is exciting!

@dorner as requested here is a list of things that still need to be fixed.

Icons on the side nav are missing. Likely due to needing to migrate fontawesome from webpacker.
select2 stimulus controller is not loading properly without error. Seems to be caused by the $ syntax not being recognized.
[Limited knowledge here from me] The bar code scanner code probably does not work. I don’t know how to test it either. I believe Scott has a barcode scanner.
There is logic to open a model in the new donations page when selecting the manufacturer or driver is new. This functionality hasn’t been moved over.
Date range filters doesn’t appear to work. It looks like in the webpacker there are libraries to handle that

This list isn't all encompassing, these are just the most upfront issues I've seen so far.
Happy to work with you to divide on conquer this if it makes sense :)

FWIW, I believe you can use your phone as a bar code scanner.  I don't know the details on that, though.

You can use your computer's camera as well. If you click / tap in the barcode area it should automatically prompt you to use it.

oh build is failing. That's weird, it wasn't doing that before :o Let me see if just running bundle will fix

Should be fixed now.

Honestly, it would be so far down in priority that I kind of hope nobody ever picks it up. We have a lot better fish to fry - for example, at some point we probably should upgrade to Bootstrap 5, which might render this moot depending on if there are fixes in there.

Thank you for getting this merged!

@heyapricot @dorner @edwinthinks Thanks for your work on this -- we just released it!


OAuth auto refresh capability

HI,
Instead of manually checking when the token expires or if you get an error when making an HTTP call and then calling refresh;
does it make sense to include automatically refreshing the token if a refresh token is present when getting the access token?

Always refreshing the access token if there is a refresh token sounds like a waste of bandwidth. At the very least an implementation should check the expiration date first. There should be no need to refresh when the token is still valid. Otherwise you'd essentially double the number of requests because you'd perform one refresh for every API call.
In http-client-essentials-suite I have a generic authentication decorator which addresses all the pain with authentication and makes it really simple (and secure).
In fact I've already written an AuthStrategy implementation which handles OAuth2 authentication in a transparent manner. Unfortunately that was for a proprietary project, but I'm going to re-implement an Open Source version soon.

Yes, I did mean when the access token is close to expiration or already expired. I manually do it right now by checking when it will expire and set up a thread to refresh it based on that.


Remove eval() use in BlockEditor

The updatePreview() function under block_editor_controller.js uses eval() to evaluate manually inputted block definitions in order to display the user-defined blocks in the preview. Remove the use of eval() in parsing and displaying user-inputted block definitions.

Potential solution would be to use an interpreter. This would require wrapping a whole lot of functions to support the majority of Blockly blocks. It would also take a significant test infrastructure to verify.

See temporary solution in https://github.com/google/blockly/pull/1235.


problems with check for PLUGIN_KEY in merge in lib/cli/configuration.js

so basically if mdast plugin also has plugins=["foo", "bar"] option, then merge function and check for PLUGIN_KEY=plugins will turn them to plugins={ foo: null, bar: null }
.mdastrc:
{
	"plugins": {
		"mdast-demo": {
			"plugins": [ "foo", "bar" ],
			"plugins2": [ "foo", "bar" ]
		}
	}
}

mdast-demo:
module.exports = function attacher(processor, options) {
  return function transformer(ast) {
    console.log('plugins', options.plugins);
    console.log('plugins2', options.plugins2);
  };
};

log:
plugins { foo: null, bar: null }
plugins2 [ 'foo', 'bar' ]

I found this bug while was debugging mdast-textr

I tried to fix it on my own, but merge is too complicated for me, sorry(

Thanks for raising the issue, @iamstarkov!

no problem =)


Iterate on different chunks of a sframe

Hi, I'm trying to do iterate over a large sframe to do something like example below
import sframe

def transform(x):
    print x

sf = sframe.SFrame()
sf['a'] = [1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 5]
sf['b'] = [1, 2, 1, 2, 3, 3, 1, 4, None, 2, 3]

for r in sf:
    for x in r:
        transform(x)

Is there a way to use multiprocessing to run something like this, when I try to chunk the sframe I get the same issue mentioned on the forums here

I may be confused as to what you're asking, but can't SFrame.apply or SArray.apply be used for this? Apply chunks the SFrame and runs the transform function in parallel automatically.

I'm trying to export the sframe into avro dumps. To make it faster I was trying to use multiprocessing and ran into the issue mentioned above. When using the apply method I see the following error:
test case:
import sframe

RECORD = 0
FILE_ID = 0
FILE = open(str(FILE_ID), 'wb')
WRITER = csv.writer(FILE)

def transform(x):
    global FILE
    global RECORD
    global FILE_ID
    global WRITER

    if (RECORD % 2) == 0 and RECORD > 1:
        FILE_ID += 1
        FILE.close()
        FILE = open(str(FILE_ID), 'wb')
        WRITER = csv.writer(FILE)

    print x, RECORD, FILE_ID
    WRITER.writerow([x])
    RECORD += 1

def transform_row(r):
    print r
    for x in r:
        transform(x)
    print 'row end'

sf = sframe.SFrame()
sf['a'] = [1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 5]
sf['b'] = [1, 2, 1, 2, 3, 3, 1, 4, None, 2, 3]

sf.apply(transform_row)
FILE.close()

error:
Traceback (most recent call last):
  File "partition.py", line 38, in <module>
    sf.apply(transform_row)
  File "/Users/sbajaj/miniconda/lib/python2.7/site-packages/sframe/data_structures/sframe.py", line 2591, in apply
    return SArray(_proxy=self.__proxy__.transform(fn, dtype, seed))
  File "/Users/sbajaj/miniconda/lib/python2.7/site-packages/sframe/cython/context.py", line 49, in __exit__
    raise exc_type(exc_value)
pickle.PicklingError: Can't pickle builtin <type 'member_descriptor'>

Any advice on what I'm doing wrong would be great.

First, when you apply (or iterate) over an SFrame, the value is passed to the function as a python dictionary, so you're only writing the column name in your code.
But a more fundamental problem with this is that lambda workers aren't meant to be able to share state like this...each worker gets its own copy of the data captured by the closure of the function. As far as I know the results will be undefined. Even if they were, there's no locks guarding the global variables. A way you could do something like this is to write as many files as there are lambda workers, but to do that you'd need a reliable way to figure out which lambda worker you are and write to the correct file. We don't explicitly expose this, but it's possible to hack something...perhaps based on PID since this is all on one machine. An oddity could be that lambdas are allowed to crash and restart.
In any case though, have you tried saving your data as Avro in a serial fashion? Was that too slow? I could see gaining speed by parallelizing the conversion for sure, but unless you have a parallel file system you won't see great gains on the actual I/O. To get parallelization MAYBE you could have the lambda workers just run the conversion to Avro format and return the bytes as a string, and then save the resulting SFrame as a CSV with one column (use the save function on SFrame).
The real way to do this would be to write an Avro writer on the C++ side using Avro's C++ library :).

The dictionary case was just some mock example I created but isn't the actual code. Coming back to the issue at hand.
Yeah the serial writing along with the transformation code took several hours which was quite slow compared to the rest of the processing pipeline. I was originally trying to just iterate over the pipeline in parallel and then have each worker write to its own file which would be fine if I was using the multiprocessing workers but that would not work with lambda workers like you mentioned as I don't know which worker is which without sharing a global state.
I will try the transform in parallel and the write in serial order for now try to see the performance implications first, otherwise fall back to the C++ alternative. Can you point me to an example in the sframe code on how do to it on the C++ side ?

Here's our CSV writer:
https://github.com/dato-code/SFrame/blob/master/oss_src/sframe/csv_writer.cpp
And here's how we use the Avro library for the reader:
https://github.com/dato-code/SFrame/blob/master/oss_src/sframe/generic_avro_reader.cpp

Thanks for all the help, I'll close the issue for now.


Use New INSERT INTO ... VALUES syntax

Why do Microsoft developers continue to use the OLD INSERT INTO .... VALUE SYNTAX, instead of using the NEW INSERT INTO ... VALUES Syntax introduced in SQL Server 2008 (or even earlier)?
INSERT INTO Person VALUES (1,'John');
INSERT INTO Person VALUES (2,'Mary');
....
could have been coded as:
INSERT INTO Person
VALUES ( (1, 'John')
(2, 'Mary'),
(....          ) );

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 84c44dc1-637b-22b0-35db-0668d741818d
Version Independent ID: 5425118c-d998-df3e-89ee-29656a8aa07c
Content: SQL Graph Database Sample - SQL Server
Content Source: docs/relational-databases/graphs/sql-graph-sample.md
Product: sql
Technology: ****
GitHub Login: @shkale-msft
Microsoft Alias: shkale

@JpsKaGitHub -- thank you for your feedback.  Please add your suggestion here:

SQL Server Feedback

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


PR: Use conda-lock files to incrementally update conda-based installers

Description of Changes
The update manager plugin now uses an explicitly rendered conda-lock file in order to perform an incremental (minor/micro) update to Spyder in a conda-based installation environment. Previously the update manager simply performed a conda install.
Since conda-forge packages for releases are not available at the time of installer workflow runs, the checksum is removed from the Spyder spec in the conda-lock file. The checksum will be different for the Spyder conda package built on our CI vs. conda-forge, resulting in a ChecksumMismatchError. Removing the checksum in the conda-lock file avoids this error.

Hello @mrclary! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file spyder/plugins/updatemanager/widgets/update.py:

Line 333:80: E501 line too long (87 > 79 characters)

Additional question: how are we going to update the conda-lock file from one of our releases to the next? My idea would be to do it like this:

For bugfix versions: Take the file from the previous release and only change Spyder and its new direct and optional dependencies on it (i.e. spyder-kernels, pylsp, Pandas, etc). That way we'd be sure that the rest of packages in the installer env would remain exactly the same, which would avoid breakages from transitive dependencies we don't control.
For minor and major versions: Update the entire env to include the latest versions of every direct and transitive dependency (or perhaps only a selected group, I'm not really sure). This is more risky, but would also allow us to include important package updates in the installer.
Another option would be to be more conservative and only update the entire installer env once or twice per year.

However, with the current approach I think the lock file is auto-generated every time on CIs, which wouldn't allow us to do that.
@mrclary, do you think that workflow is a good idea? If so, how easy do you think it'd be to support it?

For bugfix versions: Take the file from the previous release and only update Spyder and its new direct and optional dependencies on it (i.e. spyder-kernels, pylsp, Pandas, etc). That way we'd be sure that the rest of packages in the installer env would remain exactly the same, which would avoid breakages from transitive dependencies we don't control.
For minor and major versions: Update the entire env to include the latest versions of every direct and transitive dependency (or perhaps only a selected group, I'm not really sure). This is more risky, but would also allow us to include important package updates in the installer.

I think these are good ideas.

Another option would be to be more conservative and only update the entire installer env once or twice per year.

I would prefer the previous option, probably because if we update a little more often then fewer things would change and we'd have an easier time identifying the offending package.

However, with the current approach I think the lock file is auto-generated every time on CIs, which wouldn't allow us to do that.

That is correct.

@mrclary, do you think that workflow is a good idea? If so, how easy do you think it'd be to support it?

I don't think it would be too difficult. conda-lock will "update" a conda-lock file if it already exists, as opposed to over-wrighting it. This could be achieved by either retrieving the conda-lock file from the latest release, or we could version control it in the installers-conda/resources directory. I think we'd just have to consider how we want to handle all the scenarios (PRs, release candidates, and releases).

I don't think it would be too difficult. conda-lock will "update" a conda-lock file if it already exists, as opposed to over-wrighting it.

Ok, that's really good.

This could be achieved by either retrieving the conda-lock file from the latest release, or we could version control it in the installers-conda/resources directory. I think we'd just have to consider how we want to handle all the scenarios (PRs, release candidates, and releases).

I think it'll be easier to retrieve the file from the latest release and update it on CIs, like this:

PRs should update Spyder and the subrepos.
Release candidates and releases should only update Spyder.

My rationale is that if we automate this process it'd be one less thing to worry about during the release process. And it'd also be less prone to error.
Could you take care of implementing that (if you agree, of course) in this PR, so we can check the process in beta2?

PRs should update Spyder and the subrepos.
Release candidates and releases should only update Spyder.

👍🏼

My rationale is that if we automate this process it'd be one less thing to worry about during the release process. And it'd also be less prone to error.
Could you take care of implementing that (if you agree, of course) in this PR, so we can check the process in beta2?

Absolutely.

@mrclary, reviewed the feasibility of my comment above and found out it's not possible to implement it using environment yaml files alone.
So, this one is ready.

Thank you @ccordoba12. 😁
Just for full disclosure, the documentation for conda-lock states:

Note: If there is an existing lockfile, it is used as constraint when regenerating the lockfile. This can be useful for adding new packages while keeping everything else locked.

Which does not actually work, at least not the way that I think it does. Furthermore, the documentation shows the example
# optionally, update the previous solution, using the latest version of
# pydantic that is compatible with the source specification
conda-lock --update pydantic

which I could not get to work at all. All of my attempts to use the --update flag resulted in regurgitating the conda-lock cli help; no error or any other messages 🤷♂.
I conclude that either I'm doing something wrong, or there is a bug with conda-lock, or a combination of both. It may be worthwhile to investigate this further in the future.


Mark fluvio-python-client as compatible w/ 3.11 not 3.12

3.12 compatibility fixed in https://github.com/infinyon/fluvio-client-python/pull/359


libs/libxx: Download C++ libraries during context.

Summary
context is the target where external libraries are downloaded, use that for C++ libraries instead of dirlinks.
Doing them during dirlinks also had the (side)effect of the libraries being downloaded when configuring the project.
Impact
C++ Libraries (uClibc++ & libcxx)
Testing
sim:cxxtest
sim:libcxxtest

@xiaoxiang781216 as explained in #4368, please take a look.

If I remeber correctly, these libraries put into dirlinks because they copy or create the linker to their header file path in nuttx/include folder.

I think technically it should be in dirlinks, the only somewhat issue I see is the fact the dirlinks is in the way of configure.sh and thus we are downloading these libraries when configuring.

Ok, let's merge the change and watch the feedback. BTW, should we do the similar change to OpenAMP?

Ok, let's merge the change and watch the feedback. BTW, should we do the similar change to OpenAMP?

I think we should do the same for OpenAMP.  I don't have a way to test it though (even though I see rpproxy and rpserver configs in the simulator, but I have never used them before).


Please Publish 0.7.0 to NPM if ready

Thank you!

we'll officially announce this soon, but for now: https://www.npmjs.com/package/@pusher/chatkit :)


Refactor 119 create tass conversion tools module

closes #119

I plan on collecting all the refactors related to #115 in a separate branch to avoid changing main branch too much until the refactor is more completed.


feed-market errors on various markets

feed-market on main-v2 fails with error 3: Reserve frozen
feed-market also fails intermittently on V3 production markets for supply cap, borrow cap, and debt ceiling errors
This command should adjust actions and amounts based on reserve state.

+1. Also seeing this issue.
Are you aware of any potential workarounds?


issue: Charging threshold setting not found.

Subject of the issue
I'm using a Macbook Air 2015, and it says that "Charging threshold setting not found". Going inside the folder BAT0 it has only these inside:
alarm         current_avg  manufacturer  subsystem   voltage_min_design
capacity            current_now  model_name    technology  voltage_now
charge_full         cycle_count  power         temp        wakeup42
charge_full_design  device       present       type
charge_now          hwmon2       status        uevent
Any chance it has that feature, to charge it up to a point only but it's named differently?
Your system
Macbook Air 2015
Mint 22
6.8 kernel
Version
1.2 (Latest)
Steps to reproduce
No response
Expected behaviour
No response
Actual behaviour
No response

It seems unlikely. Based on the contents of your BAT0 folder, those variables all have different purposes unrelated to setting the charging threshold.

If I change the battery with a modern, third party one could there be a chance of working? I guess what I ask is, is the variables reported directly from the battery, or the BIOS?

Interesting question! It would need to be an ASUS battery, but I think it's not the battery, it's the charger that is part of the board that has the capacity to expose this through the kernel module asus_nb_wmi. I think if you load it, you will likely get the report back that it cannot load the module, because there is "No such device".
By the way, so fun to see you here, I was an avid OSNews reader decades ago..!

I don't think it's reported from the battery too. My estimation is that that you'd need a device that is from one of the manufacturers that have drivers in the kernel for this which so far seems to be ASUS, Lenovo (ThinkPads), and Dell.

I suggest having a look at the extensive documentation for the Battery Health Charging extension for GNOME. They support and have a page for Intel Macs. Maybe that all that is required is installing the applesmc-next kernel module like they write.


⚠ Samsung has degraded performance

In 34584f9, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2605 ms

Resolved: Samsung performance has improved in b325170.


fix: ddev config should not stumble on invalid app type, fixes #5146

The Issue

#5146

It kept repeating on invalid type

The second through nth times it used print instead of the correct printf, so showed an invalid message

How This PR Solves The Issue

Replace print with printf
If invalid project type, use detected project type

Manual Testing Instructions
Set an invalid type in .ddev/config.yaml and then try to do interactive config.

I've tried two scenarios:

the silverstripe install with the project type drupal11
=> the suggested default on step three is php which is correct.

a fresh backdrop install with ddev config --auto setting the project type to backdrop. i've then manually changed it to drupal11
=> the suggested default on step three is backdrop which is correct

i really like the approach and i can confirm that it is working correctly in my manual testing. thank you!


Provide a way of retrieving enum values by name

Similar to https://github.com/dart-lang/dart-protobuf/blob/master/lib/src/protobuf/protobuf_enum.dart#L43 , but by name rather than by value.

I'm not quite sure what you're asking, but I think a workaround might be to loop over the .values list to find the one you want.

Yes that's exactly what I'm doing at the moment, I am just suggesting that a method be added that encapsulates this logic, and does not require iterating over the values each time. I am happy to give it a try at implementing this, feel free to assign the issue to me (it appears I can't).

For some reason I can't assign it to you either. I think it might be limited to the Dart org?
But feel free to work on it. (Note that we need to be careful that any new symbols don't conflict with whatever enum values are in the .proto file.)


Possibility to apply array of suits into gemini.test

Description: https://ru.bem.info/forum/598/
More info:
When providing the array of files with tests into gemini.test (or gemini.gather) it is not possible to modify the content of the tests. Crucial when all the gemini functionality is wrapped in plugin.

Seems this may now be done using SuiteCollection in programmatic API.


Bug: Deploy tool versions don't cascade correctly

When setting tool versions for stim deploy, the global value doesn't get set properly

Fixed by PR #53


Custom scalars do not work with "input types"

The code builder fails with [SEVERE] Failed after ... when using a custom scalar inside the definition of an input type as seen in input Animal below:
# schema.graphql

type Person {
  id: String
  createdAt: AWSDateTime
}

input Animal {
  id: String
  createdAt: AWSDateTime
}

# build.yaml

targets:
  $default:
    builders:
      graphql_codegen:
        options:
          scalars:
              AWSDateTime:
                type: String

I would expect that the library would honor the configs for the input types as well.
Use case
AWS Amplify generates schema for the AppSync API which includes input types with their custom scalars.

Can you please share your schema for more context? If you take a look at the test itest/assets/input, scalars are supported in input.

Hi @budde377 . Thanks for looking at this.
The minimal example is:

# schema.graphql

type Person {
  id: String
  createdAt: AWSDateTime
}

input Animal {
  id: String
  createdAt: AWSDateTime
}

This produces the error as is. From the schema in the test I see a declaration for scalar X. If I add these to the end of my schema the error goes away:

scalar AWSDateTime
scalar AWSTimestamp
scalar AWSJSON

I had thought that defining the scalars in the build.yaml file would have been enough to allow these custom AWS scalars  to work. So is it that I'm required to add these to my schema file?

Thanks for sharing @naedx. Yes, you'll need to add the scalars to the schema. The schema is the source of truth when it comes to type resolution, i.e. is the type a scalar or another input type.

Ok. Noted. Thank you! I'll close the issue


Upgrade from 2.0.5 to 2.2.0: db_import fails on Cassandra DB

Summary
Im upgrading Kong from version 2.0.5 to 2.2.0 following upgrade guide https://github.com/Kong/kong/blob/master/UPGRADE.md#upgrade-from-100---210-to-220
Im using Cassandra 3.11.5
At step kong config db_import kong.yml, I got an error message
parse successful, beginning import
Error: Failed importing:
[cassandra] UNIQUE violation detected on '{target="<IP_ADDRESS>:3000"}'

  Run with --v (verbose) or --vv (debug) for more details

I tried run db_import command again, at this time I got the same error but with another target
parse successful, beginning import
Error: Failed importing:
[cassandra] UNIQUE violation detected on '{target="<IP_ADDRESS>:8381"}'

  Run with --v (verbose) or --vv (debug) for more details

Steps To Reproduce

Run kong config db_import kong.yml

below is content of kong.yml
...
- created_at:<PHONE_NUMBER>.22
  upstream: 3dd19224-7b13-4759-84d2-c4b81201c54b
  id: 04da276d-49e8-442b-8693-8b03ce81b88f
  tags: ~
  target: <IP_ADDRESS>:3000
  weight: 100
- created_at:<PHONE_NUMBER>.492
  upstream: 3dd19224-7b13-4759-84d2-c4b81201c54b
  id: 2e0fab5e-2dd2-484d-ace7-dd552bf7a264
  tags: ~
  target: <IP_ADDRESS>:3000
  weight: 0
- created_at:<PHONE_NUMBER>.22
  upstream: 9727acc7-c496-4daf-99ed-bc0886cd8c73
  id: 04da276d-49e8-442b-8693-8b03ce81b88f
  tags: ~
  target: <IP_ADDRESS>:8381
  weight: 100
...

I ran kong config db_import kong.yml again but got the same error

Additional Details & Logs

Kong version 2.2.0
Debug logs

root@myserver:~# kong config db_import kong.yml -vv
2020/11/26 01:56:05 [verbose] Kong: 2.2.0
2020/11/26 01:56:05 [debug] ngx_lua: 10017
2020/11/26 01:56:05 [debug] nginx: 1017008
2020/11/26 01:56:05 [debug] Lua: LuaJIT 2.1.0-beta3
2020/11/26 01:56:05 [debug] admin_access_log = "logs/admin_access.log"
2020/11/26 01:56:05 [debug] admin_error_log = "logs/error.log"
2020/11/26 01:56:05 [debug] admin_listen = {"<IP_ADDRESS>:8444 http2 ssl reuseport backlog=16384"}
2020/11/26 01:56:05 [debug] anonymous_reports = false
2020/11/26 01:56:05 [debug] cassandra_contact_points = {"<IP_ADDRESS>","<IP_ADDRESS>","<IP_ADDRESS>"}
2020/11/26 01:56:05 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2020/11/26 01:56:05 [debug] cassandra_keyspace = "kong"
2020/11/26 01:56:05 [debug] cassandra_lb_policy = "RequestRoundRobin"
2020/11/26 01:56:05 [debug] cassandra_password = "******"
2020/11/26 01:56:05 [debug] cassandra_port = 9042
2020/11/26 01:56:05 [debug] cassandra_read_consistency = "LOCAL_QUORUM"
2020/11/26 01:56:05 [debug] cassandra_refresh_frequency = 60
2020/11/26 01:56:05 [debug] cassandra_repl_factor = 3
2020/11/26 01:56:05 [debug] cassandra_repl_strategy = "SimpleStrategy"
2020/11/26 01:56:05 [debug] cassandra_schema_consensus_timeout = 10000
2020/11/26 01:56:05 [debug] cassandra_ssl = false
2020/11/26 01:56:05 [debug] cassandra_ssl_verify = false
2020/11/26 01:56:05 [debug] cassandra_timeout = 5000
2020/11/26 01:56:05 [debug] cassandra_username = "kong"
2020/11/26 01:56:05 [debug] cassandra_write_consistency = "LOCAL_QUORUM"
2020/11/26 01:56:05 [debug] client_body_buffer_size = "8k"
2020/11/26 01:56:05 [debug] client_max_body_size = "0"
2020/11/26 01:56:05 [debug] client_ssl = false
2020/11/26 01:56:05 [debug] cluster_control_plane = "<IP_ADDRESS>:8005"
2020/11/26 01:56:05 [debug] cluster_data_plane_purge_delay = 1209600
2020/11/26 01:56:05 [debug] cluster_listen = {"<IP_ADDRESS>:8005"}
2020/11/26 01:56:05 [debug] cluster_mtls = "shared"
2020/11/26 01:56:05 [debug] database = "cassandra"
2020/11/26 01:56:05 [debug] db_cache_ttl = 0
2020/11/26 01:56:05 [debug] db_cache_warmup_entities = {"services","plugins"}
2020/11/26 01:56:05 [debug] db_resurrect_ttl = 30
2020/11/26 01:56:05 [debug] db_update_frequency = 5
2020/11/26 01:56:05 [debug] db_update_propagation = 1
2020/11/26 01:56:05 [debug] dns_error_ttl = 1
2020/11/26 01:56:05 [debug] dns_hostsfile = "/etc/hosts"
2020/11/26 01:56:05 [debug] dns_no_sync = false
2020/11/26 01:56:05 [debug] dns_not_found_ttl = 30
2020/11/26 01:56:05 [debug] dns_order = {"LAST","SRV","A","CNAME"}
2020/11/26 01:56:05 [debug] dns_resolver = {}
2020/11/26 01:56:05 [debug] dns_stale_ttl = 4
2020/11/26 01:56:05 [debug] error_default_type = "text/plain"
2020/11/26 01:56:05 [debug] go_plugins_dir = "off"
2020/11/26 01:56:05 [debug] go_pluginserver_exe = "/usr/local/bin/go-pluginserver"
2020/11/26 01:56:05 [debug] headers = {"off"}
2020/11/26 01:56:05 [debug] host_ports = {}
2020/11/26 01:56:05 [debug] kic = false
2020/11/26 01:56:05 [debug] log_level = "notice"
2020/11/26 01:56:05 [debug] lua_package_cpath = ""
2020/11/26 01:56:05 [debug] lua_package_path = "./?.lua;./?/init.lua;"
2020/11/26 01:56:05 [debug] lua_socket_pool_size = 30
2020/11/26 01:56:05 [debug] lua_ssl_trusted_certificate = {}
2020/11/26 01:56:05 [debug] lua_ssl_verify_depth = 1
2020/11/26 01:56:05 [debug] mem_cache_size = "1024m"
2020/11/26 01:56:05 [debug] nginx_admin_directives = {}
2020/11/26 01:56:05 [debug] nginx_daemon = "on"
2020/11/26 01:56:05 [debug] nginx_events_directives = {{name="worker_connections",value="auto"},{name="multi_accept",value="on"}}
2020/11/26 01:56:05 [debug] nginx_events_multi_accept = "on"
2020/11/26 01:56:05 [debug] nginx_events_worker_connections = "auto"
2020/11/26 01:56:05 [debug] nginx_http_client_body_buffer_size = "8k"
2020/11/26 01:56:05 [debug] nginx_http_client_max_body_size = "0"
2020/11/26 01:56:05 [debug] nginx_http_directives = {{name="client_max_body_size",value="0"},{name="ssl_prefer_server_ciphers",value="off"},{name="client_body_buffer_size",value="8k"},{name="ssl_protocols",value="TLSv1.2 TLSv1.3"},{name="ssl_session_tickets",value="on"},{name="ssl_session_timeout",value="1d"}}
2020/11/26 01:56:05 [debug] nginx_http_ssl_prefer_server_ciphers = "off"
2020/11/26 01:56:05 [debug] nginx_http_ssl_protocols = "TLSv1.2 TLSv1.3"
2020/11/26 01:56:05 [debug] nginx_http_ssl_session_tickets = "on"
2020/11/26 01:56:05 [debug] nginx_http_ssl_session_timeout = "1d"
2020/11/26 01:56:05 [debug] nginx_http_status_directives = {}
2020/11/26 01:56:05 [debug] nginx_http_upstream_directives = {}
2020/11/26 01:56:05 [debug] nginx_main_daemon = "on"
2020/11/26 01:56:05 [debug] nginx_main_directives = {{name="daemon",value="on"},{name="worker_processes",value="auto"},{name="worker_rlimit_nofile",value="auto"}}
2020/11/26 01:56:05 [debug] nginx_main_worker_processes = "auto"
2020/11/26 01:56:05 [debug] nginx_main_worker_rlimit_nofile = "auto"
2020/11/26 01:56:05 [debug] nginx_optimizations = true
2020/11/26 01:56:05 [debug] nginx_proxy_directives = {{name="real_ip_recursive",value="off"},{name="real_ip_header",value="X-Real-IP"}}
2020/11/26 01:56:05 [debug] nginx_proxy_real_ip_header = "X-Real-IP"
2020/11/26 01:56:05 [debug] nginx_proxy_real_ip_recursive = "off"
2020/11/26 01:56:05 [debug] nginx_sproxy_directives = {}
2020/11/26 01:56:05 [debug] nginx_status_directives = {}
2020/11/26 01:56:05 [debug] nginx_stream_directives = {{name="ssl_session_timeout",value="1d"},{name="ssl_session_tickets",value="on"},{name="ssl_prefer_server_ciphers",value="off"},{name="ssl_protocols",value="TLSv1.2 TLSv1.3"}}
2020/11/26 01:56:05 [debug] nginx_stream_ssl_prefer_server_ciphers = "off"
2020/11/26 01:56:05 [debug] nginx_stream_ssl_protocols = "TLSv1.2 TLSv1.3"
2020/11/26 01:56:05 [debug] nginx_stream_ssl_session_tickets = "on"
2020/11/26 01:56:05 [debug] nginx_stream_ssl_session_timeout = "1d"
2020/11/26 01:56:05 [debug] nginx_supstream_directives = {}
2020/11/26 01:56:05 [debug] nginx_upstream_directives = {}
2020/11/26 01:56:05 [debug] nginx_worker_processes = "auto"
2020/11/26 01:56:05 [debug] pg_database = "kong"
2020/11/26 01:56:05 [debug] pg_host = "<IP_ADDRESS>"
2020/11/26 01:56:05 [debug] pg_max_concurrent_queries = 0
2020/11/26 01:56:05 [debug] pg_port = 5432
2020/11/26 01:56:05 [debug] pg_ro_ssl = false
2020/11/26 01:56:05 [debug] pg_ro_ssl_verify = false
2020/11/26 01:56:05 [debug] pg_semaphore_timeout = 60000
2020/11/26 01:56:05 [debug] pg_ssl = false
2020/11/26 01:56:05 [debug] pg_ssl_verify = false
2020/11/26 01:56:05 [debug] pg_timeout = 5000
2020/11/26 01:56:05 [debug] pg_user = "kong"
2020/11/26 01:56:05 [debug] plugins = {"bundled"}
2020/11/26 01:56:05 [debug] port_maps = {}
2020/11/26 01:56:05 [debug] prefix = "/usr/local/kong/"
2020/11/26 01:56:05 [debug] proxy_access_log = "off"
2020/11/26 01:56:05 [debug] proxy_error_log = "logs/error.log"
2020/11/26 01:56:05 [debug] proxy_listen = {"<IP_ADDRESS>:8000 reuseport backlog=16384","<IP_ADDRESS>:8443 http2 ssl reuseport backlog=16384"}
2020/11/26 01:56:05 [debug] real_ip_header = "X-Real-IP"
2020/11/26 01:56:05 [debug] real_ip_recursive = "off"
2020/11/26 01:56:05 [debug] role = "traditional"
2020/11/26 01:56:05 [debug] ssl_cipher_suite = "intermediate"
2020/11/26 01:56:05 [debug] ssl_ciphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"
2020/11/26 01:56:05 [debug] ssl_prefer_server_ciphers = "on"
2020/11/26 01:56:05 [debug] ssl_protocols = "TLSv1.1 TLSv1.2 TLSv1.3"
2020/11/26 01:56:05 [debug] ssl_session_tickets = "on"
2020/11/26 01:56:05 [debug] ssl_session_timeout = "1d"
2020/11/26 01:56:05 [debug] status_access_log = "off"
2020/11/26 01:56:05 [debug] status_error_log = "logs/status_error.log"
2020/11/26 01:56:05 [debug] status_listen = {"off"}
2020/11/26 01:56:05 [debug] stream_listen = {"off"}
2020/11/26 01:56:05 [debug] trusted_ips = {}
2020/11/26 01:56:05 [debug] upstream_keepalive_idle_timeout = 60
2020/11/26 01:56:05 [debug] upstream_keepalive_max_requests = 256
2020/11/26 01:56:05 [debug] upstream_keepalive_pool_size = 60
2020/11/26 01:56:05 [debug] worker_consistency = "strict"
2020/11/26 01:56:05 [debug] worker_state_update_frequency = 5
2020/11/26 01:56:05 [verbose] prefix in use: /usr/local/kong
2020/11/26 01:56:05 [verbose] reading config file at /usr/local/kong/.kong_env
2020/11/26 01:56:05 [debug] reading environment variables
2020/11/26 01:56:05 [debug] admin_access_log = "logs/admin_access.log"
2020/11/26 01:56:05 [debug] admin_error_log = "logs/error.log"
2020/11/26 01:56:05 [debug] admin_listen = {"<IP_ADDRESS>:8444 http2 ssl reuseport backlog=16384"}
2020/11/26 01:56:05 [debug] admin_ssl_cert = "/usr/local/kong/ssl/admin-kong-default.crt"
2020/11/26 01:56:05 [debug] admin_ssl_cert_key = "/usr/local/kong/ssl/admin-kong-default.key"
2020/11/26 01:56:05 [debug] anonymous_reports = false
2020/11/26 01:56:05 [debug] cassandra_contact_points = {"<IP_ADDRESS>","<IP_ADDRESS>","<IP_ADDRESS>"}
2020/11/26 01:56:05 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2020/11/26 01:56:05 [debug] cassandra_keyspace = "kong"
2020/11/26 01:56:05 [debug] cassandra_lb_policy = "RequestRoundRobin"
2020/11/26 01:56:05 [debug] cassandra_password = "******"
2020/11/26 01:56:05 [debug] cassandra_port = 9042
2020/11/26 01:56:05 [debug] cassandra_read_consistency = "LOCAL_QUORUM"
2020/11/26 01:56:05 [debug] cassandra_refresh_frequency = 60
2020/11/26 01:56:05 [debug] cassandra_repl_factor = 3
2020/11/26 01:56:05 [debug] cassandra_repl_strategy = "SimpleStrategy"
2020/11/26 01:56:05 [debug] cassandra_schema_consensus_timeout = 60000
2020/11/26 01:56:05 [debug] cassandra_ssl = false
2020/11/26 01:56:05 [debug] cassandra_ssl_verify = false
2020/11/26 01:56:05 [debug] cassandra_timeout = 60000
2020/11/26 01:56:05 [debug] cassandra_username = "kong"
2020/11/26 01:56:05 [debug] cassandra_write_consistency = "LOCAL_QUORUM"
2020/11/26 01:56:05 [debug] client_body_buffer_size = "8k"
2020/11/26 01:56:05 [debug] client_max_body_size = "0"
2020/11/26 01:56:05 [debug] client_ssl = false
2020/11/26 01:56:05 [debug] cluster_control_plane = "<IP_ADDRESS>:8005"
2020/11/26 01:56:05 [debug] cluster_data_plane_purge_delay = 1209600
2020/11/26 01:56:05 [debug] cluster_listen = {"<IP_ADDRESS>:8005"}
2020/11/26 01:56:05 [debug] cluster_mtls = "shared"
2020/11/26 01:56:05 [debug] database = "cassandra"
2020/11/26 01:56:05 [debug] db_cache_ttl = 0
2020/11/26 01:56:05 [debug] db_cache_warmup_entities = {"services","plugins"}
2020/11/26 01:56:05 [debug] db_resurrect_ttl = 30
2020/11/26 01:56:05 [debug] db_update_frequency = 5
2020/11/26 01:56:05 [debug] db_update_propagation = 1
2020/11/26 01:56:05 [debug] dns_error_ttl = 1
2020/11/26 01:56:05 [debug] dns_hostsfile = "/etc/hosts"
2020/11/26 01:56:05 [debug] dns_no_sync = false
2020/11/26 01:56:05 [debug] dns_not_found_ttl = 30
2020/11/26 01:56:05 [debug] dns_order = {"LAST","SRV","A","CNAME"}
2020/11/26 01:56:05 [debug] dns_resolver = {}
2020/11/26 01:56:05 [debug] dns_stale_ttl = 4
2020/11/26 01:56:05 [debug] error_default_type = "text/plain"
2020/11/26 01:56:05 [debug] go_plugins_dir = "off"
2020/11/26 01:56:05 [debug] go_pluginserver_exe = "/usr/local/bin/go-pluginserver"
2020/11/26 01:56:05 [debug] headers = {"off"}
2020/11/26 01:56:05 [debug] host_ports = {}
2020/11/26 01:56:05 [debug] kic = false
2020/11/26 01:56:05 [debug] log_level = "notice"
2020/11/26 01:56:05 [debug] lua_package_cpath = ""
2020/11/26 01:56:05 [debug] lua_package_path = "./?.lua;./?/init.lua;"
2020/11/26 01:56:05 [debug] lua_socket_pool_size = 30
2020/11/26 01:56:05 [debug] lua_ssl_trusted_certificate = {}
2020/11/26 01:56:05 [debug] lua_ssl_verify_depth = 1
2020/11/26 01:56:05 [debug] mem_cache_size = "1024m"
2020/11/26 01:56:05 [debug] nginx_admin_directives = {}
2020/11/26 01:56:05 [debug] nginx_daemon = "on"
2020/11/26 01:56:05 [debug] nginx_events_directives = {{name="worker_connections",value="auto"},{name="multi_accept",value="on"}}
2020/11/26 01:56:05 [debug] nginx_events_multi_accept = "on"
2020/11/26 01:56:05 [debug] nginx_events_worker_connections = "auto"
2020/11/26 01:56:05 [debug] nginx_http_client_body_buffer_size = "8k"
2020/11/26 01:56:05 [debug] nginx_http_client_max_body_size = "0"
2020/11/26 01:56:05 [debug] nginx_http_directives = {{name="client_max_body_size",value="0"},{name="ssl_prefer_server_ciphers",value="off"},{name="client_body_buffer_size",value="8k"},{name="ssl_protocols",value="TLSv1.2 TLSv1.3"},{name="ssl_session_tickets",value="on"},{name="ssl_session_timeout",value="1d"}}
2020/11/26 01:56:05 [debug] nginx_http_ssl_prefer_server_ciphers = "off"
2020/11/26 01:56:05 [debug] nginx_http_ssl_protocols = "TLSv1.2 TLSv1.3"
2020/11/26 01:56:05 [debug] nginx_http_ssl_session_tickets = "on"
2020/11/26 01:56:05 [debug] nginx_http_ssl_session_timeout = "1d"
2020/11/26 01:56:05 [debug] nginx_http_status_directives = {}
2020/11/26 01:56:05 [debug] nginx_http_upstream_directives = {}
2020/11/26 01:56:05 [debug] nginx_main_daemon = "on"
2020/11/26 01:56:05 [debug] nginx_main_directives = {{name="daemon",value="on"},{name="worker_processes",value="auto"},{name="worker_rlimit_nofile",value="auto"}}
2020/11/26 01:56:05 [debug] nginx_main_worker_processes = "auto"
2020/11/26 01:56:05 [debug] nginx_main_worker_rlimit_nofile = "auto"
2020/11/26 01:56:05 [debug] nginx_optimizations = true
2020/11/26 01:56:05 [debug] nginx_proxy_directives = {{name="real_ip_recursive",value="off"},{name="real_ip_header",value="X-Real-IP"}}
2020/11/26 01:56:05 [debug] nginx_proxy_real_ip_header = "X-Real-IP"
2020/11/26 01:56:05 [debug] nginx_proxy_real_ip_recursive = "off"
2020/11/26 01:56:05 [debug] nginx_sproxy_directives = {}
2020/11/26 01:56:05 [debug] nginx_status_directives = {}
2020/11/26 01:56:05 [debug] nginx_stream_directives = {{name="ssl_session_timeout",value="1d"},{name="ssl_session_tickets",value="on"},{name="ssl_prefer_server_ciphers",value="off"},{name="ssl_protocols",value="TLSv1.2 TLSv1.3"}}
2020/11/26 01:56:05 [debug] nginx_stream_ssl_prefer_server_ciphers = "off"
2020/11/26 01:56:05 [debug] nginx_stream_ssl_protocols = "TLSv1.2 TLSv1.3"
2020/11/26 01:56:05 [debug] nginx_stream_ssl_session_tickets = "on"
2020/11/26 01:56:05 [debug] nginx_stream_ssl_session_timeout = "1d"
2020/11/26 01:56:05 [debug] nginx_supstream_directives = {}
2020/11/26 01:56:05 [debug] nginx_upstream_directives = {}
2020/11/26 01:56:05 [debug] nginx_worker_processes = "auto"
2020/11/26 01:56:05 [debug] pg_database = "kong"
2020/11/26 01:56:05 [debug] pg_host = "<IP_ADDRESS>"
2020/11/26 01:56:05 [debug] pg_max_concurrent_queries = 0
2020/11/26 01:56:05 [debug] pg_port = 5432
2020/11/26 01:56:05 [debug] pg_ro_ssl = false
2020/11/26 01:56:05 [debug] pg_ro_ssl_verify = false
2020/11/26 01:56:05 [debug] pg_semaphore_timeout = 60000
2020/11/26 01:56:05 [debug] pg_ssl = false
2020/11/26 01:56:05 [debug] pg_ssl_verify = false
2020/11/26 01:56:05 [debug] pg_timeout = 60000
2020/11/26 01:56:05 [debug] pg_user = "kong"
2020/11/26 01:56:05 [debug] plugins = {"bundled"}
2020/11/26 01:56:05 [debug] port_maps = {}
2020/11/26 01:56:05 [debug] prefix = "/usr/local/kong"
2020/11/26 01:56:05 [debug] proxy_access_log = "off"
2020/11/26 01:56:05 [debug] proxy_error_log = "logs/error.log"
2020/11/26 01:56:05 [debug] proxy_listen = {"<IP_ADDRESS>:8000 reuseport backlog=16384","<IP_ADDRESS>:8443 http2 ssl reuseport backlog=16384"}
2020/11/26 01:56:05 [debug] real_ip_header = "X-Real-IP"
2020/11/26 01:56:05 [debug] real_ip_recursive = "off"
2020/11/26 01:56:05 [debug] role = "traditional"
2020/11/26 01:56:05 [debug] ssl_cert = "/usr/local/kong/ssl/kong-default.crt"
2020/11/26 01:56:05 [debug] ssl_cert_key = "/usr/local/kong/ssl/kong-default.key"
2020/11/26 01:56:05 [debug] ssl_cipher_suite = "intermediate"
2020/11/26 01:56:05 [debug] ssl_ciphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"
2020/11/26 01:56:05 [debug] ssl_prefer_server_ciphers = "on"
2020/11/26 01:56:05 [debug] ssl_protocols = "TLSv1.1 TLSv1.2 TLSv1.3"
2020/11/26 01:56:05 [debug] ssl_session_tickets = "on"
2020/11/26 01:56:05 [debug] ssl_session_timeout = "1d"
2020/11/26 01:56:05 [debug] status_access_log = "off"
2020/11/26 01:56:05 [debug] status_error_log = "logs/status_error.log"
2020/11/26 01:56:05 [debug] status_listen = {"off"}
2020/11/26 01:56:05 [debug] stream_listen = {"off"}
2020/11/26 01:56:05 [debug] trusted_ips = {}
2020/11/26 01:56:05 [debug] upstream_keepalive_idle_timeout = 60
2020/11/26 01:56:05 [debug] upstream_keepalive_max_requests = 256
2020/11/26 01:56:05 [debug] upstream_keepalive_pool_size = 60
2020/11/26 01:56:05 [debug] worker_consistency = "strict"
2020/11/26 01:56:05 [debug] worker_state_update_frequency = 5
2020/11/26 01:56:05 [verbose] prefix in use: /usr/local/kong
2020/11/26 01:56:06 [debug] resolved Cassandra contact point '<IP_ADDRESS>' to: <IP_ADDRESS>
2020/11/26 01:56:06 [debug] resolved Cassandra contact point '<IP_ADDRESS>' to: <IP_ADDRESS>
2020/11/26 01:56:06 [debug] resolved Cassandra contact point '<IP_ADDRESS>' to: <IP_ADDRESS>
2020/11/26 01:56:07 [info] parse successful, beginning import
Error:
/usr/local/share/lua/5.1/kong/cmd/config.lua:118: Failed importing:
[cassandra] UNIQUE violation detected on '{target="<IP_ADDRESS>:3000"}'
stack traceback:
	[C]: in function 'error'
	/usr/local/share/lua/5.1/kong/cmd/config.lua:118: in function 'cmd_exec'
	/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
	[C]: in function 'xpcall'
	/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
	/usr/local/bin/kong:9: in function 'file_gen'
	init_worker_by_lua:49: in function <init_worker_by_lua:47>
	[C]: in function 'xpcall'
	init_worker_by_lua:56: in function <init_worker_by_lua:54>

Operating system: Ubuntu 16.04

I tried upgrade to 2.1.4 following the same guide, db_import successfully
I think bug is only 2.2.0

I tried upgrade another kong cluster from 2.0.5 to 2.2.1 following the same guide (upgrade from 2.0.5 to 2.1.4 first) but db_import failed with the same errors
/usr/local/share/lua/5.1/kong/cmd/config.lua:118: Failed importing:
[cassandra] UNIQUE violation detected on '{name="test-service"}'
stack traceback:
	[C]: in function 'error'
	/usr/local/share/lua/5.1/kong/cmd/config.lua:118: in function 'cmd_exec'
	/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
	[C]: in function 'xpcall'
	/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
	/usr/local/bin/kong:9: in function 'file_gen'
	init_worker_by_lua:49: in function <init_worker_by_lua:47>
	[C]: in function 'xpcall'
	init_worker_by_lua:56: in function <init_worker_by_lua:54>

below is kong.yml
...
- host: test-service
  created_at:<PHONE_NUMBER>
  connect_timeout: 60000
  id: 2ec1a037-b2d6-4652-84ba-8dcb77bca51f
  protocol: http
  name: test-service
  read_timeout: 60000
  port: 80
  path: /test
  updated_at:<PHONE_NUMBER>
  retries: 5
  write_timeout: 60000
  tags: ~
  client_certificate: ~
...

@locao can you take a look ^

Hello @bungle @locao,
I tried import yml backup file into newest kong version (2.3.3) but I got the same error
[root@kong-gw data]# kong config db_import /data/kong.20210316.yml --v
2021/03/16 17:47:27 [verbose] Kong: 2.3.3
2021/03/16 17:47:27 [verbose] prefix in use: /usr/local/kong
2021/03/16 17:47:27 [verbose] reading config file at /usr/local/kong/.kong_env
2021/03/16 17:47:27 [verbose] prefix in use: /usr/local/kong
2021/03/16 17:47:29 [info] parse successful, beginning import
Error:
/usr/local/share/lua/5.1/kong/cmd/config.lua:118: Failed importing:
[cassandra] UNIQUE violation detected on '{target="<IP_ADDRESS>:6971"}'
stack traceback:
	[C]: in function 'error'
	/usr/local/share/lua/5.1/kong/cmd/config.lua:118: in function 'cmd_exec'
	/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
	[C]: in function 'xpcall'
	/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
	/usr/local/bin/kong:9: in function 'file_gen'
	init_worker_by_lua:49: in function <init_worker_by_lua:47>
	[C]: in function 'xpcall'
	init_worker_by_lua:56: in function <init_worker_by_lua:54>

My example yml file:
- created_at:<PHONE_NUMBER>.161
  upstream: bffcd0c9-0fe1-49a8-a110-b0971c15a722
  id: 9a4eb7c3-b815-49a0-abab-1c4c911f791e
  tags: ~
  target: <IP_ADDRESS>:6971
  weight: 100
- created_at:<PHONE_NUMBER>.602
  upstream: bffcd0c9-0fe1-49a8-a110-b0971c15a722
  id: 86cabdf8-954c-4b75-a2af-cf033ec81606
  tags: ~
  target: <IP_ADDRESS>:6971
  weight: 0
- created_at:<PHONE_NUMBER>.72
  upstream: bffcd0c9-0fe1-49a8-a110-b0971c15a722
  id: c159e8bb-bb1b-427c-9851-b5d6bff7f29b
  tags: ~
  target: <IP_ADDRESS>:6971
  weight: 100

In my case, I added new target (id 9a4eb7c3-b815-49a0-abab-1c4c911f791e) -> delete it -> add new target again

Hello @mrpk1906! Targets are unique under the same upstream, i.e. you can have only one IP+port combination for each upstream. If you want to increase the amount of traffic for a specific target, you should increase its weight or decrease the weight of the other targets.

Hello @locao,
From Target document:
Disable a target in the load balancer. Under the hood, this method creates a new entry for the given target definition with a weight of 0.

When I add Target at the first time -> then disable it -> add it again, database contain 3 record

 id                                   | created_at                      | tags | target             | upstream_id                          | weight
--------------------------------------+---------------------------------+------+--------------------+--------------------------------------+--------
 86cabdf8-954c-4b75-a2af-cf033ec81606 | 2020-03-30 09:04:10.602000+0000 | null | <IP_ADDRESS>:6971 | bffcd0c9-0fe1-49a8-a110-b0971c15a722 |      0
 c159e8bb-bb1b-427c-9851-b5d6bff7f29b | 2020-03-30 10:11:53.720000+0000 | null | <IP_ADDRESS>:6971 | bffcd0c9-0fe1-49a8-a110-b0971c15a722 |    100
 9a4eb7c3-b815-49a0-abab-1c4c911f791e | 2020-03-27 09:00:10.161000+0000 | null | <IP_ADDRESS>:6971 | bffcd0c9-0fe1-49a8-a110-b0971c15a722 |    100

I run export config to yml file then import into a new kong instance, I got error above.
I think it is a bug.

Unfortunately, we don't have any plans on fixing this issue. Apologies for the inconvenience.


SVG doesn't import correctly when color is specified on the  or  nodes

For example, consider this ic_add_black_24dp.svg that I downloaded/modified from go/icons:
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px"
        viewBox="0 0 24 24" fill="#ff000000">
    <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" fill="#fffffff"/>
</svg>

AndroidIconAnimator displays a white plus sign path. However, the SVG should really display a black plus sign path.

The same issue also exists when the color is defined in the style attribute on the path:
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 65.441 65.441" style="enable-background:new 0 0 65.441 65.441;" xml:space="preserve">
<g>
	<g id="group-2svg">
		<path id="path-1_10_" style="fill:#EDC951;" d="M65.441,34.881c0,16.616-13.472,30.086-30.09,30.086S5.262,51.497,5.262,34.881
			S18.733,4.795,35.351,4.795S65.441,18.265,65.441,34.881z"/>
		<path id="path-2_10_" d="M45.647,23.776c0,2.01-1.629,3.639-3.639,3.639c-2.011,0-3.641-1.629-3.641-3.639s1.63-3.639,3.641-3.639
			C44.018,20.137,45.647,21.766,45.647,23.776z"/>
		<path id="path-3_10_" d="M24.718,23.776c0,2.01-1.629,3.639-3.64,3.639c-2.01,0-3.64-1.629-3.64-3.639s1.63-3.639,3.64-3.639
			C23.089,20.137,24.718,21.766,24.718,23.776z"/>
		<path id="path-4_10_" d="M34.374,50.737h-5.055c-6.403,0-11.611-5.145-11.611-11.469c0-0.829,0.671-1.5,1.5-1.5
			c0.828,0,1.5,0.671,1.5,1.5c0,4.749,3.782,8.469,8.611,8.469h5.055c4.828,0,8.611-3.658,8.611-8.329c0-0.829,0.671-1.5,1.5-1.5
			c0.828,0,1.5,0.671,1.5,1.5C45.985,45.761,40.885,50.737,34.374,50.737z"/>
		<path id="path-5_10_" d="M31.59,63.646C14.171,63.646,0,49.477,0,32.06C0,14.644,14.171,0.475,31.59,0.475
			c17.418,0,31.59,14.169,31.59,31.585C63.18,49.477,49.008,63.646,31.59,63.646z M31.59,3.475C15.825,3.475,3,16.298,3,32.06
			c0,15.763,12.825,28.587,28.59,28.587c15.764,0,28.59-12.824,28.59-28.587C60.18,16.298,47.354,3.475,31.59,3.475z"/>
	</g>
</svg>

This is generated by Adobe Illustrator by the way.
Is this a separate issue?

@JordyLangen Might be more related to #62. I've had a lot of issues with Illustrator-exported SVGs. There is a link to an svgo pull request in #62 that I'm waiting to be submitted to fix these issues (it will allow us to inline the styles directly in the svg/path nodes.

@alexjlockwood Ok, was actually planning on making a PR for this as I've has the issue a couple of times now. Will patiently wait for #62 to be merged then

In the meantime, you could fork that pull request and run svgo on your Adobe Illustrator SVGs yourself. I've been doing that at least... and for the most part it has been cleaning them up great. Not sure what is taking the pull request so long to get merged into master... :/

BTW, the easiest solution to this I think is to just use svgo. There is an option to move parent attrs to the children nodes. I'm using it in ShapeShifter right now. :)


The bug of state category

Why this say its wrong state category?

State categories are defined in common/state_category. Can you please check whether they exist?


custom arguments for doFetch

  <Authorize
    payload={{ grant_type: "password", username, password }}
    {...rest}
  />
);

<Login>{({doFetch}) => (<Form onSubmit={doFetch} />)}</Login>

Would be nice to be able to pass username and password to doFetch somehow.
Im currently working around it by using local state for username and password and toggling lazy.

Hi @andriijas ! In the docs, it describes the usage of doFetch():

doFetch accepts one argument: options. Any of the fetch() options, such as url, method, and body are valid options. You may also specify a new requestKey if you are manually generating your own keys. This method allows you to customize the request from within the component based on the component's state.

Does this support your use case?

Yes and no.  I try to keep my request components in separate files and dirs from UI components and while it works to alter the options such as url or body I think its nice to hide away the fetch api:s for UI components so that they can just pass whatever data they understand and the request component can keep everything related to how body should be formatted, which method should be used and which URL.
Does this make sense? Its not a deal breaker. I enjoy using react-request 🥂

That does make sense. I like that same style of organization. I’ll think a little bit about this...there may be something we can do! Let me know if you have any ideas on what changes could be made to support this.

Im going to try to think of something. I dont have any concrete suggestion yet :/

One idea is as follows:

Create a wrapper component that receives your application-specific information, such as username and password, as props, and transforms that into an HTTP request
Within the wrapper component, create a wrapped version of doFetch that does the same thing

A very quick (and ugly) implementation demonstrating this is as follows:
function FetchWrapper({ children, ...whatevs }) {
  const fetchProps = getFetchProps(whatevs);

  return (
    <Fetch {...fetchProps}>
      ({ doFetch, ...stuff }) => {
        return children({
          ...stuff,
          doFetch(stuff) {
            const arg = getArgFromStuff(stuff);
            return doFetch(arg);
          }
         });
      }
    </Fetch>
  );
}

I'm going to close this out for now, but if this doesn't work, or doesn't seem adequate, feel free to let me know and I'd be happy to reopen this issue. Thanks!


Add two shuffling algos: naive (globally) and py1b (fixed-size blocks).

Description of changes:
py1b is a shuffling algorithm that performs the final shuffle over fixed-size blocks instead of intra-shard like py1s. These units are presumably larger or much larger than single shards, leading to better shuffledness at the cost of having to download more shards to make progress.
naive is a shuffling algorithm that naively shuffles all-to-all. This is useful for single-node training on small data, where you want the most random shuffle possible. Statistically, this algorithm will result in all nodes downloading all shards, with those downloads all happening at the start of the epoch, bringing training to a crawl.
Also update the default shuffle algo from py1s to py1b.
Issue #, if available:

Merge Checklist:
Put an x without space in the boxes that apply. If you are unsure about any checklist, please don't hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General

[ ] I have read the contributor guidelines
[ ] This is a documentation change or typo fix. If so, skip the rest of this checklist.
[ ] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the MosaicML team.
[ ] I have updated any necessary documentation, including README and API docs (if appropriate).

Tests

[ ] I ran pre-commit on my change. (check out the pre-commit section of prerequisites)
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate).
[ ] I ran the tests locally to make sure it pass. (check out testing)
[ ] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes.

If we change the default to py1b, will all the StreamingDataset unit tests (aka for correctness, presence of samples, etc) rerun with py1b ? That would be great if so.

If we change the default to py1b, will all the StreamingDataset unit tests (aka for correctness, presence of samples, etc) rerun with py1b ? That would be great if so.

pytest is happy :)

Based on the offline discussion, James will be creating a follow up PR to address the above two comments

Add a one to two line of brief statement explaining when to use which naive, py1b, py1s, py2s algorithm in the StreamingDataset class documentation.
Add a unit test for each shuffling algorithm (naive, py1b, py1s, py2s) to validate the output sample order with an expected sample order.


browse: hide dotfiles

Hi,
I can't find a way to hide dotfiles (.hidden) in caddy's 8.2 default template. (I just grabbed it out of git and configured the browse directive manually).
I've tried messing with {{if (.Truncate .Name 1) .. to see if it starts with a dot, but I can't figure the syntax and caddy doesn't give any parser/error messages at all except 503.
Please advise. :)

Using
{{if ne ($.Truncate .Name 1) "."}}
	// Is not a hidden file
{{end}}

Works for me.

Thank you very much!