My crate's documentation is not getting built / shown by docs.rs

Crate name
derivenum
Build failure link
https://docs.rs/crate/derivenum/latest
Additional details
My crate's documentation builds as intended on my local machine (running debian 11) and also opens correctly when using cargo doc --open. I've uploaded other crates already, their documentation works correctly.

It appears that cargo accepts either proc-macro or proc_macro despite only documenting proc-macro as a key in https://doc.rust-lang.org/nightly/cargo/reference/cargo-targets.html#configuring-a-target. We have to parse for this to do the build slightly differently for proc-macros and only check for the proc-macro form in
https://github.com/rust-lang/docs.rs/blob/a9d9025f84537aa47d2aedac2862b57d99d4807d/crates/metadata/lib.rs#L349

Thanks for checking this out!
That means it could be a workaround for the package to change proc_macro into proc-macro

Thanks for checking this out!
That means it could be a workaround for the package to change proc_macro into proc-macro

Yeah thanks, I did that and now I'm waiting for docs.rs to show version 0.1.1.

Ok, I got it fixed by changing proc_macro to proc-macro in Cargo.toml under [lib].
Thanks for the help and have a great day!


sound_playfile() fails on windows if 'shell' is powershell

I detected testing a plugin that sound_playfile() was not working.
After some testing I found out that the windows API calls used to test the code were failing.
The windows MCI API receives a command string where the sound file to open is specified. The faulty command was:
    open 'C:\Users\xxxxx\vimfiles\plugin\typewriter.vim\autoload/../sounds/carriage1.wav' alias sound000001
    Error: Specify a device or driver name that is less than 79 characters.

but it works if I do either:
    open C:\Users\xxxxx\vimfiles\plugin\typewriter.vim\autoload/../sounds/carriage1.wav alias sound000001

or:
    open "C:\Users\xxxxx\vimfiles\plugin\typewriter.vim\autoload/../sounds/carriage1.wav" alias sound000001

The second option is preferable to allow whitespaces in the file name.
After some reviewing I found that an update in the shellescape() was to blame. It was updated for powershell where no escaping is necessary if single quotes are used, thus, cmd and powershell differ in escaping.
Nevertheless escaping in this case is unnecessary because the MCI interpreter doesn't rely in the shell.

is the change from mciSendString to mciSendStringA intentionally? It seems this is for ASCII only? Or did I google wrong?

is the change from mciSendString to mciSendStringA intentionally? It seems this is for ASCII only? Or did I google wrong?

UNICODE is not defined in the Vim source code. So, mciSendString and mciSendStringA are exactly the same.

@chrisbra Windows has a funny way of managing UNICODE. In windows NT they decided to migrate all API calls from ANSI to UNICODE so they added a W at the end. For example CreateWindowEx became CreateWindowExW and all the char arguments were promoted to wchar_t.
In order to keep backward compatibility the old functions were renamed appending A at the end. Thus the old CreateWindowEx was renamed as CreateWindowExA. The old A functions translate all arguments to UNICODE (utf-16) and call the new W ones.
Finally they decided to keep the old function names as macros:
#ifdef UNICODE
#    define TCHAR char
#    define CreateWindowEx CreateWindowExW
#else
#    define TCHAR wchar_t
#    define CreateWindowEx CreateWindowExA
#endif

I guess the idea was to be able to get an ANSI or UNICODE program just by introducing the UNICODE define and simplify portability.

okay, thanks


Dependency cycle with recent commit

It looks like a recent commit (a9c6bce94dcb3371a63e92a55744090c213a1e55)  has introduced a circular dependency cycle.
Error: Failed to apply catalog: Found 1 dependency cycle:
(File[/etc/mysql/conf.d] => Class[Mysql::Server::Config] => Package[rsync] => Class[Mysql::Server::Install] => Package[mysql-server] => Class[Mysql::Server::Install] => Class[Mysql::Server::Config] => File[/etc/mysql/conf.d])

which version of puppet-mysql are you using?

I have the same issue
root@puppet:/etc/puppetlabs# /opt/puppetlabs/puppet/bin/puppet module install michaeltchapman-galera Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ... Notice: Downloading from https://forgeapi.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppetlabs/code/environments/production/modules └─┬ michaeltchapman-galera (v0.4.0)   ├── puppetlabs-apt (v2.2.2)   ├── puppetlabs-firewall (v1.8.1)   ├── puppetlabs-mysql (v3.8.0)   ├── puppetlabs-stdlib (v4.12.0)   └── puppetlabs-xinetd (v2.0.0)

@claudekenni try the master branch.

$ git describe
3.6.2-2-g10b873c

I've tested with both cent 7 and trusty 64 using master branch of this module + master branch of the mysql module, and those work for me. You'll need to provide more information about your environment if that does not work for you.

I am find a dependency cycle error too: http://stackoverflow.com/questions/38491667/getting-dependency-cycle-when-using-michaeltchapman-galera

I just tried the master branch and the dependency cycle error is corrected.

@redcricket thanks for checking. I've pushed a new version of this module (0.0.6) to the forge that requires puppetlabs-mysql 3.8.0, so I think forge installs will work now as well.


Add basic Vue Support

Added a new file that allows anyone using VueJS to use the component with little to no effort without any changes to the original library. Only supports basic functionality however.

I will merge these pull requests but will then move your code into a single file called color-picker.vue.html as another sample in the list.


Big cheeze45 cray patch

Both of those changes are necessary as it it handled in step 2 when the bashrc file is created and sent to each segment host.

I'm sorry about that. I was trying to do something else and accidentally and created the pull request in error. Thanks.


Create ID1 submission

baker id: 1087
Name: alevo
Id: 5bbdaa9fd9d3f13d

pending:ID1
account1:Missing-TBC
account2:Missing-TBC
We cannot fully verify this submission. Please assist us in typing out the account addresses for ID1 in full as text in a comment on this PR. Thank you!
@donadel01

Closing as duplicate of https://github.com/Concordium/Testnet3-Challenges/pull/834 which was already confirmed.

Closing as duplicate of https://github.com/Concordium/Testnet3-Challenges/pull/834 which was already confirmed.


Issue with sub dependencies when installing

I trying to install your NPM package but getting this error from one of your sub dependencies:
"undefined ls-remote -h -t<EMAIL_ADDRESS>Running Windows 11, NPM 6.14.14.

I have no idea what's causing the issue tbh.


deis certs:update doesn't exist

See here. There is no code to implement the command.
I'd vote for entirely removing the command, since it presumably was never functional and nobody caught that it was broken yet.

:+1: Given that someone could quite easily deis certs:remove and then deis certs:add, I think it's reasonable to remove.

:+1: sorry! Forgot to remove that in the docs


Need to fix moment when travis-ci run build separately for each ENV variable

[x] Now after adding the second ENV variable, travis-ci creates two independent assemblies (for the first assembly, only the first env variable is set, and this assembly fails, but the second assembly completes successfully, because two variables are set)
[x] Find solution for excluding second build

For adding env variables for each job you need add variables under
env:
   global:
      - ENV_1=value
      - ENV_2=value

if you do not use global section, travis-ci will create as many tasks as you set environment variables


Losing presentation of comments after resolving a conversation

Testing https://github.com/microsoft/vscode/issues/122243
I had the following conversation.

I added yet a comment and resolved the conversation. At this moment the resolved conversation disappeared.  Clicking the black diamond toggled through the conversations. Closing the editor and reopening it I got back into a normal state.
I speculate that this is because I have two conversations on the same line.

Upstream: https://github.com/microsoft/vscode/issues/77155

Upstream issue is fixed.


Provide makefile for visual studio in windows

Please,
Add a Makafile for windows. For MAKE de VisualStudio.
And, if you can, instruction for use.
Thanks in advance.

Hi Jose,
I've created one project to build zopfli for windows. You may visit it.
Gary


Rewrite onedrive_client.js with correct API calls

onedrive_client.js updates need to be fixed with the correct API URLs and calls for OneDrive.

Do you have any time coming up to work on rewriting this app? I would like to help with it.

I already did. I merged the changes to master last night. I'm having an issue with refresh after a copy from one directory to another and also thumbnail previews, otherwise it's working well.

Oh I haven't implemented refresh token yet either for persistent connections, so it unmounts automatically on expiry at the moment. Do you have your own valid API key?

I had an API key before. I haven't really looked at the code in a long time, but I can always set one up again if I need to.

Excellent. An additional permission is needed now for user.read other than that, it should be same as before

Implemented in 7e21d8cb8a6800e1a979ebf096bcc91fbf7e4188

i keep getting a failed to mount object. did I do something wrong?

Did you add the user.read to your ms graph API key?

or maybe i screwed up the build i checked in... hang on...

seems ok - don't forget to add your API secret

Yes. I did

What do you put in redirect url?

message on slack?
https://join.slack.com/t/chromiumdev/shared_invite/enQtMzM3NjYwNjI0MDM4LTk2NjEyYTIxODk1MDYxMmNjNWYzMGMxZGVhMDNhY2I1ZjBhMjdlYTg0MTg4ZGE0OTQ0ZmYwNTRiMGJlYzVjOTE


GD-73: Rewrite GdScriptParser to speedup parsing

Describe What
With Godot4 the parsing slows down and need to rework on the entire script parser.
check also the fix of https://github.com/MikeSchulze/gdUnit3/pull/359
AC

rewrite the parser by using a tokenized tree instead of start paring from scratch for each row.
check if can use the provided method meta data to transform into the GdFunctionDescriptor.

The parsing issue is already solved by introduced the lazy loading of dependencies in of the GdUnitTestSuite class


GH-34381: [Dev] Retrieve committers from arrow-site committers.yml instead of relying on author_association

Rationale for this change
If a committer has their ASF role on GitHub as private the GitHub PR bot author_association is not correctly assigned.
What changes are included in this PR?
This change uses the committers list on the arrow_site repository to retrieve the list of committers.
Are these changes tested?
There is a unit test and have tested the different steps of the workflow individually but haven't tested the full workflow.
Are there any user-facing changes?
No

Closes: #34381

How to confirm whether the change works or not?
Should we merge this into the main for it?

How to confirm whether the change works or not? Should we merge this into the main for it?

I have confirmed the change works on a similar scenario:
I've created an arrow-copy-repo on an organisation. I have created a fork for my user which has a private association with the org and created a PR. The user (raulcd) even though has a private association is now treated as committer, because I am part of the committer list.
Example here: https://github.com/te-chie-la/arrow-pr-workflow-copy/pull/36
As you can see I had to tweak based on the tests as there was something wrong on reading the file but now it has been fully tested.


Alexa says isn't responding. Please check it's network connection and power supply. But device turns on

I had to up to 5.3.1RC1 'cos Alexa wan't discovering any devices.
5.3.1RC1 fixed that.
However I am still getting that "isn't responding. Please check it's network connection and power supply" (though the device turns on/off successfully) at random times and for random devices.  I am running on port 80 in a docker container with the --net=host sw.
I don't understand why things that worked almost perfectly for so many, many  years can have so many, many issues recently.
Ohh well, it was a good run. Amazon probably is silently shutting this down.

Working still on RC1 and there are some things that need to be worked on.

Exactly the same problem here for already some month. Also with 5.3.1RC1.
Was working flawlessly some month before.

+1 Have the same problem

Ok, my problem seems to have gone away. I did not make any changes.
Perhaps could have been an update by Amazon?
I'm using echo shows if that helps.

Same problem here. Only on ON commands. OFF commands no problem. Devices will turn on/off

My problem is solved with this setting in device properties:
On with First Dim (If the device is not on in the ha-bridge state, it will send on instead of the dim.)
On all 'ON' commands set this to 'true'
The 'OFF' where no problem so i didn't change these.

"On with First Dim ..." = "true" did not solve my problem. I turned it back to false.
For me
"No State (Do not update state for device)" = "true"
solved all problems :-)

Same Behavior here since a few weeks
"No State [..]" and "On with First Dom [..]" didn't fixed it here

Is there any update on this? Maybe someone has found another thing that might help? I have scenes I call via habridge in homeassistant, but they always respond back with " isn't responding, please check it's network connection or power supply". But it always works!

I have this often too, always with the same device entry strangely. I've even deleted the device and added it back in, but it always comes back and then, after a few days might disappear for quite some time, and then randomly appear again.
So I've developed a mask algorithm in my brain "Alexa did not just say that"
All humour aside, I would like to know what's causing this.

New HA-Bridge user here.  Awesome project.  I'm experiencing the "isn't responding but works" problem, but only for SOME emulated devices.  Here are my observations.
In all cases, I use HA-Bridge 5.4.1 to send a single HTTP CGI call to PowerHome2, which has a local web server (port 81) on the same Win10 PC as HA-Bridge (port 80).  Device Name and Target Item are the only fields I populate; all others are at default.
The calls launch PH2 macros, most of which just send a single X10 command to load a preset scene in the legacy lighting system (Lightolier Compose).  These typically complete within 2.5 seconds, including sending their completion status back to PH2 which forwards them on to HA-Bridge (green toast in HA-Bridge web interface when using test buttons).  Alexa doesn't complain about these, and the state of the emulated devices is properly updated in the Alexa app for Android, too.
Alexa only gives the "isn't responding" complaint for PH2 macros that contain more than one X10 command (for instance, launching multiple scenes in different rooms).  She issues this complaint while the macro is still in progress (obviously already responding), before it completes normally.  Depending on the macro, these longer sequences can take 5 - 30 seconds to complete before HA-Bridge pops the green toast of success.  On the Android side, the Alexa app may display the true on/off state of the emulated device, or it may report "Device is unresponsive".  In the latter case, tapping on it in the app will clear the message.
Clearly, Alexa is being impatient on the receipt of ack/status from HA-Bridge for the longer macros.  I don't know what her standard timeout period is, or how to override it.  Sure, I could break the macros down into multiple shorter ones and perhaps have HA-Bridge call those sequentially, but that's more work on both the back-end PH2 system and in HA-Bridge.  I'm hoping to bolt HA-Bridge onto PH2 mostly as-is.
I have tried setting Bridge Devices "No State (Do not update state for device)" = True, but this causes Alexa to complain EVERY time, even for the short one-command macros.
I have also tried adjusting Bridge Control "UPNP Send Delay", but with no change in system behavior.
Is there a way to overcome this problem with a better configuration of the existing tools?  Or is it something that might be addressed in a future release of HA-Bridge?

It's all so unclear. and so annoying.
Now trying this a while:

Any update? I keep bumping on this topic because I keep getting this messages from Alexa.

No update?

I worked around the issue on my end by nesting commands to PowerHome.
At the suggestion of the developer of that system, I used a function that takes the original command and submits it to the job execution queue of PH and immediately returns, which completely eliminates any delay of acknowledgement back to Alexa.  Problem solved.

Good for you! Buy how could this help us?

My post on JAN 8, 2024 could help others (as I was helped) by the realization that while while Alexa's very short timeout period is beyond our control and perhaps that of HA-Bridge, a potential solution might be found in optimizing the configuration of the thing that is being controlled.  In my case, that thing was PowerHome2, itself a bridge (master controller) for all other IoT in the home.   By configuring PH2 to respond immediately back to the calling system (HA-Bridge), HA-Bridge was then able to respond quickly back to Alexa, avoiding her impatient back-sass.
So, for others experiencing this issue that don't already have a good home automation management platform, consider adding one.   PH2 has been around for a while, harking from the days before Zigbee, Alexa, and Hue.  But to this day, it's far more capable than most others on the market, and is still very affordable.

That can't be my issue. I have homeassistant. Only some entities have the issue while others dont...

I'm currently using homeseer.
So If I tweak the http calls that should fix it?
Alternatively if homeseer doesn't support that, I could fix it by simply adding some sort of "http proxy" between homeseer and the ha-bridge that will help immediately fire back a response?

I'm currently using homeseer. So If I tweak the http calls that should fix it?
Alternatively if homeseer doesn't support that, I could fix it by simply adding some sort of "http proxy" between homeseer and the ha-bridge that will help immediately fire back a response?

Perhaps.  The key for me was to make sure the success message sent back to HA-Bridge happens very quickly, even though completion of the commands sent from HA-Bridge takes much longer.  Good luck!


Is possible to have a super_tenant?

Hi, my name is Milton Lenis from Colombia, i'm member of CEDESOFT Team and we are working so hard with this tool.
We need to have a kind of "super_tenant" that can run queries (with django models) on all the other tenants, like a big reporter. We are thinking right now on strategies to do it, but i wonder if there is a solution directly with django-tenants.
Thank you for your support, cheers from Colombia.

Right now I think the only way is to parse through all the tenants. I have a function to look through all tenants for users with a specific email that looks like this:
    customer_instances = []
    # go through al instances and look for user
    instances = Customer.objects.all()
    for instance in instances:
        # Log into client schema
        connection.set_tenant(instance)
        ContentType.objects.clear_cache()
        # Lookup Users
        from django.contrib.auth import get_user_model
        User = get_user_model()
        try:
            user = User.objects.get(email=customer_email)
            customer_instances.append({"name": instance.name, "url": instance.schema_name})
        except ObjectDoesNotExist:
            pass

    # once parsed, send out an email, denoting if the user has instances or not
    sendFindEmail(customer_email, customer_instances, "attendy.dev")

Thank you @flxfxp !!
I have a question for you buddy.
what this sentence does?
ContentType.objects.clear_cache()

And what is "ContentType"?

contenttypes  is an application that can track all of the models installed in your Django-powered project, providing a high-level, generic interface for working with your models.
It comes from django.contrib.contenttypes.models, e.g. from django.contrib.contenttypes.models import ContentType
More info:

https://docs.djangoproject.com/en/1.8/ref/contrib/contenttypes/
http://stackoverflow.com/questions/20895429/how-exactly-do-django-content-types-work

If you don't need it, remove it.

@MiltonLn Have you finished with this ticket?

I don't know if there are other ways to achieve it. If there are no other options i'm done with this :)

I would do it in a similar way to @flxfxp

contenttypes is kind of core to Django, I would not remove it unless you are absolutely sure you don't need it.

Ok i think it's done, thank you for your support guys, for me you can close this if you want :)

This is a useful ticket. Thanks to @flxfxp for your answer. This code is a great thing to have in the docs as I was looking how to do trans-tenant iteration.

@bartmika you must to have on count that this strategy is very slow with projects around the 300 tenants, that was my case.

No worries @bartmika. @MiltonLn, that's why I only this for for time-insensitive tasks via a celery worker, such as looking up which instances a user is part of. Let me know if you ever find a better solution :)

If you want faster solution, I would play with postgresql table views on your place. You can construct any view that aggregate any data from all your schemas (or selected ones), and then build django Model accordingly and query this view.

Sure, i have used a postgresql materialized view in the public schema that loops on the tenants ( for reporte purpose) and it works fine, a little annoying the manual update Of the records but it works fine. @flxfxp, please can you describe the work that you are doing with celery? It sounds interesting

I must add that i'm working my materialized view with a Django's Model with Managed=False

Thank you @MiltonLn @flxfxp @kosz85! I appreciate all your comments.


fix the ts import, optimize for creating tsProgram once

Issue: https://github.com/storybookjs/storybook/pull/20359

@joshwooding It'd be awesome if we could get this merged/released today 🙏 Sorry for making this more difficult than it needed to be.


chore: create CODEOWNERS

see title

Codecov Report
Patch and project coverage have no change.

Comparison is base (bf90db3) 85.38% compared to head (8077001) 85.38%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #141   +/-   ##
=======================================
  Coverage   85.38%   85.38%
=======================================
  Files          12       12
  Lines         431      431
=======================================
  Hits          368      368
  Misses         63       63

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

Btw @anand2312 would you be open to taking the lead on this repo?

@J0 I'd be happy to 😄


Stuck at "Continuing with the automation process..."

Hello,
Great article on medium and thanks for the work with the script.
I am not familiar with the Selenium stuff, but I tried to execute the sample code you have provided and am getting stuck at  "Continuing with the automation process..."
My chrome browser opens normally and I am logged in.
This is my full log;
You need to manually complete the log-in or the human verification if required.
Enter 'y' if you have completed the log-in or the human verification, or 'n' to check again: y
Continuing with the automation process...

Please help!

Ok, running powershell as admin apparently solved the issue.


User changes their email and/or password

User needs to be able to change their password and email.
This likely lives on the user's settings page.

superseded by #72, #66, and #62


feat: Greetings.yml added

closes #33

@praptisharma28 you will have to install pre-commit pip install pre-commit and pre-commit install and then run pre-commit on all files to fix the error. pre-commit run --all-files

Added precomit in the environment variables , still its not recognised ? @tushar5526

https://pre-commit.com/ - Setup this

done @tushar5526

ok done @tushar5526 , dev already have a version of pre-commit. removed from requirements.txt . You can check now.

@tushar5526 do I need to do anything more?


Portainer docker image won't start after upgrade

Bug description
After upgrading portainer docker image will not start
Expected behavior
Docker image should start as normal
Portainer Logs

2023/02/07 02:30PM INF github.com/portainer/portainer/api/cmd/portainer/main.go:534 > encryption key file not present | filename=portainer
2023/02/07 02:30PM INF github.com/portainer/portainer/api/cmd/portainer/main.go:553 > proceeding without encryption key |
2023/02/07 02:30PM INF github.com/portainer/portainer/api/database/boltdb/db.go:124 > loading PortainerDB | filename=portainer.db
2023/02/07 14:30:23 server: Reverse tunnelling enabled
2023/02/07 14:30:23 server: Fingerprint e5:24:c8:71:8c:be:8c:c1:51:82:6c:cf:52:18:c1:02
2023/02/07 14:30:23 server: Listening on <IP_ADDRESS>:8000...
2023/02/07 02:30PM FTL github.com/portainer/portainer/api/cmd/portainer/main.go:730 > failed initializing upgrade service | error="failed to determine container platform: failed to retrieve docker info: Error response from daemon: client version 1.41 is too new. Maximum supported API version is 1.40" stack_trace=[{"func":"NewService","line":"55","source":"upgrade.go"},{"func":"buildServer","line":"728","source":"main.go"},{"func":"main","line":"801","source":"main.go"},{"func":"main","line":"250","source":"proc.go"},{"func":"goexit","line":"831","source":"asm_arm.s"}]

Technical details:

Portainer version: latest
Docker version (managed by Portainer):

-Client: Docker Engine - Community
Version:           19.03.15
API version:       1.40
Go version:        go1.13.15
Git commit:        99e3ed8919
Built:             Sat Jan 30 03:18:42 2021
OS/Arch:           linux/arm
Experimental:      false
Server: Docker Engine - Community
Engine:
Version:          19.03.15
API version:      1.40 (minimum version 1.12)
Go version:       go1.13.15
Git commit:       99e3ed8919
Built:            Sat Jan 30 03:16:47 2021
OS/Arch:          linux/arm
Experimental:     false
containerd:
Version:          1.4.3
GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version:          1.0.0-rc92
GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version:          0.18.0
GitCommit:        fec3683

Platform (windows/linux): linux rpi4
Command used to start Portainer:

portainer:
container_name: portainer
restart: always
ports:
- '9000:9000'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- 'portainer_data:/data'
image: 'portainer/portainer-ce'

I also add to the problem as I have the same problem after downloading the new image and recreating the container and started after a while it restarts and so it stays. I think the problem is similar for #8454

Related:  https://github.com/portainer/portainer/issues/8455
Thanks!


When press upload image from gallery app diaplay background grey

I add permission gallery to make action when open gallery but after select image from gallery app display grey background

I was search but still same problem when select upload image display background grey , what can i do


AddTimeFeatures Transformer only works with certain days in start timestamp

Description
Obligatory "I could not find this problem among the issues, sorry if it has been presented already."
While looking at the DeepVAREstimator source code, in particular the create_transformation method's AddTimeFeatures transformer, it appears that the code may fail under certain circumstances.
The failure will occur in the map_transform method of the transformer in the following code i0 = self._date_index[start]
I believe this is because the start key may not be present when self._date_index is created which uses
self.full_date_range = pd.date_range(
            self._min_time_point, self._max_time_point, freq=start.freq
        )

To Reproduce
Using a timestamp of July 1 2021 yields the following code and error which happens because this date does not exist in the result of pd.date_range().
import numpy as np
import pandas as pd
import gluonts
import mxnet

from gluonts.transform import AddTimeFeatures

from gluonts.time_feature import WeekOfYear

data = {'target': np.array([1, 2, 3, 4, 5, 6, 7, 8]), 'start': pd.Timestamp(year=2021, month=7, day=1, freq='M')}

transformer = AddTimeFeatures(target_field='target',
                              start_field='start',
                              output_field='out',
                              pred_length=4,
                              time_features=[WeekOfYear()])

transformer.map_transform(data=data, is_train=True)

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
pandas\_libs\index.pyx in pandas._libs.index.DatetimeEngine.get_loc()

pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()

pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()

KeyError:<PHONE_NUMBER>000000000

During handling of the above exception, another exception occurred:

KeyError                                  Traceback (most recent call last)
~\Documents\Projects\XRR\Forecasting\.mxnet\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance)
   3079             try:
-> 3080                 return self._engine.get_loc(casted_key)
   3081             except KeyError as err:

pandas\_libs\index.pyx in pandas._libs.index.DatetimeEngine.get_loc()

pandas\_libs\index.pyx in pandas._libs.index.DatetimeEngine.get_loc()

KeyError: Timestamp('2021-07-01 00:00:00', freq='M')

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

KeyError                                  Traceback (most recent call last)
~\Documents\Projects\XRR\Forecasting\.mxnet\lib\site-packages\pandas\core\indexes\datetimes.py in get_loc(self, key, method, tolerance)
    685         try:
--> 686             return Index.get_loc(self, key, method, tolerance)
    687         except KeyError as err:

~\Documents\Projects\XRR\Forecasting\.mxnet\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance)
   3081             except KeyError as err:
-> 3082                 raise KeyError(key) from err
   3083

KeyError: Timestamp('2021-07-01 00:00:00', freq='M')

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

KeyError                                  Traceback (most recent call last)
<ipython-input-12-2d05f591d130> in <module>
     16                               time_features=[WeekOfYear()])
     17
---> 18 transformer.map_transform(data=data, is_train=True)

~\Documents\Projects\XRR\Forecasting\.mxnet\lib\site-packages\gluonts\transform\feature.py in map_transform(self, data, is_train)
    370         )
    371         self._update_cache(start, length)
--> 372         i0 = self._date_index[start]
    373         features = (
    374             self._full_range_date_features[..., i0 : i0 + length]

~\Documents\Projects\XRR\Forecasting\.mxnet\lib\site-packages\pandas\core\series.py in __getitem__(self, key)
    851
    852         elif key_is_scalar:
--> 853             return self._get_value(key)
    854
    855         if is_hashable(key):

~\Documents\Projects\XRR\Forecasting\.mxnet\lib\site-packages\pandas\core\series.py in _get_value(self, label, takeable)
    959
    960         # Similar to Index.get_value, but we do not fall back to positional
--> 961         loc = self.index.get_loc(label)
    962         return self.index._get_values_for_loc(self, loc, label)
    963

~\Documents\Projects\XRR\Forecasting\.mxnet\lib\site-packages\pandas\core\indexes\datetimes.py in get_loc(self, key, method, tolerance)
    686             return Index.get_loc(self, key, method, tolerance)
    687         except KeyError as err:
--> 688             raise KeyError(orig_key) from err
    689
    690     def _maybe_cast_for_get_loc(self, key) -> Timestamp:

KeyError: Timestamp('2021-07-01 00:00:00', freq='M')

However, changing the timestamp to July 31 2021 which will be a member of self.full_date_range yields no error.
data = {'target': np.array([1, 2, 3, 4, 5, 6, 7, 8]), 'start': pd.Timestamp(year=2021, month=7, day=31, freq='M')}

transformer = AddTimeFeatures(target_field='target',
                              start_field='start',
                              output_field='out',
                              pred_length=4,
                              time_features=[WeekOfYear()])

transformer.map_transform(data=data, is_train=True)

{'target': array([1, 2, 3, 4, 5, 6, 7, 8]),
 'start': Timestamp('2021-07-31 00:00:00', freq='M'),
 'out': array([[ 0.05769231,  0.15384616,  0.23076923,  0.30769232,  0.40384614,
          0.48076922, -0.42307693, -0.34615386]], dtype=float32)}

Exact dates are not important for me, so I can certainly shift them to the end of the month as a workaround.
Environment

Operating system: Windows 10
Python version: 3.8.5
GluonTS version: 0.7.0
MXNet version: 1.7.0

Upon review I will close this issue because pd.date_range depends on the frequency of the start timestamp, and by using 'M' I am using month-end as a period. All the same, my dates will have to be adjusted to accommodate this.


Add git hooks for branch name validation

Which issue this PR addresses:

Fixes ARO-6316 - moved from #3477
What this PR does / why we need it:

See ARO Branching Strategy.
Test plan for issue:

Local git - attempted to use "bad" branch names and ensured they failed to create commits locally. git branch --move some-bad-name some-good-name works and passes the pre-commit hooks.
Is there any documentation that needs to be updated for this PR?

Yes, included in this PR. I will send notifications to all SREs both in slack and email of this change.
How do you know this will function as expected in production?

Local dev changes, not deployed to prod.

cc @cadenmarchese @kimorris27 @mociarain thank you for your review of the old PR, I had to close it in favor of this one, and I hope I addressed all the feedback left in subsequent changes. LMK what you think.


直接使用 python -m tf_euler , 参数设置如下：--data_dir=hdfs://${Master_IP}:9000/data/ppi --euler_zk_addr=${IP}:2181 --model_dir=/data/euler/workspace/ckpt --euler_zk_path=/euler --max_id=56944 --feature_idx=1 --feature_dim=50 --label_idx=0 --label_dim=121 --model=graphsage_supervised --mode=train
集群有10台机器，1个ps， 9个worker

@xiongzhiyuan 麻烦供尽量具体的运行设置。

2019-08-15 10:47:08.241564: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:222] Initialize GrpcChannelCache for job ps -> {0 -> <IP_ADDRESS>:50041}
2019-08-15 10:47:08.241587: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:222] Initialize GrpcChannelCache for job worker -> {0 -> localhost:50051, 1 -> <IP_ADDRESS>:50052, 2 -> <IP_ADDRESS>:50053, 3 -> <IP_ADDRESS>:50054, 4 -> <IP_ADDRESS>:50059}
2019-08-15 10:47:08.243354: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:381] Started server with target: grpc://localhost:50051
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0815 10:47:08.243984 19944 remote_graph.cc:91] Initialize RemoteGraph, connect to server monitor: [<IP_ADDRESS>:2181, /euler]
19/08/15 10:47:09 WARN hdfs.DFSClient: zero
19/08/15 10:47:09 WARN hdfs.DFSClient: zero
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0815 10:47:10.578593 20148 graph_builder.cc:81] Load Done: hdfs://<IP_ADDRESS>:9000/data/ppi/ppi_0.dat
I0815 10:47:10.656450 20149 graph_builder.cc:81] Load Done: hdfs://<IP_ADDRESS>:9000/data/ppi/ppi_5.dat
I0815 10:47:10.656769 20075 graph_builder.cc:127] Each Thread Load Finish! Node Count:11389 Edge Count:321612
I0815 10:47:10.656800 20075 graph_builder.cc:135] Graph Loading Finish!
I0815 10:47:10.740737 20075 graph_builder.cc:147] Graph Load Finish! Node Count:11389 Edge Count:321612
I0815 10:47:10.742431 20075 graph_builder.cc:152] Done: build node sampler
I0815 10:47:10.742439 20075 graph_builder.cc:162] Graph build finish
I0815 10:47:10.742456 20075 graph_service.cc:179] service init finish
I0815 10:47:10.743077 20075 graph_service.cc:131] bound port: <IP_ADDRESS>:46864
W0815 10:47:10.807864 20075 graph.h:198] global sampler is not ok
I0815 10:47:10.839809 20075 graph_service.cc:146] service start
I0815 10:47:10.840103 20079 zk_server_monitor.cc:238] Online node: 0#<IP_ADDRESS>:46864.
I0815 10:47:10.840404 19944 remote_graph.cc:106] Retrieve meta info success, shard number: 5
I0815 10:47:10.840423 19944 remote_graph.cc:119] Retrieve meta info success, partition number: 10
I0815 10:47:10.840443 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 0, Key: node_sum_weight, Meta Info: 8982.000000,1302.000000,1105.000000
I0815 10:47:10.840449 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 0, Key: edge_sum_weight, Meta Info:
I0815 10:47:11.832319 20079 zk_server_monitor.cc:238] Online node: 1#<IP_ADDRESS>:48866.
I0815 10:47:11.832593 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 1, Key: node_sum_weight, Meta Info: 8981.000000,1303.000000,1105.000000
I0815 10:47:11.832608 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 1, Key: edge_sum_weight, Meta Info:
I0815 10:47:12.900909 20079 zk_server_monitor.cc:238] Online node: 2#<IP_ADDRESS>:45655.
I0815 10:47:12.901175 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 2, Key: node_sum_weight, Meta Info: 8981.000000,1303.000000,1105.000000
I0815 10:47:12.901188 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 2, Key: edge_sum_weight, Meta Info:
I0815 10:47:13.592968 20079 zk_server_monitor.cc:238] Online node: 3#<IP_ADDRESS>:45873.
I0815 10:47:13.593232 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 3, Key: node_sum_weight, Meta Info: 8981.000000,1303.000000,1105.000000
I0815 10:47:13.593243 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 3, Key: edge_sum_weight, Meta Info:
I0815 10:47:15.404219 20079 zk_server_monitor.cc:238] Online node: 4#<IP_ADDRESS>:48724.
I0815 10:47:15.404502 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 4, Key: node_sum_weight, Meta Info: 8981.000000,1303.000000,1104.000000
I0815 10:47:15.404518 19944 remote_graph.cc:190] Retrieve Shard Meta Info successfully, shard: 4, Key: edge_sum_weight, Meta Info:
flags_obj.fanouts is:  [10, 10]
fanouts is:  [10, 10]
metapath is:  [[0], [0]]
WARNING:tensorflow:use_feature is deprecated and would not have any effect.
WARNING:tensorflow:From /root/anaconda2/lib/python2.7/site-packages/euler_gl-0.1.2-py2.7.egg/tf_euler/python/base_layers.py:78: init (from tensorflow.python.ops.init_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.initializers.variance_scaling instead with distribution=uniform to get equivalent behavior.
INFO:tensorflow:Create CheckpointSaverHook.
INFO:tensorflow:Graph was finalized.
2019-08-15 10:47:16.214021: I tensorflow/core/distributed_runtime/master_session.cc:1161] Start master session e34bec10e80a54c0 with config: gpu_options { allow_growth: true }
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
INFO:tensorflow:Saving checkpoints for 0 into /data/euler/workspace/ckpt/model.ckpt.


Cannot Install libcairo2 During Build Of Nixpack

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
The following is the content of my nixpacks.toml file as I am building a django project that makes use of cairocffi.
[phases.release]
aptPkgs = ["...", "libcairo2-dev"]

No matter where the command to install packages is placed i.e. [phases.setup] or [phases.install] or [phases.release], I still get the error that:
OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory

during python manage.py migrate at phases.release]
I encountered an error during the python manage.py migrate section because the save method of one of my models depends on a function that calls cairocffi somewhere down the call stack.
In the reproduction section, you wouldn't have to go through creating models to execute in import call for cairocffi
To reproduce

Install django via the command python -m pip install Django
Create a django project and create a nixpacks.toml file on the project root.
Populate the content of nixpacks.toml with the file content (below these bullet points).
Create a python module (let's call this recreate.py) which should contain only one line inside there import cairocffi.
Add requirements.txt to project root.
Populate requirements.txt via the terminal command `python -m pip freeze > requirements.txt
Append gunicorn on a new line just below the last line in the requirements.txt file
Build the project using the command sudo nixpacks build . --name recreate-app
After successful build ,run the command: sudo docker run -it recreate-app bash
Execute the command python recreate.py and get the OSError raised.

Provide the following in your nixpacks.toml file
[phases.setup]
aptPkgs = ["...", "libcairo2"]

This is the exception raised:
OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory

Expected behavior
After install phase, a build phase is expected to run which it does.
The build phase executes the command:
python manage.py migrate

A start phase executes after the release phase and build should be successful.
Environment
OS: 'Ubuntu 22.04.1LTS'
Python Version: 'python-3.10'
Nixpacks Version: '1.1.1'

Try putting this in phases.setup, instead of using APT:
[phases.setup]
nixPkgs = ['...', 'cairo']
nixLibs = ['...', 'cairo']


With the last update of epel-release-7 baseurl is not used any more

With the last package update, base url was replaced by metalink.
[epel-testing]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/testing/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

But the module will use the old baseurl.

Fixed in v.1.3.0


reactive dropdown props update

The issue about the missing properties is related to the version of Flutter. In recent versions of Flutter, the dropdown has included new properties that are not included in Reactive Forms because of the version of Flutter, we cannot just add the new properties. We need to upgrade the minimum version of Flutter that Reactive Forms depends on.

First, we need to identify in what version of Flutter these new properties were included. And release a version of Reactive Forms that set this version as a minimum Flutter SDK version.
That is why this Pipeline is failing because is running the test with a version of Flutter that does not include all these properties.

BTW @vasilich6107,
Great Job once again. Thanks to your dedication and for supporting me, even in all these past months that I have been so busy. Thanks again for all your contribution.
:smiley: :clap: :tada: :rocket:

No problem @joanpablo

This is included in v11.0.0


rename org boem-esp to MarineSensitivities

Renamed and created default website repository MarineSensitivities.github.io.


feat: CRL implementation

Codecov Report

Merging #23 (c24057f) into main (7fd6cc9) will decrease coverage by 0.61%.
The diff coverage is 88.23%.

@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
- Coverage   93.65%   93.04%   -0.62%
==========================================
  Files           6        8       +2
  Lines         268      302      +34
==========================================
+ Hits          251      281      +30
- Misses         17       21       +4

Impacted Files
Coverage Δ

verificac19/service/_crl.py
55.55% <55.55%> (ø)

verificac19/service/_mongo_crl.py
100.00% <100.00%> (ø)

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 7fd6cc9...c24057f. Read the comment docs.


Pre-emptively halt requests to not encounter global ratelimit

From my understanding from our discussion in Discord, global ratelimits are not handled by the http module's ratelimiting function. more than the global ratelimit bucket's worth of requests may be sent at once, due to not being able to know the size and reset rate of the ratelimit bucket.
Discord assigns everyone a global cap of 50 requests per second, which can be increased after the requirements for large sharding are met or under exceptional circumstances, so it would be safe to impose a default limit of 50, unless the user provides their own limit to override with.
*EDIT: corrected first statement. Additionally, this means we will be hard-coding information that Discord does not provide, so we need to consider if this is something we want to do or, at the least, provide some sort of "cap" on in-flight requests.

There is an invalid request limit of 10,000/10 minutes that will ban you for an hour when you reach it. Maybe twilight should stop sending requests after e.g. 99_999 invalid requests to prevent getting globally rate limited for one hour too.

Wouldn't hard-coding, even an over-writable, value would go against Discord's recommendations of using dynamic ratelimits? The cloudflare limit is however a sound exception

I think hardcoding but allowing to override the global rate limit is fine since it's explicitly documented at https://discord.com/developers/docs/topics/rate-limits#global-rate-limit
Cloudflare ones could be nice if we ensure it excludes the shared rate limits


To do setup

Branch Changes

Used React Components, State, Props

Hi Shinn!
♻ Changes Required
To Highlight 🔢
✔ No linter error.
✔ Descriptive readme file.
✔ Well implemented requirements.
Good job with your work so far.


Cloudflare 522: Connection Timed Out on circuitverse.org

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
There seems to be a persistent issue with accessing circuitverse.org. When trying to access the site, the page displays a Cloudflare error with code 522, indicating that Cloudflare was able to reach the server but the server did not respond in time.
Steps To Reproduce

Go to https://circuitverse.org
Wait for the page to load
See the error message "Connection Timed Out, Error 522"

Expected Behavior
The CircuitVerse website should load without any issues.
Screenshots

Device Information [optional]
- OS:24.04.1 LTS (Noble Numbat)
- Browser: CHROME
- version: 129.0.6668.70 (Official Build) (64-bit)

Additional context
The issue has been persistent for a while. It may be worth investigating the server's resource allocation or any potential server-side problems causing the timeout.
I also tried using a mobile device to access the website, same error.
Are you working on this issue?
No

@tachyons @tanmoysrt
I thought it wouldn't hurt to notify...

Hi @salmoneatenbybear
Circuitverse was down. It's up now.
Anyone there is a  page to track uptime status https://uptime.circuitverse.org/

This was due to server resource constraints and we had to restart our server.


public class TEALProgram

The Swift-Algorand-Sdk have a bug when running Algorand Virtual Machine (AVM) 0.9 - TEAL 4.
#pragma version 4
Debug:
Optional("P7GEWDXXW5IONRW6XRIRVPJCT2XXEQGOBGG65VJPBUOYZEJCBZWTPHS3VQ")
Optional("BIEB")
nil
clearStateProgram: nil
#pragma version 2
Debug:
Optional("YOE6C22GHCTKAN3HU4SE5PGIPN5UKXAJTXCQUPJ3KKF5HOAH646MKKCPDA")
Optional("AiABASI=")
Optional(swift_algorand_sdk.TEALProgram)
clearStateProgram: Optional(swift_algorand_sdk.TEALProgram)

Ok, thanks for spotting this @3dlifee, I'll look into it

So this issue has been resolved, all you need to do is make sure you are connected to the main branch, also if you are using the swift-algorand-sdk-ios showcase, don't forget to change the addresses used in the stateful_approval_init.teal.txt file and stateful_approval_refact.teal.txt file to the address you'll love to use to create the Application.
Let me know if you have any other issues. Thanks for raising this
Happy coding


chore: All pedersen compress_native methods now return a grumpkin::fq

Depends on #2955
Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

[ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
[ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
[ ] Every change is related to the PR description.
[ ] I have linked this pull request to relevant issues (if any exist).

This is not blocked by #2592 and should go in after it has been merged

Closing as this has now been included in the mega PR


GitHub: Setup new jobs for pull requests

Instead of building all the platforms at once for pull requests, build them as separate jobs. This should resolve timeout problems.

@crazy-max I was unable to test my changes in #291 due to GitHub Actions time-outs. So I made you a brand new workflow for GitHub pull requests. I'm confident I can cut down the run time on all the ARM instances by 10 minutes using cmake to build  curl and c-ares. I will accomplish that by resubmitting the changes in #291, once this pull request is reviewed and merged.

Sorry about all that building. When I separated the tasks and silenced warnings, I saw the rTorrent software stack was not building with the intended flags. Everything is fixed now. We have 5m feedback for x86 and 40m feedback for ARM.
The build procuress for ARM has also been significantly optimized to cut down on time. There is less verbose and c-ares + curl is built with a much more efficient cmake process.
These changes will may it much easier to develop the docker container. Everything is working fast and flawlessly now.


[Bug Report] v-loading on el-table(with border) causing el-table border display issue

Element UI version
2.2.2
OS/Browsers version
Windows 10/ Chrome 65.0.3325.162(32bits)
Vue version
2.5.16
Reproduction Link
https://jsfiddle.net/h7kv5tap/7/
Steps to reproduce
just pay attention to the border-top and border-left lines(in red color for more clear) while el-table loading
What is Expected?
border-top and border-left of el-table do not disappear when loading
What is actually happening?
border-top and border-left of el-table will disappear when loading and show again after loading, thus will causing the table shaking in vision

Use styles:
.el-table--border,
.el-table--border td,
.el-table--border th,
.el-table th.is-leaf {
  border-color: #f50003;
}

.el-table::before,
.el-table::after {
  background-color: #f50003;
}


Feedback

To satisfy your expectation, I kindly ask for your feedback. Is the scope of features okay for you? Anything missing? Any suggestions to improve this framework? Please let me know! :-)

For any feedback, bug or feature request, feel free to open new ticket - thank you!


fix discord link :(

Descripe
The discord link is broken :(
Steps to reproduce

Press on discord link
cry because it didnt work :(

Multiplayer?
No
Version
1.18.2-0.7.14b (Latest 1.18)
Minecraft, Forge and maybe other related mods versions
discord :(
Screenshots or Videos
No response
Crashlog/log
No response

this exact link is broken https://discord.srendi.de/

oh
Give me a minute


Safe and pragmatic way to use API key

I am concerned about setting my openai API key as global env. WIl other packages be able to use it without my confirmation?
I like how llm manages it with "llm keys set openai". It would be great to have here the same.

WIl other packages be able to use it without my confirmation?

They could do this with llm as well since the key is just stored in plain text json file on disk.  You could wrap llm and ospeak with an alias that also pulls in the API key from a password manager if you're that concerned. Here's an example of how this can work with 1password
Having said all that...

It would be great to have here the same.

Agreed.  Here's where llm implements the keys command: https://github.com/simonw/llm/blob/main/llm/cli.py#L470.  I've not got any spare time to fork and add but it shouldn't be that difficult for somebody with a spare hour or two.

Yeah I'm not a huge fan of the environment variable thing either.
I'd like to make this double as an LLM plugin - if you install both this and LLM in the same environment you could run llm ospeak - at which point it would make sense for it to
optionally use the LLM API key as well.
This tool uses a different incompatible version of the OpenAI Python library though so I'd need to fix that first:

https://github.com/simonw/llm/issues/325

With something like 1password-cli, there is a simple workaround for interactive shells: making a function wrapper.
ospeak() { OPENAI_API_KEY="$(op read 'op://Personal/OpenAI API Key/credential')" command ospeak "$@" }

Explanation: the op command (1password-cli) reads the 'credential' key from the item named "OpenAI API Key" in my Personal vault.


Garfanzo panics a lot.

Soooooo I don't know how to write a CLI.
Friendly reminder to me (once you've got the Serde stuff figured out with the WindowContent enum and have documented a bit more) to FIX ALL THESE DAMN PANICS.

#47 might help with this.

Closed. Not really important anymore.


NormalizedLandmarkList.Landmark is wrong!

I have downloaded your latest master branch to test your BlazePose example for one of the projects I'm conducting. I got to run the console app successfully. then I have saved the "Landmark" from 200 frames in a file. The data in the first 5-10 frames are correct the rest of the data is being copied again and again. I managed to save the returning ImageFrame objects from Calculator.Send(..) as Jpg using ImageSharp - 200 images were saved - the images are changing (correctly masked my body) while the skeleton is not changing after 5-10 images.
I ran the same test for multiple camera positions, different movements, body poses and even clothes. each single time the same exact scenario mentioned.

You seem to pinpoint a MediaPipe solution problem.
As the MediaPipe Pose docs say:

The solution utilizes a two-step detector-tracker ML pipeline, proven to be effective in our MediaPipe Hands and MediaPipe Face Mesh solutions. Using a detector, the pipeline first locates the person/pose region-of-interest (ROI) within the frame. The tracker subsequently predicts the pose landmarks and segmentation mask within the ROI using the ROI-cropped frame as input. Note that for video use cases the detector is invoked only as needed, i.e., for the very first frame and when the tracker could no longer identify body pose presence in the previous frame. For other frames the pipeline simply derives the ROI from the previous frame’s pose landmarks.

I think we have to forward an issue to MediaPipe. If I understood this explanation correctly, the problem you're facing is a direct result of their implementation, which is not really valid for our use-case.

Actually, maybe we just have to look into the side packets.
I'll look into it.
https://google.github.io/mediapipe/solutions/pose#mediapipe-pose

I am familiar with MediaPipe using Python. My issue thou is not a MediaPipe bug. I have used the same MediaPipe version that MediaPipe.Net is running natively within the wrapper but the results are different. I wanted also to mention that I am not talking about detection errors, I understand this is on MediaPipe models.

I see.
What arguments did you use for the Python example?

This bug is not actionable unless you provide a test case. Please provide a reproducible test case in Python and then in .NET so we can verify what's wrong.

I used CVZone V1.5.5 with MediaPipe <IP_ADDRESS> for pose detection  with findPose(..) and findPosition(..) sending the image parameter ... OpenCV to load Images and videos.
In Python:

load any video you have using OpenCV
while loop on video frames to get images send it findPosition(..) out of CVZone
append a file with the resulting landmarks

In .Net (for ease of testing)

Loaded the same video using FFmediaToolKit
looped over the video frames -> converting each frame into ImageFrame
Then sending it to the Calculator
I handled each LandmarkList using Calculator.OnResult Event

I understand that the results from MediaPipe.Net is already normalized (maybe the problem is here I don't know yet). I'm comparing value change from the mean for each of the X, Y, Z elements for each joint. and I found that the change in python is way bigger than the change within .Net

I used CVZone V1.5.5 with MediaPipe <IP_ADDRESS> for pose detection  with findPose(..) and findPosition(..) sending the image parameter ... OpenCV to load Images and videos.
In Python:

load any video you have using OpenCV
while loop on video frames to get images send it findPosition(..) out of CVZone
append a file with the resulting landmarks

In .Net (for ease of testing)

Loaded the same video using FFmediaToolKit
looped over the video frames -> converting each frame into ImageFrame
Then sending it to the Calculator
I handled each LandmarkList using Calculator.OnResult Event

I understand that the results from MediaPipe.Net is already normalized (maybe the problem is here I don't know yet). I'm comparing value change from the mean for each of the X, Y, Z elements for each joint. and I found that the change in python is way bigger than the change within .Net

Thanks for the response, we'll check what's wrong, I don't think our SidePacket implementation is to blame here considering our test cases hasn't showed this deficiency.

It appears that the Python bindings directly use the pose_landmark graph as opposed to the pose_tracking graph that we use on the C# side. It might very well be the core of the implementation difference. However, up until now we have never needed to specify side packets, so it might take a while to fix depending on what we have to modify.

Going to put this on Backlog for now as we don't have the capacity to fix this properly until Q4.

I think that I replicated issue, but if I run my input in low enough resolution it looks like that, landmarks are only awfully slow to folow my movements

I have came back to this issue and tested more. The initialization of PoseCpuSolution calculator was using modelComplexity of 2 new PoseCpuSolution(modelComplexity: 2, smoothLandmarks: false);
which was extremally slow.  I used the existing code of Mediapipe.Net.Exmaples.Pose project. I have changed the initialization of the calculator to use modelComplexity of 1 and everything worked well.
Thanks, I'm going to close this issue.


fix: import date-fns properly

Description :sparkles:
Just noticed some bad import practice with date-fns and thought I'd make a change. There's still date-fns dependency in HDS that imports the whole lib, thus having two versions of date-fns in the bundle.

API branch is deployed to platta: https://tet-pr2878.api.dev.hel.ninja/healthz :rocket::rocket::rocket:

API branch is deployed to platta: https://kesaseteli-pr2878.api.dev.hel.ninja/healthz :rocket::rocket::rocket:

EMPLOYER branch is deployed to platta: https://kesaseteli-employer-pr2878.dev.hel.ninja :rocket::rocket::rocket:

ADMIN branch is deployed to platta: https://tet-admin-ui-pr2878.dev.hel.ninja :rocket::rocket::rocket:

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2878.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://tet-admin-ui-pr2878.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://kesaseteli-employer-pr2878.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://helsinkilisa-ui-pr2878.dev.hel.ninja :laughing::tada::tada::tada:

HANDLER branch is deployed to platta: https://kesaseteli-handler-pr2878.dev.hel.ninja :rocket::rocket::rocket:

YOUTH branch is deployed to platta: https://tet-youth-ui-pr2878.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://helsinkilisa-ui-handler-pr2878.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://tet-youth-ui-pr2878.dev.hel.ninja :laughing::tada::tada::tada:

YOUTH branch is deployed to platta: https://kesaseteli-youth-pr2878.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://kesaseteli-youth-pr2878.dev.hel.ninja :laughing::tada::tada::tada:


bump data protocol

The previous version didn't have the correct compiled files

Theres no actual code changes here just a vbump so I'm going to merge this.


Sync reader with Seek+Read implementation

A first attempt implementing a sync API with Seek+Read support.
To have a similar API I've also changed the get_range API. What do you think @michaelkirk?
Module doc examples:
// Async API (without feature `sync`):
let mut client = BufferedHttpRangeClient::new("https://flatgeobuf.org/test/data/countries.fgb");
let bytes = client.min_req_size(256).get_range(0, 3).await?;
assert_eq!(bytes, "fgb".as_bytes());
let version = client.get_bytes(1).await?; // From buffer - no HTTP request!
assert_eq!(version, &[3]);

// Blocking API (with feature `sync`):
let mut client = BufferedHttpRangeClient::new("https://flatgeobuf.org/test/data/countries.fgb");
let bytes = client.min_req_size(256).get_range(0, 3)?;
assert_eq!(bytes, "fgb".as_bytes());
let version = client.get_bytes(1)?; // From buffer - no HTTP request!
assert_eq!(version, &[3]);

// Seek+Read API (with feature `sync`):
use std::io::{Read, Seek, SeekFrom};
let mut client = BufferedHttpRangeClient::new("https://flatgeobuf.org/test/data/countries.fgb");
client.seek(SeekFrom::Start(3)).ok();
let mut version = [0; 1];
client.min_req_size(256).read_exact(&mut version)?;
assert_eq!(&version, &[3]);
let mut bytes = [0; 3];
client.read_exact(&mut bytes)?;
assert_eq!(&bytes, b"fgb");

This seems reasonable. Are these in pursuit of some changes you're hoping to make to the FGB client? Or some other project?
I can understand why Seek might be useful, and I can understand why someone might prefer a sync client, but are they necessarily dependendent on eachother? e.g.  Is there a reason that Seek isn't supported for the async context?
// Seek+Read API (with feature `sync`):
use std::io::{Read, Seek, SeekFrom};
let mut client = BufferedHttpRangeClient::new("https://flatgeobuf.org/test/data/countries.fgb");
client.seek(SeekFrom::Start(3)).ok();
let mut version = [0; 1];
client.min_req_size(256).read_exact(&mut version)?;
assert_eq!(&version, &[3]);
let mut bytes = [0; 3];
client.read_exact(&mut bytes)?;
+ // This confused me for a minute! 😆
+ // The "fgb" we're reading here is not MAGIC_BYTES[0..3], but rather MAGIC_BYTES[5..7] (right?)
+ // I forgot that "fgb" was in the MAGIC_BYTES twice!
assert_eq!(&bytes, b"fgb");

Implementing Seek+Read makes it a drop-in replacement for local files in most libraries. AsyncSeek+AsyncRead isn't very common yet. The motivation was HTTP support for cloud optimized formats like GeoTIFF (https://github.com/pka/georaster/commit/34617dc7c30b66e7c55c85cd943e96e347d88573) and COPC (https://github.com/pka/copc-rs/commit/ea5d6628d225b2785db915ec8430e727a910d18b). For FlatGeoBuf we have a specialized async HTTP reader, so there is no benefit for it.

Made features additive and fixed #3.
New Seek+Read example is hopefully less puzzling:
// Seek+Read API
use std::io::{Read, Seek, SeekFrom};
let mut client = HttpReader::new("https://www.rust-lang.org/static/images/favicon-32x32.png");
client.seek(SeekFrom::Start(1)).ok();
let mut bytes = [0; 3];
client.read_exact(&mut bytes)?;
assert_eq!(&bytes, b"PNG");


CLI Build script for Ubuntu/Debian

Confirmed working with Ubuntu 18.04 and 20.04. Moves relevant directories into new /etc/imagestore directory. Creates two separate services to run the frontend and backend. For now is interactive (Saying YES to package manager) in order to catch any errors. In the future will streamline it.

Looks good! A few minor things:

It looks like the frontend will be exposed to the entire world, not just localhost. By that, I mean the :3000 address. Can we change that?
The same goes for the backend at :4000, which is even more problematic. Changin the last lines of src/index.ts to
const port = parseInt(process.env.PORT || "4000"); app.listen(port, 'localhost', () => console.log(Listening on port ${port})); seems to help a bit, but then the docker-configuration won't work anymore. Can you find a safe solution for this? If not, I will look deeper into it.
You should serve build, not the dev version on the frontend.
npx serve -s build -l tcp://localhost:3000 should fix 1 and 3, but I would appreciate if you could test if access outside of localhost to those ports is possible.
Is there a way to not overwrite, but add to default.conf? If not, any suggestions what to do if someone already has nginx?
Can you write all steps needed for secure deployment into the readme? We should definitely mention any ports that will be exposed to the public, and any passwords that have to be changed. Also, mention what has to be done if any of the ports are already in use.
Maybe we should add server_name localhost to the configuration, so that no one who just runs the script unknowingly exposes the port to the public? If it is intended, then they can comment out the line according to the instructions.
Last, can you push to test instead of main?

Apart from that, everything seems to be happy and working! Thanks again for the help :)


Update to reflex-platform <IP_ADDRESS>

I have:

[x] Based work on latest develop branch
[ ] Looked for lint in my changes with hlint . (lint found code you did not write can be left alone)
[ ] Run the test suite: $(nix-build -A selftest --no-out-link)
[ ] (Optional) Run CI tests locally: nix-build release.nix -A build.x86_64-linux --no-out-link (or x86_64-darwin on macOS)

This'll add beam-automigrate and newer beam packages to the default package set.


Push integers as integers to Lua

Lua 5.3 introduced proper integers. Should not change any behavior.
The API exists since at least Lua 5.1 so should not affect anything
there.

Thanks a lot @Zash.


Create a place to document annotations

With at least #1047 we have an annotation which is useful atm.
It would be good to have a place where we document these kind of annotations - just for developers. Thus not in the user-guide.

@booxter can you find a documetn where this can be added or potential create a new one for it?

FYI here is what kubernetes has: https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/

@fabiand do we have any more user visible annotations now that we migrated the interface model to a first class interface field? Is there anything else to document in context of this issue?
There are several "internal" annotations used by components, f.e. for heartbeats; do we want to document those? The original description is not clear about it and suggests to find a place to document "these" ("useful") annotations. Please clarify.

Mkaing this a bug, because we have annotations already.

I read the latest comments as a suggestion to document internal annotations too. OK I will post a PR.

@fabiand @davidvossel there is an argument in PR that this information should be captured in the code and then it will be easier to maintain its relevance. What do we want to do here - having a dev doc or inline comments?


fix: upgrade to version 3.1.337

from: https://github.com/jenkins-x/jx-cli

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign rajdavies
You can assign the PR to them by writing /assign @rajdavies in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jenkins-x-bot-test: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

kube
0a1b4132184f1bedb5ccd1b24f912fca25a63367
link
/test kube

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

/retest


Logging - Embedded Elastic Search does not start

Rancher versions:
rancher/server: master 4/24
Single node cluster [2gb RAM, 2 CPU & 4gb RAM, 2 CPU]
Steps to Reproduce:
Create a cluster
At cluster level, enable logging to Embedded ES target
Results:
Embedded ES never starts

Rancher logs:
2018/04/24 21:40:24 [ERROR] error updating ns cattle-logging status: Operation cannot be fulfilled on namespaces "cattle-logging": the object has been modified; please apply your changes to the latest version and try again
2018/04/24 21:40:25 [INFO] Updating service [elasticsearch] with public endpoints [[{"port":30418,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"port":32596,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true}]]
2018/04/24 21:40:25 [INFO] Updating workload [cattle-logging/elasticsearch] with public endpoints [[{"port":30418,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"port":32596,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true}]]
2018/04/24 21:40:26 [INFO] Updating workload [cattle-logging/elasticsearch] with public endpoints [[{"port":30418,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"port":32596,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true}]]
2018/04/24 21:40:26 [INFO] Updating workload [cattle-logging/elasticsearch] with public endpoints [[{"port":30418,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"port":32596,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true}]]
2018/04/24 21:40:26 [INFO] Updating workload [cattle-logging/elasticsearch] with public endpoints [[{"port":30418,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"port":32596,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true}]]
2018/04/24 21:40:27 [INFO] Updating workload [cattle-logging/elasticsearch] with public endpoints [[{"port":30418,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"port":32596,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true}]]
2018/04/24 21:40:27 [INFO] Updating service [kibana] with public endpoints [[{"port":30818,"protocol":"TCP","serviceName":"cattle-logging:kibana","allNodes":true}]]
2018/04/24 21:40:27 [INFO] Updating pod [cattle-logging/kibana-54f8d98fd9-jx58h] with public endpoints [[{"port":30818,"protocol":"TCP","serviceName":"cattle-logging:kibana","allNodes":true}]]
2018/04/24 21:40:29 [INFO] Updating node [brandon-es1] with public endpoints [[{"nodeName":"c-nfmsf:m-msjh8","addresses":["<IP_ADDRESS>"],"port":30418,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"nodeName":"c-nfmsf:m-msjh8","addresses":["<IP_ADDRESS>"],"port":32596,"protocol":"TCP","serviceName":"cattle-logging:elasticsearch","allNodes":true},{"nodeName":"c-nfmsf:m-msjh8","addresses":["<IP_ADDRESS>"],"port":30818,"protocol":"TCP","serviceName":"cattle-logging:kibana","allNodes":true},{"nodeName":"c-nfmsf:m-msjh8","addresses":["<IP_ADDRESS>"],"port":80,"protocol":"TCP","podName":"ingress-nginx:nginx-ingress-controller-2f68p","allNodes":false},{"nodeName":"c-nfmsf:m-msjh8","addresses":["<IP_ADDRESS>"],"port":443,"protocol":"TCP","podName":"ingress-nginx:nginx-ingress-controller-2f68p","allNodes":false}]]
2018-04-24 21:42:39.761187 I | mvcc: store.index: compact 30660
2018-04-24 21:42:39.763023 I | mvcc: finished scheduled compaction at 30660 (took 923.491µs)
2018/04/24 21:43:03 [INFO] Running cluster events cleanup
2018/04/24 21:43:03 [INFO] Done running cluster events cleanup
E0424 21:43:27.414386       1 generic_controller.go:204] ClusterLoggingController c-nfmsf/cl-zv66v [cluster-logging-controller] failed with : get elasticsearch endpoint failed, deployment elasticsearch status Available is False, reason: MinimumReplicasUnavailable, message: Deployment does not have minimum availability.
E0424 21:46:27.708848       1 generic_controller.go:204] ClusterLoggingController c-nfmsf/cl-zv66v [cluster-logging-controller] failed with : get elasticsearch endpoint failed, deployment elasticsearch status Available is False, reason: MinimumReplicasUnavailable, message: Deployment does not have minimum availability.

Kibana pod logs:
"type":"log","@timestamp":"2018-04-24T21:41:43Z","tags":["status","plugin:kibana@5.6.4","info"],"pid":10,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2018-04-24T21:41:44Z","tags":["status","plugin:elasticsearch@5.6.4","info"],"pid":10,"state":"yellow","message":"Status changed from uninitialized to yellow - Waiting for Elasticsearch","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2018-04-24T21:41:44Z","tags":["status","plugin:console@5.6.4","info"],"pid":10,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2018-04-24T21:41:44Z","tags":["status","plugin:metrics@5.6.4","info"],"pid":10,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2018-04-24T21:41:45Z","tags":["status","plugin:timelion@5.6.4","info"],"pid":10,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2018-04-24T21:41:45Z","tags":["listening","info"],"pid":10,"message":"Server running at http://<IP_ADDRESS>:5601"}
{"type":"log","@timestamp":"2018-04-24T21:41:45Z","tags":["status","ui settings","info"],"pid":10,"state":"yellow","message":"Status changed from uninitializedto yellow - Elasticsearch plugin is yellow","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2018-04-24T21:41:47Z","tags":["status","plugin:elasticsearch@5.6.4","error"],"pid":10,"state":"red","message":"Status changed from yellow to red - Request Timeout after 3000ms","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2018-04-24T21:41:47Z","tags":["status","ui settings","error"],"pid":10,"state":"red","message":"Status changed from yellow to red -Elasticsearch plugin is red","prevState":"yellow","prevMsg":"Elasticsearch plugin is yellow"}

Kubectl get nodes:
kubectl get pods -n cattle-logging
NAME                             READY     STATUS    RESTARTS   AGE
elasticsearch-6fc79d66b9-n57vd   0/1       Pending   0          14m
fluentd-wcwlk                    2/2       Running   0          14m
kibana-54f8d98fd9-jx58h          1/1       Running   0          14m
log-aggregator-9q888             1/1       Running   0          14m

Node docker ps:
 root@brandon-es1:~# docker ps
CONTAINER ID        IMAGE                                                                                COMMAND                  CREATED             STATUS              PORTS               NAMES
6585601070b5        rancher/fluentd@sha256:671ab482c095098dac5089b20a821a4f144526d84bab74b87a4aa46b55553571                                   "fluentd -c /fluen..."   14 minutes ago      Up 14 minutes                           k8s_fluentd_fluentd-wcwlk_cattle-logging_19030bd3-4808-11e8-95b9-ce47c966c628_0
ef5ed51b0602        rancher/kibana@sha256:76384e058244f717df18b5b10e707bf1cc2922fe8db7a313392d03a5d086285a                                    "/docker-entrypoin..."   14 minutes ago      Up 14 minutes                           k8s_kibana_kibana-54f8d98fd9-jx58h_cattle-logging_1a630280-4808-11e8-95b9-ce47c966c628_0
6cbf0a3bb375        rancher/log-aggregator@sha256:ccfb330256fd9f830c32ad56970113086d2a9ce6cd8167428a587f7d0aec69b5                            "deploy.sh"              15 minutes ago      Up 15 minutes                           k8s_log-aggregator_log-aggregator-9q888_cattle-logging_18fa4bd4-4808-11e8-95b9-ce47c966c628_0
21e10b308315        rancher/fluentd-helper@sha256:8c14de6cb5f64cbdacd59068fb2604dac5dc33778bdf40455d6e439ee737da9c                            "fluentd-helper --..."         23 minutes ago      Up 23 minutes                           k8s_dnsmasq_kube-dns-7dfdc4897f-n78rb_kube-system_db84ac72-4806-11e8-95b9-ce47c966c628_0
03c92c2dba83        rancher/cluster-proportional-autoscaler-amd64@sha256:77d2544c9dfcdfcf23fa2fcf4351b43bf3a124c54f2da1f7d611ac54669e3336     "/cluster-proporti..."   23 minutes ago      Up 23 minutes                           k8s_autoscaler_kube-dns-autoscaler-6c4b786f5-d297l_kube-system_dbe4ee62-4806-11e8-95b9-ce47c966c628_0
3aadb7821812        rancher/k8s-dns-kube-dns-amd64@sha256:6d8e0da4fb46e9ea2034a3f4cab0e095618a2ead78720c12e791342738e5f85d                    "/kube-dns --domai..."            24 minutes ago      Up 24 minutes                           kube-proxy
af97fe87bd13        rancher/hyperkube:v1.10.1                                                                                "/opt/rke/entrypoi..."   24 minutes ago      Up 24 minutes                           kubelet
fbafb802a5bc        rancher/hyperkube:v1.10.1                                                                                "/opt/rke/entrypoi..."   25 minutes ago      Up 25 minutes                           kube-scheduler
6d784d2c961f        rancher/hyperkube:v1.10.1                                                                                "/opt/rke/entrypoi..."   25 minutes ago      Up 25 minutes                           kube-controller-manager
64b20c8bcc64        rancher/hyperkube:v1.10.1                                                                                "/opt/rke/entrypoi..."   25 minutes ago      Up 25 minutes                           kube-apiserver
00790fa34ba7        rancher/coreos-etcd:v3.1.12                                                                                "/usr/local/bin/et..."   25 minutes ago      Up 25 minutes                           etcd

Hi, the log shows the cluster does not have the resource required, we have set the default request resource higher, the UI to show error message not merge yet. You could set the resource lower, like 1 cpu and 512 memory. The UI will update soon, thank you.

The backend PR for showing embedded target deployment failure is merged.  The UI PR is WIP. Once it is merged the UI can display error message.

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

It doesn't work for me. On my cluster of 3 bare-metal nodes with Ubuntu 16 and Docker 18, the Embedded Elasticsearch container log starts with the following error message:
sh: error setting limit: Operation not permitted
Several other lines follow and the container dies. The progress spinners in the UI keep spinning forever  :(
Please let me know which logs would you like me to post.


Mixed es5/es2015 code with mixin classes causes runtime errors

TypeScript Version:  2.4.1 (but likely anything since 2.2)
When utilising code targeted at ES5 mixed with code targeted at ES6 causes a runtime error when using mixin classes.  The real world use case was using a library that was targeted at ES5 for distribution compatibility reasons while downstream code is being targeted at ES2017 because of running in a known limited environment.
Code
Tagged.ts
// @target: es5
export interface Constructor<T> {
    new(...args: any[]): T;
    prototype: T;
}

export default function Tagged<T extends Constructor<{}>>(Base: T) {
    return class extends Base {
        _tag = '';
    }
}

TaggedExample.ts
// @target: es2015
import Tagged from './Tagged';

class Example {
  log() {
    console.log('Hello World!');
  }
}

const TaggedExample = Tagged(Example);

const taggedExample = new TaggedExample(); // Uncaught TypeError: Class constructor Example cannot be invoked without 'new'

Expected behavior:
No run-time errors.
Actual behavior:
A runtime error of Uncaught TypeError: Class constructor Example cannot be invoked without 'new'.

I suspect this got lost in the shuffle.  Ping @DanielRosenwasser

In code that transformed
function Tagged(Base) {
    return (function (_super) {
        __extends(class_1, _super);
        function class_1() {
           //  _super.apply(...) equal class N{}.apply(this,...)
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this._tag = '';
            return _this;
        }
        return class_1;
    }(Base));
}

class N {}
N.apply(null) // Uncaught TypeError: Class constructor N cannot be invoked without 'new'

🎤 tap tap is this thing on? 😁
/cc @mhegazy

Hey @kitsonk, sorry we didn't catch this issue. I spoke about this with @rbuckton a loooong time ago. Unfortunately I don't think that this is possible to achieve without Reflect.construct which isn't available in ES5 runtimes, but I will defer to Ron more here.

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@mhegazy the issue indicates that potentially a response from @rbuckton would help elucidate the issue.  Can we keep it open or get a response?

We would need to add a helper to facilitate marshalling super() to Reflect.construct when available and falling back to our existing behavior otherwise. Something like this:
var __construct = (this && this.__construct) || (typeof Reflect !== "undefined" && Reflect.construct
    ? function (self, target, args) { return self !== null && Reflect.construct(target, args, self.constructor) || self; }
    : function (self, target, args) { return self !== null && target.apply(self, args) || self; });

Which would then be used like this:
function Tagged(Base) {
    return (function (_super) {
        __extends(class_1, _super);
        function class_1() {
            var _this = __construct(this, _super, arguments);
            _this._tag = '';
            return _this;
        }
        return class_1;
    }(Base));
}

We are currently running into this issue where we still emit most part of our codebase to es5 but only some are being migrated to es2015. Are there any plans to change the emitted es5 code like the example you posted?  @rbuckton

This is very problematic because it means my library (which rely on this) published in es5 cannot be consumed by JavaScript directly at all.

I just stumbled upon this. I'm not sure what more feedback is required, this bug basically breaks exporting class decorators in es5 and using them in es6+.
I had to resort to eval to work around this, check this if you're interested in the implementation.

I think if someone wants to take a swing at an implementation, then we would be willing to discuss at a meeting and pull in the changes.

Looks like this works with Babel, because it creates a function around the super class (_createSuper helper):
"use strict";

// the untranspiled chunk
class A {}

// transpiled class B extends A {} with babel

function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } }

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var B = /*#__PURE__*/function (_A) {
  _inherits(B, _A);

  var _super = _createSuper(B);

  function B() {
    _classCallCheck(this, B);

    return _super.apply(this, arguments);
  }

  return B;
}(A);

and new B() works.
TS uses A.apply(..) directly, which is invalid with native classes:
"use strict";

// the untranspiled chunk
class A {}

// transpiled class B extends A {} with TS

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var B = /** @class */ (function (_super) {
    __extends(B, _super);
    function B() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return B;
}(A));

new B() // fails!

/*
Uncaught TypeError: Class constructor A cannot be invoked without 'new'
    at new B (<anonymous>:18:42)
    at <anonymous>:1:1
B @ VM714:18
(anonymous) @ VM738:1
*/

Because this fails:
class C {}
C.apply({}, []) // Uncaught TypeError: Class constructor C cannot be invoked without 'new'

I can't reproduce the error:
https://www.typescriptlang.org/play?target=1&jsx=0&ts=4.9.4&filetype=ts#code/PTAEAEBcEMCcHMCmkBcpEGcCsAoRAPABwHtZJQBLAO0kVgDNoBjRUAYWKo0lgFcnIpADwAVAHygA3jlCzQVRAHcAFADp1ceBjTQqATwDaAXQCUaEQG4ZcwrGKDIewonNWAvjnq8qAip1Ai0PBIACai6Pi0VCEY7JzcfALCkm5iYsoAQtAYLgEmUtaysMi8sFSgTAA22bEEUTGgWTkFcq2gAPow8KAAvKAA5P1WrR4eVTWgAKL40AC2hJWs0rKVxPDK+ctyTPHEi6qr6-0AEoiVq6AA6qSVIQCE-SbDoKM4O1zkgcGIIdNzC6w+l9Qso-vNFk83vFyF1QmCAb15EoAkE4TNwYgNlYgA

I can't reproduce the error [...]

This issue still exists, but as more and more projects move to targeting ES2015 and higher I'm not sure it is a high enough priority to be fixed as the chances of running afoul of this are smaller and smaller. I expected the largest cause of this comes from extending builtins like Map and Set, but extending builtins seems to be something TC39 members are actively discouraging these days (with the possible exception of Error).
@DanielRosenwasser do we want to close this, or take a fix? I put together a fix for this, but it requires adding the __construct helper I mentioned above, which would change the emit for everyone using subclassing and --target ES5. It also would require a change to tslib, and that would require anyone affected by the change to upgrade to the latest tslib.
Alternatively, we could fix this behind a flag for the rare cases where this happens.

An example how to reproduce is here: https://www.typescriptlang.org/play?target=1&jsx=0&ts=4.9.4&filetype=ts#code/KYNwhgNgFABgUAAgQYwmAzuhAhDwEDeiSKA9gHboAuATgK7JWk1QCUhxJZlpEwAdBFIBzKAHJc6YAC5kFavUbMxrANycSVABYBLdIJFt1XAL4aho9kS5I5PPgdES80iyuMkzSLwgDuO8gATUl9+SXwAXhw8dRg1ODhUDCwAYV0IQIRgAA8qYCCsKH8gkIQMMvIAT1YwvA5beVoGJhYrDXQ6AAdgVo8G+wELcTSdDNlGxRb3YjNiIbabbnReQcMxEbG3eO84WbtqFHTMqPJgXwQNwKM4AHobrOzuxnRb+-DxyialGleLo9cRL9Lh8FM1mHAgA
And this is how it fails: https://stackblitz.com/edit/js-svplky?file=index.js
I flag would be awesome.


fix: dont overwrite global.navigator

react native adds navigator.product='ReactNative'
old code overwrote this

Appreciate the contribution^~