Restrict use of NodePorts

For our bare-metal k8s installation, we use an ingress controller that creates a NodePort.
It appears that behind the scene, k8s uses iptables to allow all traffic to all services that create NodePorts, independent of any ufw entered 'ALLOW' rules. The rational behind this may be to allow health checks.
On our dev k8s control node:
# iptables -L -v
Chain INPUT (policy DROP 76 packets, 3177 bytes)
 pkts bytes target     prot opt in     out     source               destination
 433M   72G cali-INPUT  all  --  any    any     anywhere             anywhere             /* cali:Cz_u1IQiXIMmKD4c */
 416M   69G KUBE-NODEPORTS  all  --  any    any     anywhere             anywhere             /* kubernetes health check service ports */
... [many lines omitted]
Chain KUBE-NODEPORTS (1 references)
 pkts bytes target     prot opt in     out     source               destination
... [many more lines omitted]

I believe that the ingress controller is secure, as URLs it doesn't know how to route are 'dumped' into a backend server that just displays a 404 error page.
So, we need to consider if making other services or UIs using NodePorts available on other ports is secure and desirable.

The more I read about NodePort the less I'm convinced it'll work within our constraints, primarily due to the insecurities with it (whitelisting IPs) and the number of hoops to jump though to try and remedy them. From what I can tell it looks like the LoadBalancer type would be better (if we have a load balancer) since we can set source IP ranges. If we can use the ingress controller in front of the NodePort to handle the restrictions, that might work.

@ThomasThelen the ingress controller we are using works with "ClusterIP" based services, IIRC, and these are not addressable outside the cluster's internal network, so rely on the ingress controller for routing.
If you have ideas on a different solution, please post here.

It sounds like we're cornered into using a NodePort because that's the only config option left which allows us to expose the service

From the Jul 8 development call it's clear that I had a misunderstanding of ClusterIP. We should be using CluserIP instead of NodePort. I created a relevant issue here and have an open PR that I'll open once this is tested.


How to optimize perspective function？

The perspective function is convex, but cvxpy can not solve it,   e.g. f(x,t)=t*2**(x/t).
I want to know how to solve it.
Thanks!

Take log?

From: liupeng2015<EMAIL_ADDRESS>Sent: 16 May 2020 08:04
To: cvxgrp/cvxpy<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [cvxgrp/cvxpy] How to optimize perspective function？ (#1026)
The perspective function is convex, but cvxpy can not solve it, e.g. f(x,t)=t*2**(x/t).
I want to know how to solve it.
Thanks!

CVXPY has rel_entr and
u >= t*exp(x/t)  iff    x <= - rel_entr(t,u)
In general when you can express a function in conic form then you can also express its perspective. https://docs.mosek.com/modeling-cookbook/practical.html#perspective-functions

@aszekMosek  Thanks!  But I wonder why I can not find rel_entr in my CVXPY version 1.0.25.

@liupeng2015 Sorry, I must have looked in a wrong place. kl_div applies here. Or just directly use the exponential cone is possible.

@aszekMosek Thanks all the same！
I still find the way to solve the problem that contains perspective function( f(x,t)=t*2**(x/t) )  with cvxpy.
It's been bothering me for a long time.  Thank you for you advice.
Please tell me if you have a solution.

@aszekMosek   f(x,t)=t*2**(x/t) is convex function, but it is not DCP.

@keithbriggs    f(x,t)=t*2**(x/t) is convex function, but it is not DCP. There is no such function in CVXPY.

log(f) is DCP, so you're ok.

From: liupeng2015<EMAIL_ADDRESS>Sent: 17 May 2020 09:32
To: cvxgrp/cvxpy<EMAIL_ADDRESS>Cc: Briggs,KM,Keith,TUD2 R<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [cvxgrp/cvxpy] How to optimize perspective function？ (#1026)
@keithbriggshttps://github.com/keithbriggs f(x,t)=t*2**(x/t) is convex function, but it is not DCP. There is no such function in CVXPY.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/cvxgrp/cvxpy/issues/1026#issuecomment-629762138, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHIQEMWL2ZVOLILPUK4UQDRR6OJXANCNFSM4NCZI25A.

@liupeng2015  kl_div does what you need. I just incorrectly thought it is called rel_entr.

Thankds!
log(f) is DCP, but  x/t is still not DCP after taking log.    @keithbriggs
kl_div is defined as xlog(x/y)−x+y , how to use it?

Yes - sorry, I was mistaken.

Resolved via #1867. CVPXY 1.3 will support the perspective transform of an expression w.r.t. its variables.
@SteveDiamond  I think this can be closed.


Overlapping roads of different type and color flicker

Hi there,
first of all amazing work!
I recognized that roads of different type and color flicker.
The reason for this is probably the same as with #29.
Maybe you should consider to give the different road types a height as well, so that the layers don't overlap.

Greetings and thanks for your work,
Erik

@E-Reg
Hmm yea I remember seeing that especially in the intersection. I mean even the same type roads will have z-fights. Not sure how to fix that really, giving different heights to different types won't cut it. I believe it's possible to use a shader that won't cause z-fight (I don't know much about shaders but I think that's possible?) or we can merge roads maybe?
I might be missing something out here but it's not a simple problem I think.


can't copy and paste from pkg READMEs

I was reading how to use thefuck and it was only when I couldn't copy text from the instructions I realized I wasn't in my browser. So that's pretty good. Still though.

related to #564

Dupes #564


Replace Popover in ActionableItem with Drop

Added example with scroll
Removed now useless style
Fixed unit tests

Codecov Report

Merging #1091 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1091      +/-   ##
==========================================
+ Coverage   99.76%   99.76%   +<.01%
==========================================
  Files         330      330
  Lines        8177     8179       +2
  Branches     1953     1953
==========================================
+ Hits         8158     8160       +2
  Misses         19       19

Impacted Files
Coverage Δ

src/components/actionable-item/ActionableItem.tsx
100% <100%> (ø)
:arrow_up:

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 41cb75b...9d7c684. Read the comment docs.


Enable proxy tunneling

By simply using 'caw' module to create the HTTP agent with proxy settings
we are able to use 'pnpm' behind a basic corporate proxy (I could not test
it extensively on any kind of proxy).
I had to disable 'sepia' caching in case a proxy configuration is found
because it was not behaving fine with the new HTTP agent setup.

woot!


[tutorial] add a diff in 4-1 for clarity

What kind of changes does this PR include?

Minor content fixes (broken links, typos, etc.)

Description
Added a diff to make it easier to see where changes have been made.

Woo! Then.... I think we're done??? Amazing work! Thank you so much for contributing to the tutorial!  💜 💪


add Pratham's hackbar

File already exists

You can open another PR with the .cpp file. Deleted the .cpp file by mistake as it was with the hackbar.

Hi,
Would you be able to merge the LongestNonDecreasingSubSegment.CPP PR today. Since, it is the last day of Hacktober fest today.
Hope you understand!

On 30-Oct-2020, at 10:02 PM, Tasnim Zotder<EMAIL_ADDRESS>wrote:
You can open another PR with the .cpp file. Deleted the .cpp file by mistake as it was with the hackbar.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/tasnimzotder/hacktoberfest-2020/pull/219#issuecomment-719657955, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQJVC74SUJ7Y5KE35OV7SV3SNLTBTANCNFSM4TBQHYYA.

Sure


Sync master changelog with v2.1 branch

The title says it all.

Current coverage is 77.50% (diff: 100%)

Merging #3097 into master will increase coverage by 0.10%

@@             master      #3097   diff @@
==========================================
  Files           430        430
  Lines         22082      22082
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits          17091      17113    +22
+ Misses         4991       4969    -22
  Partials          0          0

Powered by Codecov. Last update aeb2b92...bb2e954


Icon for SLD editor

As the IED editor, the SLD editor does not have a dedicated icon. The other editor do :)

Already fixed, @JakobVogelsang do you agree?


Added in new interp files for pixel link v0004

The open model zoo changed the keys between version 0002 and 0004.

@dzimmerman-nci , FYSA. I fixed the dictionary keys for pixel link so you didn't have to mess with it.

For the Codacy issues that are flagged on this commit, there's still an issue with the way things are implemented using Python's eval, you can't do multilevel method names.
See here: #652 -and- this pull request: https://github.com/opencv/cvat/pull/794

For the Codacy issues that are flagged on this commit, there's still an issue with the way things are implemented using Python's eval, you can't do multilevel method names.
See here: #652 and this pull request: #794

@benhoff , thanks for the PR. We have an internal discussion about another PR and decide to explicitly disable all warnings like that to make codacy green. Could you please just add a couple of comments to hide these warnings (e.g. # pylint: disable=no-self-use?

@nmanovic updated!

@benhoff , I have merged. Thank you! Could you please update CHANGELOG.md and add licensing terms into your files? Something like:
# SPDX-License-Identifier: MIT

@nmanovic licensing in the python files? Or document in the readme file?

@benhoff , we add license terms into each file.


Design "Browse Testimony"

Create a page, similar to "Browse Bills", but for browsing testimony.
@jkoren Can you find/share the hyperlink to the original testimony table you created?
Filter:

Individual v. Org v. all
Org name
Bill number
By committee (veteran affairs, etc.)
By district

Sort

Recency

Search functionality

Just looks at the text of the testimony.

"[submission by private user]"
For navigation:
Put "Browse Testimony" as another parent item in the menu, right below "Browse Bills"
On the homepage, next to "what people are saying" - we should include a link "view all testimony"
Ticket from the first go at this: https://app.zenhub.com/workspaces/design-and-development-629389aa02e9d200139c90b8/issues/gh/codeforboston/maple/615
UX Design Mockups

All Testimony

Just Users

Organizations

Other Use Cases

Item Types Annotated

https://cfb-public.slack.com/files/U019VNB8B7T/F052T1N9SSX/image.png?origin_team=T0556DP9Y&origin_channel=D030765UL90

@mvictor55 This is ready for dev with design annotated and added to ticket. We could add mobile screens if needed but I also know thats not a core focus atm.

Awesome - want to throw this to the NYU team?
On Tue, Apr 25, 2023 at 1:46 PM jamesvas5307 @.***>
wrote:

@mvictor55 https://github.com/mvictor55 This is ready for dev with
design annotated and added to ticket. We could add mobile screens if needed
but I also know thats not a core focus atm.
—
Reply to this email directly, view it on GitHub
https://github.com/codeforboston/maple/issues/1085#issuecomment-1522178342,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARANGSA2G2L2XPPFLQREDRDXDAEWTANCNFSM6AAAAAAW26ON7U
.
You are receiving this because you were mentioned.Message ID:
@.***>


Unable to run Flows that make Callouts

Receiving error "System.CalloutException: Callout loop not allowed" - even with batch size of 1, when attempting to use invocable flow methods from External Services / BETA Integrations in SF.  (Swagger Schema).  Our Flow contains methods that when run in screen flow or autolaunch flow, can call out to web service endpoints.
Architecture of Mass Action Scheduler may be preventing callouts in Flow.  Doug- can you verify?
Error
https://help.salesforce.com/articleView?id=000232321&type=1
Citation
https://help.salesforce.com/articleView?id=000232321&type=1

This may be a limitation in how Mass Action Scheduler works. The app uses the Salesforce REST API to invoke the chosen action (flow). So what I understand in that help article is that the callout from the flow itself is being blocked because apex code already made a callout.
For grins to see if this workaround helps, could you try adding a flow Wait element before the flow calls the external service? That might cause a new apex transaction to occur and so reset the http callout limit. I’m not saying that is or isn’t a good thing to do, but something to try.

@bruceleestewart I'm going to escalate to the Apex and Flow teams to see if this is "by design" or "fixable".

Doug:
I haven’t been on Github in a while to reply. Thank you for looking into this, and confirming your original gut-check.  I see tremendous potential in external services / callouts in general. I get that our system has limitations.
 Thank you for crafting this tool, and for your thorough reply!
Bruce

On May 10, 2018, at 4:37 PM, Doug Ayers<EMAIL_ADDRESS>wrote:
Unfortunately, the error System.CalloutException: Callout loop not allowed is behaving as designed by Salesforce.
Per their documentation, the scenario occurs when a Salesforce org makes a callout to a Salesforce org, and then that Salesforce org makes a callout.
Salesforce A ----Callout----> Salesforce B ----Callout----> Webservice
With Mass Action Scheduler, the app invokes your process/flow via a callout to the REST API, so that's the Salesforce org makes a callout to a Salesforce org first part of the scenario. Your org makes a callout back to itself. Then, if your process/flow/apex makes another synchronous callout or uses external services, that is the and then that Salesforce org makes a callout second part of the scenario.
As a workaround, you might try having your invoked process/flow/apex perform its callout or use of external services asynchronously via batch or queueable apex.
There isn't anything I can change here for now until Salesforce provides a way for invocable processes and headless flows to be initiated from apex natively rather than having to go through the REST API. I have brought up this limitation to Salesforce product management and awaiting prioritization.
Note, in Spring 18 release, autolaunched flows can be started from apex natively, but the REST API that Mass Action Scheduler uses to know which flows/processes you want to invoke does not distinguish between invocable processes and autolaunched flows, and so the app cannot reliably know which code path to go down once you've made a a selection.
If/when apex supports starting invocable processes, then I'll revisit this feature request. Please consider submitting this idea on IdeaExchange too.
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Policy: double quote: allow if dollar in string

One line to allow double quotes if there is a dollar in the string.
As example from my vimrc:
let $h = expand($HOME)
let $w = expand("$h/wiki/wiki") | let $wiki = $w

Cleaner than $h . '/wiki/wiki' in my opignon

Coverage remained the same at ?% when pulling 45951a5975187d766e08d43540cea3b3393e3a62 on tinmarino:master into bcd6562a3d74898a179a9a542ded3c4086f5c57c on Kuniwak:master.

Codecov Report

Merging #340 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #340   +/-   ##
=======================================
  Coverage   93.69%   93.69%
=======================================
  Files         133      133
  Lines        4155     4155
  Branches      417      417
=======================================
  Hits         3893     3893
  Misses        167      167
  Partials       95       95

Thank you!

Well thank you. Awesome plugin (I'm using it with vim's ale) ! Fast merge, congrat.
Keep on linting !

@tinmarino
I don't have opinion about this policy. Just I want to question: do you know
expand("$h/wiki/wiki") and expand('$h/wiki/wiki') are the same result?

I don't have opinion about this policy

ah, wait.
this changes built-in (enabled by default) policy.
I think this change is unnecessary because above two expressions are evaluated to the same results.

True, missed that.
Since expand('$HOME') also works it should also prefer single quotes there then I guess.
@tinmarino are we missing something, or do you agree this should be reverted?

Hi guys. Tk @tyru !!
Actually I was missing something. My PR is an error, my bad : the $ symbol do not get expanded even with double quote.
echo "$HOME"    " -> $HOME
echo '$HOME'    " -> $HOME

Sorry for that.


Mypy false positive: metaclass conflict

Mypy detects a metaclass conflict as soon as we subclass the ConfZ class as per default use case:
reproduce.py:
from confz import ConfZ, ConfZEnvSource

class MyConfig(ConfZ):
    my_config_variable: bool

    CONFIG_SOURCES = [ConfZEnvSource(allow_all=True)]

Output of mypy:
❯ mypy .
reproduce.py:4: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases  [misc]
Found 1 error in 1 file (checked 1 source file)

Used configuration:
❯ python3 --version
Python 3.10.12
❯ pip3 list
Package           Version
----------------- -------
confz             1.7.0
mypy              1.10.0
mypy-extensions   1.0.0
pip               22.0.2
pydantic          1.10.15
python-dotenv     0.21.1
PyYAML            6.0.1
setuptools        59.6.0
toml              0.10.2
tomli             2.0.1
typing_extensions 4.12.1

Note: It seems to still be the case with confZ 2 when using BaseConfig

Indeed, seams to be a limitation of MyPy, it doesn't correctly recognize the metaclass because pydantic's Metaclass does not inherit from type (https://mypy.readthedocs.io/en/stable/metaclasses.html, last point).
Thanks for pointing it out, I will adjust the docs.
Interestingly, this problem did not exist with older versions of MyPy (tried it with 0.940, there it still accepts it).

Done, see https://confz.readthedocs.io/en/latest/usage/mypy.html


host: fix sync storage info duration'

这个 PR 实现什么功能/修复什么问题:
host: fix sync storage info duration'

是否需要 backport 到之前的 release 分支:
release/3.4
/cc @swordqiu @zexi
/area host

Codecov Report

Merging #8355 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #8355   +/-   ##
=======================================
  Coverage    6.12%    6.12%
=======================================
  Files         762      762
  Lines      118376   118376
=======================================
  Hits         7256     7256
  Misses     110465   110465
  Partials      655      655

Flag
Coverage Δ

#aFlag
6.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out 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 fe2ecd1...4b09751. Read the comment docs.

/lgtm
/approve


problems installing eigen and prorobuf

Firstly, sorry for opening an issue to ask this, but I don't know how else to get in touch.
I'm at the stage of the instructions:

To generate the needed CMake files for your project, execute the script as follows: eigen.sh generate installed <tensorflow-root> [<cmake-dir> <install-dir>]...

OK - running that without the "optional" arguments fails because there already exists a file FindEigen.cmake in this repo's root directory:
cp: '/home/hal9000/Sources/tensorflow-cmake/FindEigen.cmake' and './FindEigen.cmake' are the same file Command failed - script terminated
So instead, I do $ sudo ./eigen.sh generate installed /home/hal9000/Sources/tensorflow /usr/share/cmake-3.5/Modules /usr/local, since the instructions earlier specify <install-dir> to be /usr/local, and I believe <cmake-dir> should be /usr/share/cmake-3.5/Modules. That's where those .cmake files are stored on my machine (is that the correct place, or am I missing the point here?).
Anyway, similarly I run $ sudo ./protobuf.sh install /home/hal9000/Sources/tensorflow /usr/share/cmake-3.5/Modules (which took almost forever to complete, ending with the worrying output Protobuf has been installed to /usr/share/cmake-3.5/Modules), followed by $ sudo ./protobuf.sh generate installed /home/hal9000/Sources/tensorflow /usr/share/cmake-3.5/Modules /usr/local.
Unfortunately, when I go to CLion and start adding this stuff
# Eigen
find_package(Eigen REQUIRED)
include_directories(${Eigen_INCLUDE_DIRS})

(and the equivalent lines for protobuf) to the CMakeLists.txt of my project, I get the error:
CMake Error at CMakeLists.txt:18 (include):
  include could not find load file:

    Protobuf

CMake Error at CMakeLists.txt:19 (add_dependencies):
  Cannot add target-level dependencies to non-existent target
  "<EXECUTABLE_NAME>".

  The add_dependencies works for top-level logical targets created by the...

I'm obviously doing something (probably everything?) wrong. So what am I not getting?

Part of your problem is actually my fault, because there's a typo in the README for the Protobuf instructions. I'll fix that very shortly.  The arguments for protobuf.sh are actually the following: sudo protobuf.sh install <tensorflow-root> [<install-dir> <download-dir>].  That certainly makes a lot more sense than specifying the CMake directory while installing!  So now, to install Prorobuf to /usr/local, you only need to execute the following:
sudo ./protobuf.sh install /home/hal9000/Sources/tensorflow

You previously installed Protobuf into the shared CMake directory; I would definitely advise deleting it from there to save space and remove clutter. The installation of Protobuf does take a very long time; this is because we have to build a specific version from source.
Ok, so that's the first part. The next issue concerns where all the CMake files go.  The files generated by the scripts in this repository are intended to be placed within the CMake Modules directory of your project. In most scenarios, this is in the <PROJECT_ROOT>/cmake/Modules directory.  If we run the generate commands for the install-project example in the repository and open the project in CLion, we can see that the files are put into install-project/cmake/Modules:

So you should simply be able to correctly place the generated CMake files using the following:
./eigen.sh generate installed <PROJECT_ROOT>/cmake/Modules /usr/local
./protobuf.sh generate installed <PROJECT_ROOT>/cmake/Modules /usr/local

Note that <PROJECT_ROOT> should be replaced with the path to your CLion project.  For example, I have the install-project example in ~/git/tensorflow-cmake/install-project, so I would execute the following:
./eigen.sh generate installed ~/git/tensorflow examples/install-project/cmake/Modules
./protobuf.sh generate installed ~/git/tensorflow examples/install-project/cmake/Modules

Don't forget that you have to manually copy FindTensorflow.cmake into this directory too.
Finally, the last issue comes from the CMake errors you are getting.  It seems like you aren't changing the <EXECUTABLE_NAME> placeholder to the name of your actual executable. I would suggest taking a look at the CMakeLists.txt for this repository's install-project example.  In that example, <EXECUTABLE_NAME> is install-project.
I hope this information helps; please let me know if these problems persist or any others arise.


[RocketChat] Set up Omnichannel / LiveAgent for tech support

This seems to be a nice feature for tech support during the conference.
It adds a "chat" icon on the website.

The user can chat with an agent.

Agent interface:

[ ] Figure out how to set up Omnichannel

This is too much work for ACL2020.
Need to figure out the right logistics for future conferences.
For now, let’s just use #helpdesk channel.


Error 400 - HTTP/1.1 400 Bad Request

Hi @GraesonB,
So after further experimenting with the wrapper, I noticed a strange error, namely:
Error 400 - HTTP/1.1 400 Bad Request
This error occurs after a good amount of back-and-forth prompts between the user and ChatGPT (3.5-Turbo).
Essentially, this occurs after I converse with ChatGPT for a while (~30+ prompts back-and-forth).
I thought this could be due to either of the following reasons:

Now, from what I understand, the max_token size indicates the maximum number of tokens per response, not for the entire conversation, unless I am mistaken. If that is the case, then I should not be "out of tokens" over the duration of the conversation.
Then I thought this could be an internet connection issue, although that was not the case as I got different errors when switching off the internet adapter to quickly test for it.
Nor do I think this is due to sending messages too quickly as the error Too many requests pops up.
Could this be due to using an API key that is part of a free i.e. non-pay plan?

In short, I dismissed 2 and 3, I am not sure about 1 or 4.
I find this quite interesting and I am still investigating it. Just wanted to reach out perhaps if you have stumbled on this error :)
My apologies if I am missing something, thank you again for a wonderful wrapper!

Hi again!
My guess is that this is likely a token issue. To my knowledge there aren't any restrictions on API keys, as long as there are funds on your account (I believe everyone starts with $18) you should have no problem sending API requests.
So the way ChatGPT's API works is it sends the entire conversation with every new message because it needs the full conversation for context. So as a conversation increases in length, the closer you get to ChatGPT's token limit (being 4096). I currently have a solution for this that can increase the length of your conversation well past your 30 prompts, but it's a little more involved and harder to package neatly for other people to use. If you're interested in me giving you the run down, I'd be happy to. My email is<EMAIL_ADDRESS>Cheers!

Great! Thank you! I will follow up on your email.
I just found this by the way:
https://help.openai.com/en/articles/7039783-chatgpt-api-faq

What's the rate limits for the ChatGPT API?
Free trial users: 20 RPM 40000 TPM
Pay-as-you-go users (first 48 hours): 60 RPM 60000 TPM
Pay-as-you-go users (after 48 hours): 3500 RPM 90000 TPM
RPM = requests per minute
TPM = tokens per minute

So perhaps the token size limit may not be the issue, as according to the post above, it is 40k tokens / per minute. In any case, it could very well be a token issue, if I find the underlying reason why this is happening I will update the post. Thanks for all your time :)

Ah I was mistaken, I think you're right! It's probably the TPM restriction. Anyways the solution I mentioned above will also reduce your TPM, so feel free to email me any time.

I got this issue as well and was able to fix it by reducing the "Max Tokens" variable to 256 in the inspector


⚠ API - Lens has degraded performance

In d159724, API - Lens ($LENS_API_URL) experienced degraded performance:

HTTP code: 503
Response time: 323 ms

Resolved: API - Lens performance has improved in 6e26dff after 10 minutes.


Started SDK for java

i am trying compile SDK java but i was getting error because IDE not found JAR.
For example:
import io.serverlessworkflow.api.Workflow;
import io.serverlessworkflow.api.actions.Action;
import io.serverlessworkflow.api.auth.AuthDefinition;
import io.serverlessworkflow.api.branches.Branch;
this jar not exists in the dependency maven.

I want to become contributor but i not know how compile SDK and use.
the readme document is not enough. something is missing
Thanks

@davideduma what happens when you run mvn clean verify -DskipTests?
Can you provide a reproducer?

@hbelmiro. it's working right now. i've configured java_home with version 8 so this is my error. now it is working very well with 11 version java. Thanks!


HIVE-24021: Read insert-only tables truncated by Impala correctly

This is the second PR for this change.
Why are the changes needed?
Hive reads insert-only tables truncated by Impala as if the truncation hadn't happened.
Does this PR introduce any user-facing change?
Yes, getAcidState will not filter out files with names beginning with "_empty"
How was this patch tested?
Unit test

LGTM. +1


socketFactoryClass property is ignored during login method

Driver version
9.2
SQL Server version
Microsoft SQL Azure (RTM) - 12.0.2000.8   Apr 29 2021 13:52:20   Copyright (C) 2019 Microsoft Corporation
Client Operating System
Windows 10
JAVA/JVM version
JDK 15 something
Table schema
any and all
Problem description

Expected behaviour:
The socketFactoryClass would be used for a https proxy connection during the login method,
so that JDBC could connect through a https proxy to Azure.
Actual behaviour:
The setting is ignroed
Error message/stack trace:
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host EXAMPLE_REMOVED, port 1433 has failed. Error: "null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:285)
at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2466)
at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:672)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2747)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2418)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2265)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1291)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:1257)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(SQLServerDataSource.java:85)
Any other details that can be helpful:
I am trying to fork and patch!
line 1685 is called and before the error on line 2418
socketFactoryClass = activeConnectionProperties
.getProperty(SQLServerDriverStringProperty.SOCKET_FACTORY_CLASS.toString());

JDBC trace logs

Reproduction code
ds.setSocketFactoryClass(LoggingSocketFactory.class.getName());
public class LoggingSocketFactory extends SocketFactory {
@Override
public Socket createSocket() throws IOException {
println("createSocket");
return super.createSocket();
}
@Override
public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
println(String.format("LoggingSocketFactory host %s port %d", host, port));
return null;
}
etc ....

Retro fit netty to a Socket extension / implementation and we should be good to go, I tried with the standard java.net.Proxy class, which didn't work and I couldn't tell what was going wrong I just got some high level error messages.
https://projectreactor.io/docs/netty/release/reference/index.html#_connect_and_disconnect
4.3. Writing Data
4.4. Consuming Data

Investigating

Hi Adligo,
I tried running a test app against SQL Server 2019 and 2017 with a LoggingSocketFactory the same as yours in your "Reproduction" step except with all the other overrides implemented with default implementation and println -> System.out.println.
It appears that the setSocketFactoryClass function is working just fine as I'm seeing several lines of "createSocket" until an 'Error: "Unconnected sockets not implemented...' error.
Could you provide a more complete reproduction so we get more clues as to why you are running into this issue?

Sure, as I debugged through the code I made this change;
com.microsoft.sqlserver.jdbc.TDS
private Socket getConnectedSocket(InetSocketAddress addr, int timeoutInMilliSeconds) throws IOException {
    assert timeoutInMilliSeconds != 0 : "timeout cannot be zero";
    String socketFactoryClass = conn.getSocketFactoryClass();
    //@Adligo a marker to track what I changed
    if (addr.isUnresolved() && socketFactoryClass == null)
        throw new java.net.UnknownHostException("A custom socketFactoryClass "
            + "MAY be used to connect through a Https proxy @see;\n" + ProxySocketFactory.class);
    selectedSocket = getSocketFactory(addr.getHostName() + ":" + addr.getPort()).createSocket();
    if (!selectedSocket.isConnected()) {
        selectedSocket.connect(addr, timeoutInMilliSeconds);
    }
    return selectedSocket;
}

Although I solve my actual issue in another way.  I was at a client site and as it turns out there was no proxy involved, I had simply been given the wrong server host name (SSMS vs JDBC) the host names MAY not be the same.
If you want to see the other code that I would contribute let me know, it is quite extensive change to the way proxying would work.

Hello,
We are closing this issue due to inactivity, if anyone encounters this again we can reopen.


GFYCat to GifDeliveryNetwork Fix ?

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2020.09.14
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-a', 'List.txt']
[debug] Batch file urls: ['https://www.reddit.com/r/NSFW_GIF/comments/f7ifa0/that_jiggle_with_every_pump/']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.09.14
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg git-2020-05-04-5767a2e, ffprobe git-2020-05-04-5767a2e
[debug] Proxy map: {}
[RedditR] f7ifa0: Downloading JSON metadata
[Gfycat] firmexcitablehorsechestnutleafminer: Downloading video info
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\YoutubeDL.py", line 2238, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

Description

Since the move from GFYCAT to Redgifs, some links now redirect to https://www.gifdeliverynetwork.com/ , Which makes the program to fail and not work anymore with that link because it redirects the GFYCat Link to gifdeliverynetwork.

For the above link I was able to customize the extractor so that it works. Then I tried a few different gfycat links from reddit. It seems to me, that at the moment only the links that are not recognized by the gfycat extractor, but redirected to the generic extractor, are working.
I rewrote the _valid_url in a test version of the extractor, that it doesn't recognize links anymore and uses the gerneric extractor instead. This seems to work so far.
If this is the case for all links, it might be best to remove the gfycat extractor completely.

For the above link I was able to customize the extractor so that it works. Then I tried a few different gfycat links from reddit. It seems to me, that at the moment only the links that are not recognized by the gfycat extractor, but redirected to the generic extractor, are working.
I rewrote the _valid_url in a test version of the extractor, that it doesn't recognize links anymore and uses the gerneric extractor instead. This seems to work so far.
If this is the case for all links, it might be best to remove the gfycat extractor completely.

That is awesome if it works. Mind sharing a test version of it working. Would be really nice.

Can you send me a link gfycat/gfycat link that works for you?
If I have a useful trial version that works with the link above, but keeps the old function, I will post the changes. Not everything works as it should yet.

It's been 8 Months, it seems this is still not working on the latest version. Any updates on this ?


[FEATURE] Update setProvider to be async and remove setProviderAndWait

Requirements
Overview
When setProvider was first introduced, OpenFeature didn't have support for provider initialization. It was expected that a provider was initialized prior to registering it with OpenFeature. Since then, OpenFeature has added support for initialization so that the SDK could have an awareness of the provider lifecycle and is able to emit events that developers can subscribe to. Unfortunately, this meant that a provider may not be available immediately after registration. To overcome this, developers could wait for the provider ready event to fire before performing flag evaluations. A method called setProviderAndWait was also added that returned a promise. The promise resolves when the provider is ready or is rejected if there's an error during initialization.
We've received feedback that setProviderAndWait behaves the way people expect setProvider to work. Also, setProviderAndWait is not a good name in JavaScript because it does not block a thread as the name implies. For these reasons, setProvider should be updated to behave like setProviderAndWait and setProviderAndWait should be removed. This will be a breaking change that will require a v2.0.0 of the server SDK.
Requirements

setProvider returns a promise that's resolved when the provider is ready or is rejected if the provider fails during initialization.
Remove setProviderAndWait
Update the documentation in the readme

Worth mentioning that this is how it works in the .NET SDK as well, since this change.


Support options in mix gradient

This PR refers to #3 and adds some basic commands to the gradient mix task.
Paths
We can select the target we want to type-check the following ways:

[x] The module

mix gradient -- Gradient.Fmt

[x] The .ex file

mix gradient -- lib/gradient/fmt.ex

[x] The .beam file

mix gradient -- _build/dev/lib/gradient/ebin/Elixir.Gradient.Fmt.beam

[x] The directory

mix gradient -- lib/gradient/

Supported commands:

[x] --no-compile - do not compile even if needed
[x]  --no-ex-check - do not perform checks specyfic for Elixir (from ElixirChecker module)
[x]  --no-gradualizer-check - do not perform the Gradualizer checks
[x]  --no-specify - do not specify missing lines in AST what can result in less precise error messages
[x] --no-deps - do not import dependencies to the Gradualizer
[x] --code-path -  provide a path to the .ex file containing code for analyzed .beam
[x]  --stop_on_first_error - stop type checking at the first error
[x]  --infer - infer type information from literals and other language constructs,
[x]  --verbose - show what Gradualizer is doing
[x]  --no-fancy - do not use fancy error messages
[x]  --fmt-location none - do not display location for easier comparison
[x]  --fmt-location brief - display location for machine processing
[x] --fmt-location verbose - display location for human readers (default)
[x] --no-colors - do not use colors in printed messages
[x] --expr-color ansicode - set color for expressions (default: cyan)
[x] --type-color ansicode - set color for types
[x] --underscore-color ansicode - set color for the underscored invalid code part
in the fancy messages

Other

[x] Provide tests for the options

Possible extensions

Support verbose in Gradient AST specifying module
Support a quiet option.

Good stuff!
Do we need the .beam files under test/ checked into the repo? There's quite a lot of them already as far as I can tell 🤔

Should I try to remove these files from the repo and compile them before tests if not exist?

Should I try to remove these files from the repo and compile them before tests if not exist?

Yes, I think so, but let's have another PR for that. This is good the way it is :+1:

Should I try to remove these files from the repo and compile them before tests if not exist?

Yes, I think so, but let's have another PR for that. This is good the way it is 👍

@erszcz I implemented such change here https://github.com/esl/gradient/pull/62

Awesome! Both these PRs look good, please merge in the order you think is better / easier to manage. Great job, thanks!


feat: Create generic selection-header for lists and tables

This PR is step 2 of creating a "bulk actions header" to the table. It:

extracts the core functionality of d2l-list-header into a separate d2l-selection-header
refactors d2l-list-header to inherit from the selection header, sprinkling in its own required changes
moves the header's sticky logic entirely internal, so it doesn't depend on lists specifically
updates the readme and demo to use the d2l-selection-header

There will be some changes required to the selection-header in order to implement the table-header, but I wanted to keep this PR's scope limited to just selection-header, and have a separate PR for the table header.
Step 1 is #2979, which improves the selection-observer mixin, and is required for the last few examples in this selection demo to work correctly.
Rally: https://rally1.rallydev.com/#/?detail=/userstory/668478189363&fdp=true

Okay, I need to improve how I'm detecting the sticky _scrolled state - it works fine when stuck to the viewport, but not within a scroll container. Will work on a fix.


short orders?

Is there plans to support short orders for the exchanges that support it?

Hi!
We already support all types of endpoints available with each exchange. So, basically, you can short already where it is supported. It's just that we don't support margin trading in the unified API. We don't have plans for unifying it for now.


Misc. changes

This does 5-ish things, all interspersed:

Switch Travis to container infrastructure (no benefit other than faster queuing AFAICT; the caching doesn't seem to add any speedup)
Change depends from [[Id]] to [Id] (not sure why it was [[Id]] in the first place)
Change Maybe to StoredValue, as in https://github.com/ndmitchell/shake/pull/389#issuecomment-168140073
General refactoring and test-fixing
Some initial work on making .Forward part of Shake Core (currently I'm trying to make ForwardQ Key work)

Feel free to cherry-pick as you see fit.

Thanks for the changes! A lot to pick through, but a few quick remarks/questions from what I've seen:

For Travis faster queuing is a bit nice, but the file looks far more complex. If I do decide to go that route I'd push the complexity into my Neil tool (https://github.com/ndmitchell/neil) and have much less in Shake - that way all my projects can share it. How much faster is the queuing? Is there some expiry date on the old stuff?

[[Id]] is very important, specifically to https://github.com/ndmitchell/shake/blob/master/src/Development/Shake/Database.hs#L312. If a rule does need [a]; b <- ... readFile' a; need [b] then you have to check if a needs rebuilding before you try speculatively rebuilding b, as the use of b may no longer be correct if a has changed. As a result I try rebuild checking everything in each pile of [Id] in parallel, but do the whole [[Id]] in series.

For StoredValue I'll do this as part of #389 at the same time, and hope to get to that tonight ideally.

What's the advantage of making Forward part of Core? At the moment it's deliberately off to the side since it doesn't rely on being intertwined with Core and provides a very different end-user experience.

What's the advantage of moving ShakeValue into Classes? Or do you think that just looks cleaner? (I'm somewhat inclined to agree, but wonder if there is more to it than that.)

For the Command and Docs test fixes, was there some circumstance in which they broke before? I haven't seen such failures in my testing, including on Travis/Appveyor, so would be keen to know if my testing is incomplete or something else is going on.

I've now pushed a comment about [[Id]], and a test that checks the observable behaviour that comes about as a result. Certainly something so important and subtle deserves a failing test if it breaks.

Well, the old stuff took a minute or two to queue, the containers take a few seconds. And I'm not sure it's slower; it could be faster (particularly if ninja is cached). You can delete the cache manually (from Travis) and from within the script but otherwise it doesn't expire AFAIK.
I see. I get "ab" on the test, which I guess means that both rules are run.
OK. I look forward to seeing what you do.
The cachedAction primitive that Forward provides is more general than newCache, I've been experimenting further if you look at the commits I pushed just now.
The Command test was broken on my system when I started; perhaps because '.' isn't in my path.
The Docs test was broken by exporting ShakeOptions from Rule; I'm not sure whether anything else would break it

Sounds like the Travis improvements are a good idea then. I'll probably take the code you've done and shove it back into the Neil project and branch it out from there.

The command test fixes make sense, thanks.

I guess the docs test fix follows one of your previous changes? that makes sense too.

So for the cacheAction, it seems like you want that to be available in the Core so you can implement Shake.Forward on top of it. Is that motivated by a particular use of cacheAction in a normal build system? Or are you trying to clean up the Forward stuff to avoid global IORefs?

Well, the goal is similar to @ezyang's in #382; I want to write a "forward-thinking" build system. basically to run a command and specify its input/output files, like so:
newtype BuildModule = BuildModule InputFile deriving (ShakeValue)
foo :: Rules ()
foo =
    rule $ (\BuildModule f) -> do
        (ghc, path) <- need (GHC, f)
        listOfOutputFiles <- cmd ghc f
        provide [map toFile listOfOutputFiles] -- borrowed from Pluto
    action (BuildModule "MyFile.hs")

Shake doesn't do anything like that at present, except in cacheAction, from what I've seen.

OK, I've started merging bits and pieces. There's a lot here, so I'm just trying to separate out the small fixes from the bigger pieces. Notes:

I've merged the ShakeValue stuff. Thanks.

The change to the Command test to account for . not being on $PATH was actually a bug in the test. That executable was meant to be located in a subdir, so that I could test things like changing the current directory and ensuring I still picked it up properly. That implicitly relied on the assumption that obj "" /= getCurrentDirectory, which is exactly what I started to change in #262. I've now fixed the test by pushing the test executable inside a directory, which hopefully fixes it for you too.

You have a patch that exports more things from Development.Shake.Rule, specifically things that are already exported from Development.Shake.Classes or Development.Shake. Any reason? My thought was to keep that to just the minimum "extra" things that people can only get from there, almost like an Internal module (but with more API stability and an expectation for people to use it for their own rules). Partly that's to have an easy to draw line (otherwise you keep wanting more and more things in there), and partly to keep the documentation short (only things you didn't know about before).

I experimented with the Travis scripts. I converted my neil template project over, so you can see the revised files at: https://github.com/ndmitchell/neil. Generally for the "shared infrastructure" between all my projects (e.g. the Travis script), I prototype it in neil and then share the code via that, so all my projects are doing the same Travis stuff in the same way. I am happy to take patches there, or for you to do it against Shake and I'll move the concepts over, as I did in this case.
I suspect caching makes no difference because you cached the ~/.cabal files, but missed the package config files which are in ~/.ghc. As a result the packages were there, but GHC/Cabal didn't know they were there, and ended up rebuilding. I implemented that (by simply caching both, and not worrying about invaliding it etc), and saved the 100s that the neil project typically spends installing dependencies. Definitely a win, if we move to the containers. Looking at the Shake timings, it would save 71s, so nice, but not earth shattering. In contrast, on Hoogle it's 569s and HLint it's 306s, so very useful for those projects, and when done generically in neil, it's "free" for Shake.
Unfortunately, there is a bit of a snag. On GHC 7.8.4 and later the builds take vastly longer than they did before. Looking at a dashboard at https://travis-ci.org/ndmitchell/neil/builds/108992902 I see GHC 7.4 and 7.6 take 2 minutes (about what the old system took), while the others are closer to 8 minutes. Doing a build and looking at it ticking, it seems the GHC compilation of the package in question goes vastly slower, but the dependent packages still go about the same speed. I have no idea why. Any thoughts? If that could be fixed I'd be ready to move to the new containers.

Flipping sudo back to true fixes the speed problems, but obviously then removes the ability to cache and fast queuing which would be useful. I've raised a Travis ticket: https://github.com/travis-ci/travis-ci/issues/5623

I'll deal with the introduction of an ADT in #389. Other than that, are there are small pieces you think should be taken from here? Or are we just left with the forward dependencies?
Assuming we're only left with the forward dependencies, I'm still not quite on the same page. There are forward driven build systems (e.g. Fabricate), and they have forward execution of everything. They essentially provide a script which runs in order, with caching of previously executed steps. I believe Development.Shake.Forward in repo provides a reasonable approximation of that. Is there anything you feel is missing?
There are also backward driven build systems, which start at the things you want to produce and run rules to get to the leaves. Shake is one such example, but so is Make etc.
I'm not sure if it's possible to combine forward and backward in one coherent build system which provides access to the features of both. In Shake you can certainly pick either, but currently both would probably have issues.
I see that Pluto has provide, but in their paper they mention the word provide 67 times, but only a handful of those refer to their provide function. I'm still lost as to how you implement it, what happens if the result is incoherent (e.g. two people claim to have provided the same thing), if you can run subsets of the build system to produce certain targets (I guess not without being able to statically evaluate the provides?). Do you have intuitions for these questions? (Even if not the same answers that Pluto arrives at, or pointers to the Pluto paper section if I just overlooked it.)
Assuming provide must not overlap (and that you must check that yourself), and that provide doesn't cause rules to be looked up, wouldn't needed work in place of provide in your example?

exporting more things from Development.Shake.Rule

My thought was to make every instance of Rule import from Development.Shake.Rule instead of .Core, which perhaps was overly ambitious. Re-exporting .Classes still seems fine to me (it adds 1 line to the haddocks and is very convenient) but perhaps the others should go away again.

Travis container building takes longer

Interesting; I have no explanation either. I'll limit my request to explicitly setting sudo: true in .travis.yml.

Are we just left with the forward dependencies?

There's a lot of refactoring between Core/Database. The stored / equal of Rule could be replaced with analyse :: key -> value -> IO (AnalysisResult value); do you have an opinion on that?

forward/backward distinction

Forward dependencies are more than just running a script. For example, cabal install js-flot produces .cabal/lib/x86_64-linux-ghc-7.10.3/js-flot-0.8.3-8Jf4CdemM2vD7PZsKaF5pA; you would never ask for that long hash directly, as is required in Shake's backward build system.

Is there anything you feel is missing?

I'd like the ability to make separate namespaces besides files; even phony rules seem like a bit of a hack at present.

Pluto has provide

They also use the term "generated files", which is more informative in searching. The build algorithm is on page 98. Comparing needed file dependencies with generated files, it seems that they have 2 extra features: they store a reference to the builder/rule that called them, and then throw a fatal error if another rule tries to provide them or if another rule tries to require/need them without first depending on the generating rule.

Re-exporting .Classes still seems fine to me (it adds 1 line to the haddocks and is very convenient)

Yep, seems reasonable, and also reexporting it from Development.Shake. Or perhaps, only Development.Shake? Having it in both is a tad unnecessary if Rule is just the "extra" bits. But practically, if it's in Development.Shake, then it's available to anyone defining rules anyway.

Interesting; I have no explanation either. I'll limit my request to explicitly setting sudo: true in .travis.yml.

I'm not aware of any weaknesses in the .travis.yml, other than lack of caching and slow startup, but both of those are inevitable with sudo:true. My hope is Travis will explain how to fix sudo:true and then I'll be able to incorporate your nice improvements.

The stored / equal of Rule could be replaced with analyse :: key -> value -> IO (AnalysisResult value);

I have been increasingly coming around to that point of view, and even to the idea that dropping the Rule class entirely is probably the ultimate direction. My description of AnalysisResult is quite different to yours though, I'll try and finish my thoughts and write them down somewhere, and then we can figure why/how they differ, and if either can be enhanced by the other.

For example, cabal install js-flot produces .cabal/lib/x86_64-linux-ghc-7.10.3/js-flot-0.8.3-8Jf4CdemM2vD7PZsKaF5pA; you would never ask for that long hash directly

Indeed. In a backward build system I guess you'd have a node that represents js-flot-0.8.3 and that would generate a stub, plus the hash version. I'll have a think and try and describe exactly the pattern I would encourage for that. It may turn out to be roughly what you are imagining. Even if not, writing down my way of faking it seems valuable.

I'd like the ability to make separate namespaces besides files

Each key lives in a separate namespace already. Or is the point that files and other string-like keys live in the same namespace but are different? I think #192 might be what I think of as a solution to this.

Pluto provide stuff

I think needed plus lint checking does everything you describe. Having provide as a separate function to be semantically clearer might be valuable even if it's an alias for needed. Having provide do the little bit of the lint check relevant to this file would be good though, and mean errors got thrown at the right point. Thanks for the links, I'll follow them.

Looking into it, the reason I don't reexport all the type classes by default is mostly because Binary contains a get method and thus clashes with the State monad. I'd rather my code didn't clash with the state monad by default. Given that information, I think not exporting is the right choice - I've noted that in the Classes module (I suspect I've rediscovered this more than once).

they have 2 extra features: they store a reference to the builder/rule that called them, and then throw a fatal error if another rule tries to provide them or if another rule tries to require/need them without first depending on the generating rule.

Checking into the details, needed does indeed provide that. Tweaks that could be made: a provides (I think the pluralisation seems right here) function to make the semantic intent clearer; needed currently only checks if shakeLint is turned on, that seems wrong; error messages need expressing in terms of provides not needed; if you generate twice it says it changed but not built twice (although the lint feature does do that if we trackWrite); provides should call trackWrite.
I note that the Pluto check contains a weakness in that if you never require the rule that calls provides then you never know that another rule missed calling it. That seems a fundamental limitation of any build system that doesn't rebuild everything and has opaque function (e.g. EDSL), so I don't see how they or Shake can do any better.
Thinking about it, I wonder if lint should be the default? Catching difficult errors is good, and I could check how high the performance penalty really is.

I note that the Pluto check contains a weakness in that if you never require the rule that calls provides then you never know that another rule missed calling it

If you remove generated files from version control, then clean builds of the rule will fail because the file doesn't exist. It's then a matter of policy as to what's considered "generated" and occasionally doing clean builds (or FSATrace) to catch stray files.

@Mathnerd314 - good point, that does seem to answer most of the problems - I don't think it's a problem in practice.

Each key lives in a separate namespace already. Or is the point that files and other string-like keys live in the same namespace but are different? I think #192 might be what I think of as a solution to this.

apply_ is impossible to implement. My plan is
newtype PhonyQ = Phony String
newtype FileQ = <current file type>

etc. (newtypes for every namespace), and a function String -> Maybe Key in the Rule class for parsing command line arguments.

Nice idea, I think I prefer that to my formulation...

I'm now starting to think the original apply_ formulation is better... But I'm definitely wavering, trying to understand all the details.
I'm sorry it's taking so long to process all the things you've come up with - I do appreciate all the pieces, and it makes me glad to know that someone manages to understand the internals (significantly reduces the bus factor of Shake). For info, I've got a paper deadline Tuesday, then another one 16th March, but hope to fit in some of the backlog between then and all of it afterwards.

Just so you're are of my current thoughts, I wanted to get 0.15.6 out (now done) and then as part of 0.16 I intend to break the Rules instance, which gives us more freedom to incorporate some of these changes. I'll be working on that over the next few days - expect a ticket with my proposed outline to go up shortly (I'll mention you in it).

Sounds fine. I'm watching the repository though, no need to @mention me.

I think all the pieces were upstream, with the exception of the Forward changes. For that, you have generalised cacheAction to be polymorphic, and relied on registerWitness. Inspired by your code, I changed how it worked so it stores the underlying ByteString and only decodes when a user asks for it, which means I don't need to registerWitness. The downside is it's probably less efficient, but if this approach is popular we can figure out how to make it efficient (I have a few ideas).


Billing Dialog

A compose version of my billing dialog from https://github.com/MFlisar/MaterialDialogs
Code: https://github.com/MFlisar/MaterialDialogs/tree/main/dialogs/billing/src/main/java/com/michaelflisar/dialogs
Currently I don't need it so I did not convert it yet...

it works with my KotBilling library and is too easy and probably rare so this won't be migrated here


Font Fallback

Introduces real honest to goodness font fallback

This is now working great and has some font positioning fixes besides, but has one remaining bug where the dividers between windows isn't being rendered correctly. I honestly have no idea what is causing this...


[Request] Please support vue syntax

highlightJs.configure({
  languages: ['js', 'html', 'vue'],
})

i can use it like this
```vue
```

https://github.com/highlightjs/highlightjs-vue
Someone should make sure it's still compatible with v11 and if so we should add it to SUPPORTED_LANGUAGES, not sure why it's not on the list already.

thanks


Prevent form submission untill files finished uploading

I've come across abit of an interesting unintended consequence of the images block (well the images_extended block, but the issues the same for both).
You can cause issues with your back end (phnar, phnar) by submitting the Sir trev data before an image has finished uploading and the block has received the uid, url and newFile name.
Would it be possible to block submission until uploads have completed? (In the same way that required blocks behave?).
This is more of a usability issue than an outright bug but I'd be interested to see what the general consensus is.

Not sure what version you're on, but agree, prehistoric versions used to
just disable the form (and show a "please wait, uploading" notice or
something similar near the save button) until complete (or failed)
On Thu, 16 Jun 2016 at 09:22, Chris Monkman<EMAIL_ADDRESS>wrote:

I've come across abit of an interesting unintended consequence of the
images block (well the images_extended block, but the issues the same for
both).
You can cause issues with your back end (phnar, phnar) by submitting the
Sir trev data before an image has finished uploading and the block has
received the uid, url and newFile name.
Would it be possible to block submission until uploads have completed? (In
the same way that required blocks behave?).
This is more of a usability issue than an outright bug but I'd be
interested to see what the general consensus is.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/madebymany/sir-trevor-js/issues/477, or mute the
thread
https://github.com/notifications/unsubscribe/AAlzblvUBrZCJDe3GinqHpAlQQEGafHuks5qMQfdgaJpZM4I3I1g
.

Still running v0.5.0, I know I need to move onto v0.6.0 at some point but i've been using the columns block and as of yet it's not been moved over (and I haven't had the time to sit down and look at what would need to be done to pass over the changes between Sir trev and the Mr Trev project that's required for said column block, lazy of me I know but I haven't had the time to go over it).
I do see the uploading spinner but there's no sign of 'please wait' just a warning if it fails to upload correctly.

@SgtOddball oh that should all 'just work'. Famous last words. Likely the button isn't being matched with some javascript, or Mr Trevor is from before it was implemented correctly.

Ahh, I think it might be that it's not hitting the javascript catch all then. In fairness I have tweaked the hell out of the image block so it might be to do with that.
I'll have a check on the latest version of Sir Trev in the near future and see if it's still the case, then add the custom blocks and see what happens.


Can I download images as other types of files besides png jpg？

When I finish labeling a file, I want to download it as another type of file Like(BMP,TIFF).

We support what the browser natively provides: JPEG and PNG
Anything else would likely require a 3rd party dependency and converting from one of those two sources, or encoding using the raw pixel data.

Another thing i can not use some tools  (angle,ellipticalRoi,rectangleRoi),Is it necessary to use these tools in specific situations.

The tools don't work, or you're not aware of their use cases for radiologists?

Now,First question i just extention two options(bmp,tiff) in download file type options,it seems work.
:-D


Create Arch Linux install script for Gamer OS

Can you make an Arch install script for a Gamer OS install with a normal Arch install so I could also use it for non-game stuff occasionally?

I already did an effort,

main script :  https://github.com/Thijzer/archinstaller/blob/main/build.sh
repo : https://github.com/Thijzer/archinstaller

This repo is still a in development.
It doesn't include the frzr or btrs parts, just regular EXT4
I was able to build a provision in image mode but the script mode is untested

I already did an effort,

main script :  https://github.com/Thijzer/archinstaller/blob/main/build.sh
repo : https://github.com/Thijzer/archinstaller

This repo is still a in development.
It doesn't include the frzr or btrs parts, just regular EXT4
I was able to build a provision in image mode but the script mode is untested

I found this kind of funny since this is how GamerOS started out. There is still an old branch where you can obtain the original installation script, but I have no idea if it still works: https://github.com/gamer-os/gamer-os/tree/arch_installer
I have a few other recommendations though:

you can fork the GamerOS repo and edit the manifest file to add any additional packages you like, then enable Github Actions on your fork to have Github build the image for you. Finally, install GamerOS, then from the command line run sudo frzr-deploy leocodeninja/gamer-os:unstable to install your fork. Any time you make changes Github will automatically build a new image and your system will update to it.
Install GamerOS, then run sudo frzr-unlock and sudo pacman -Syy, finally run systemctl disable frzr-autoupdate to prevent the system from reverting back to the locked down version of GamerOS in a future update. Now you have a full Arch Linux system, but you will miss out on future GamerOS updates.

I found this kind of funny since this is how GamerOS started out. There is still an old branch where you can obtain the original installation script, but I have no idea if it still works: https://github.com/gamer-os/gamer-os/tree/arch_installer
I have a few other recommendations though:

you can fork the GamerOS repo and edit the manifest file to add any additional packages you like, then enable Github Actions on your fork to have Github build the image for you. Finally, install GamerOS, then from the command line run sudo frzr-deploy leocodeninja/gamer-os:unstable to install your fork. Any time you make changes Github will automatically build a new image and your system will update to it.
Install GamerOS, then run sudo frzr-unlock and sudo pacman -Syy, finally run systemctl disable frzr-autoupdate to prevent the system from reverting back to the locked down version of GamerOS in a future update. Now you have a full Arch Linux system, but you will miss out on future GamerOS updates.

I am not going to actually create a script to do this and maintain it though, sorry.

I am not going to actually create a script to do this and maintain it though, sorry.


[WIN·FEATURE]  Export setuptools shims into a single 'bin' directory

It is a pain to add each new jail's Scripts directory to the PATH.
Thus, in case a %LOCALAPPDATA%/bin directory exists, copy the Scripts/*.exe shim into it (or better yet symlink it, yes Windows supports that by now). This is the same thing as putting symlinks into ~/.local/bin on POSIX.
That makes setting up a proper PATH a one-time thing.

I see you made a few commits to fix it. Looks great! Are you going to make a PR?


Consider renaming the repo to be consistent with the bower name

The bower name (and also Rails assets name) is react-date-picker (react-datepicker was already used). It would be better to have consistent naming between this repo and our names we're using for our component.

Have you guys thought anymore about this? It's especially confusing given react-date-picker is something different on React Components.

Haven't really thought about it, no. We're open for suggestions! I agree that it's confusing, so let's do some brainstorming:

react-datey
react-date-input
react-date-selector

What do you think?

Not a priority right now


[embeddingapi][XWALK-3784] create a pack script to support gradle and maven build

Thanks,  merge this PR,
Pls report bug for the issues to blocking build.

@jiajiax Pls help to try the embedding API pkg(embedding-api-android-tests) build with maven, and gradle method.
We will release embedding-api-android-tests with all these 3 build methods(ant, maven, gradle).


Add an example of ID filter use to the API documentation

Enhance the hello world with filter setup so that received frames with specific IDs get tagged with a filter index which is printed out.


feat: edit profile functionality

It is validated, when entering using the provider user, enters the profile, displays a form, and loads the user information, and allows saving and canceling.

Allows user image to be uploaded

⚠ Cancellation and save confirmation validations were not found


Use verificationProgress rather than count blocks

This PR changes the API to use the verificationProgress returned from the bitcoind gRPC rather than calculating the remaining number of blocks

resolves https://github.com/getumbrel/umbrel/issues/243

Looks great!
Have you setup Docker Hub builds?
If so, can you give me your Docker Hub username.
If not, would you be able to set it up? It allows us to easily test your changes.
You just need to add the Docker Hub credentials here to your GitHub repo from here:
https://github.com/EddWills95/umbrel-middleware/blob/243_bitcoin-sync-progress/.github/workflows/on-push.yml#L20
https://github.com/EddWills95/umbrel-middleware/blob/243_bitcoin-sync-progress/.github/workflows/on-push.yml#L51
So add the following secrets to your fork:
DOCKER_HUB_USER your Docker Hub username
DOCKER_USERNAME also your Docker Hub username
DOCKER_PASSWORD a new API token that you can create in your Docker Hub account
Then each time you push to a branch on your fork a new Docker image will be published on Docker Hub at $DOCKER_HUB_USER/middleware:$BRANCH_NAME that anyone can pull down and test.


Stats about new contributors

During our community meeting at Orchard Core on the topic of integrating this action (https://github.com/OrchardCMS/OrchardCore/issues/14585) it came up that it would be nice to have stats about new contributors as well.
I.e., in an issue like https://github.com/OrchardCMS/OrchardCore/issues/15073, we'd also have a "Number of items opened by new contributors" line in the aggregated metrics table. A new contributor can be defined as somebody who GitHub indicates as a first-time contributor like this:

I'm not sure how this is calculated. In any case, this would be a user who didn't yet author a contribution of that type (e.g., didn't open an issue before and thus they're a new contributor for issues) or didn't create any issues/discussions/PRs before in the project (whichever is easier to compute).
What do you think?

This seems like it could be accomplished. While there isn't an API endpoint to tell us if the user is contributing for the first time, I see that there are other projects like this one that accomplish this by checking to see if the issue/pr author has any other issues/prs in that repo previously.

Great! It seems it's doable for each contribution type separately, then.

Well, we at Orchard Core are still interested in this.

I would be very interested in this metric too! I run a small open source iOS app that I created fro Hacktoberfest last year, and I had 50 contributors in a month! I would love to be able to make weekly reports where I can see how many new contributors I have each week


New Blogs

Description
October blogs

[x] Busra
[x] Airat

Change Type

[ ] Bug Fix
[ ] New Feature
[ ] Code Refactor
[ ] Mentor Update
[x] Data Update
[ ] Documentation
[ ] Other

Related Issue
resolves #355 #354
Screenshots

Pull request checklist
Please check if your PR fulfills the following requirements:

[x] I checked and followed the contributor guide
[x] I have tested my changes locally.
[x] I have added a screenshot from the website after I tested it locally

@goelsonali please help review the blogs if possible, they are quite lengthy and you have a keen eye that catches errors I sometimes miss! Thank you! 🙏


[SPARK-45799][SQL] Remove some unused method in QueryExecutionErrors & QueryCompilationErrors

What changes were proposed in this pull request?
The pr aims to clear some unused method in QueryExecutionErrors &QueryCompilationErrors and related error classes in error-classes.json.
Why are the changes needed?
Make code clear.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass GA.
Was this patch authored or co-authored using generative AI tooling?
No.

@panbingkun Could you remove hiveCreatePermanentFunctionsUnsupportedError and _LEGACY_ERROR_TEMP_1221 since you are here, please.

@panbingkun Could you remove hiveCreatePermanentFunctionsUnsupportedError and _LEGACY_ERROR_TEMP_1221 since you are here, please.

Sure, done.


MySQL: rust enum not compatible with SQL ENUM

Hi,
I've hit an issue with ENUMs in MySQL and, after reviewing docs and issues here, I can't find anything that helps with this particular problem. Basically, the error says that type 'ENUM' is not compatible with type 'ENUM':
error occurred while decoding column \"kind\": mismatched types; Rust type `...::IssueKind` (as SQL type `ENUM`) is not compatible with SQL type `ENUM`

The relevant (abridged) code is this:
#[derive(sqlx::FromRow)]
pub struct Issue {
    pub id: IssueId,
    pub env_id: EnvId,
    pub date: Date,
    pub kind: IssueKind,
}

#[derive(sqlx::Type)]
#[sqlx(rename_all = "snake_case")]
pub enum IssueKind {
    TypeOne,
    TypeTwo,
    TypeThree,
}

pub async fn find_by_env_date(env_id: EnvId, date: Date) -> Result<Vec<Issue>> {
    Ok(
        sqlx::query_as::<_, Issue>("SELECT * FROM `issue` WHERE `env_id` = ? AND `date` = ?")
            .bind(&env_id)
            .bind(&date)
            .fetch_all(&ConnPool::clone())
            .await?,
    )
}

The DB schema looks like this (again, abridged):
CREATE TABLE `issue` (
  `id` int(11) UNSIGNED NOT NULL,
  `env_id` int(11) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `kind` enum('type_one','type_two','type_three') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

This was happening with v0.5.1 and is still happening after upgrade to v.0.5.4
I'm guessing that I have hit a fairly obscure issue, or that I'm missing something pretty basic.
Any help would be appreciated.
Regards,
Alfonso

Ok, I think I know where the issue comes from.
In sqlx the ENUM type is defined as having char_set 63 (binary), which is what the compatible() method is testing against.
My ENUMs have a charset/collation of utf8mb4_general_ci, the database default; and that's what I think is causing the compatibility check to fail.
However, if I change the column's collation to binary (type still ENUM) then the error is still there, but different:
Rust type `...::IssueKind` (as SQL type `ENUM`) is not compatible with SQL type `BINARY`

I'm using MariaDB 10.5.10 - not sure if that's the reason for sqlx no getting the data it expects.
I hope this helps somewhat.
Regards,
Alfonso

I ran into a similar error message last week. The solution to my issue was to specify the Rust enum type in the query. My column was also named kind. Would something similar work for you?

Thanks for your input @euphbriggs!
However, I believe that syntax is only usable in query_as!() macro, not so much in the method.
From the errors that I'm getting it seems to me that sqlx is identifying the rust type fine, but there is a mismatch between the ENUM config for that type and the one for the column coming from the DB.

I did some more digging and this is what I can see.
The DB server (or at least my version) is sending a ColumnDefinition for the ENUM column with type=String, enum_flag=true and char_set=utf8 - the default for DB/table (these are not actual field names).
In sqlx, the reference definition of an Enum type (in MySqlTypeInfo::__enum()) is type=Enum, binary_flag=true, char_set=63 (binary).
Obviously, when they are compared for compatibility it fails and throws the error.
The reason that the error says "ENUM is not compatible with ENUM" is that the method that translates the column type into its name (ColumnType::name()) returns "ENUM" if type=Enum OR if type=String and enum_flag=true. So both the reference Enum column type and the one coming from the server yield "ENUM" as the name, even though they have different definitions.
Unfortunately, the method that decides if the two types are compatible checks if the two type fields are the same, which in this case are not.
So the two types have a different definition but the same name. The compatibility check fails - though it shouldn't - and it prints that two types with the same name are not compatible.
I hope this helps somebody decide what's the correct fix for this issue.
Unless my server is a very peculiar version of MariaDB, I would be surprised if this use case is working for anybody.
Cheers,
Alfonso

It's funny though, with all the types and memory safety building a good ecosystem in rust is so difficult, I mean this is trivial, it takes a query and runs and unmarshalls it. And there are 100s of issues in a library as such.
Even a shoddy language like go-lang does it pretty well.
As long as I was writing rust in my own bubble, cli apps and drivers it was all fine. And those solve very niche issue. And surprisingly when coming to web apps, a simple database integration is so difficult.

Also faced similar issue:
 ColumnDecode { index: "\"template_type\"", source: "mismatched types; Rust type `template::app::model::TemplateType` (as SQL type `ENUM`) is not compatible with SQL type `ENUM`" }

#[derive(Serialize, Deserialize, Clone, Debug, EnumString, ToString, Type)]
// #[sqlx(rename="template_type", rename_all = "snake_case")]
pub enum TemplateType {
    Email,
    Pns
}

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Template {
    pub tname: String,
    pub template_type: TemplateType,
    pub created_at: DateTime::<Utc>
}

One way to solve this is to overwrite the FromRow trait as such.
impl <'r>FromRow<'r, MySqlRow> for Template {
    fn from_row(row: &'r MySqlRow) -> Result<Self, MysqlError> {
        let tt: String = row.try_get("template_type")?;

        let template_type = match TemplateType::from_str(&tt) {
                Ok(t) => t,
                Err(_) => TemplateType::Email,
        };

        return Ok(Template{
            tname: row.try_get("tname")?,
            template_type: template_type,
            created_at: row.try_get("created_at")?
        });
    }
}

The to_string and from_str are methods from strum package, which converts enums to string and vice versa.

Thank you for the workaround @amitavaghosh1
In fact, if you use the macro version (query_as!), and set the right types for your enums, the error doesn't come up. My guess is that it uses a different logic to check compatibility between data from DB and rust types - since the check is at compile time.
However, the issue remains that, for the query_as() method, sqlx fails to correctly detect that the data coming from the DB is an enum and that it matches the type in the struct.
Regards,
Alfonso

Right, but the problem with using query_as is it's dependent on one DATABASE_URL , but most of the time there are multiple database connections. Encoding type could be a issue, Not sure.
Once I write a library such as this, probably will understand the issue better enough to contribute

I think I am running into the same problem when I am using query_as (The function not the macro).
I tried to use derive(sqlx::Type) on my MySQL ENUM type but got errors at runtime such as:
mismatched types; Rust type `DataType` (as SQL type `ENUM`) is not compatible with SQL type `ENUM`

Is this supposed to work or am I doing something wrong? I would be really convenient if it worked as it avoids a lot of boilerplate for manual trait implementation.

Following the in code comments saying this page was followed for ColumnType, the page points out that the charset is dynamic and not hard coded to binary 63 but that page is misleading around what ColumnType will be sent if you follow the linked page shows that even thought enum is it's own type, behind the scene the enum is mapped to the string protocol before being sent. That lead to r@#type being ColummType::String for enums. Here the docs outline that Enums will have the Enum flag.
I pulled the repo, and made the following changes then it started working just fine for me.
sqlx/sqlx-core/src/mysql/type_info.rs  new hard coded values to match my database
#[doc(hidden)]
    pub const fn __enum() -> Self {
        Self {
            r#type: ColumnType::String, //[I belive this is always correct](https://dev.mysql.com/doc/internals/en/binary-protocol-value.html)
            flags: ColumnFlags::ENUM, //[I belive this is always correct ](https://dev.mysql.com/doc/c-api/8.0/en/c-api-data-structures.html)
            char_set: 224,   //[I belive this may need to be done dynamically, or change db charset](https://dev.mysql.com/doc/refman/8.0/en/charset-mysql.html)
            max_size: None,
        }
    }

Cargo.toml   path may differ
[patch.crates-io]
sqlx = { path = '_sqlx_' }

Running into this issue in 2023:
    mismatched types; Rust type `DataType` (as SQL type `ENUM`) is not compatible with SQL type `ENUM`

Version: 0.6.2
Has any progress been made on this issue?

@khumps Considering that this issue has received no input from the crate maintainers in the two years it's been here, I have a feeling it's not a priority to get this particular thing working right.

It's not a great solution, but we use a mapper function with try_get_unchecked to get around this, and rely on integration tests to catch mistakes 😬
For example:
fn map_user_entity(row: PgRow) -> Result<UserEntity, sqlx::Error> {
    Ok(UserEntity {
        id: row.try_get("id")?,
        email: row.try_get("email")?,
        user_status: row.try_get_unchecked("user_status")?,
    })
}

let user = query
    .try_map(map_user_entity)
    .fetch_one(&self.db)
    .await?

I think this is the issue I just had. I kept getting this error:
Database(MySqlDatabaseError { code: Some("HY000"), number: 1210, message: "Incorrect arguments to mysqld_stmt_execute" })', src\api\clients.rs:242:51

And eventually I narrowed it down to one of my enums not being properly converted into a string.

/// There are two types of clients, based on their ability to maintain the
/// security of their client credentials.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, sqlx::Type)]
#[sqlx(rename_all = "lowercase")]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum ClientType {
	/// A client that is capable of maintaining the confidentiality of their
	/// credentials, or capable of secure client authentication using other
	/// means. An example would be a secure server with restricted access to
	/// the client credentials.
	Confidential,
	/// A client that is incapable of maintaining the confidentiality of their
	/// credentials and cannot authenticate securely by any other means, such
	/// as an installed application, or a web-browser based application.
	Public,
}

impl Display for ClientType {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		f.write_str(match self {
			Self::Confidential => "confidential",
			Self::Public => "public",
		})
	}
}

@alu That is useful information. I just realized that the code I posted before isn't the full code that I wrote. If it helps, here's the rest of it.
/// There are two types of clients, based on their ability to maintain the
/// security of their client credentials.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum ClientType {
	/// A client that is capable of maintaining the confidentiality of their
	/// credentials, or capable of secure client authentication using other
	/// means. An example would be a secure server with restricted access to
	/// the client credentials.
	Confidential,
	/// A client that is incapable of maintaining the confidentiality of their
	/// credentials and cannot authenticate securely by any other means, such
	/// as an installed application, or a web-browser based application.
	Public,
}

impl Display for ClientType {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		f.write_str(match self {
			Self::Confidential => "confidential",
			Self::Public => "public",
		})
	}
}

impl FromStr for ClientType {
	type Err = ();

	fn from_str(s: &str) -> Result<Self, Self::Err> {
		match s {
			"confidential" => Ok(Self::Confidential),
			"public" => Ok(Self::Public),
			_ => Err(()),
		}
	}
}

impl sqlx::Type<MySql> for ClientType {
	fn type_info() -> MySqlTypeInfo {
		<str as sqlx::Type<MySql>>::type_info()
	}
}

impl sqlx::Encode<'_, MySql> for ClientType {
	fn encode_by_ref(
		&self,
		buf: &mut <MySql as sqlx::database::HasArguments<'_>>::ArgumentBuffer,
	) -> sqlx::encode::IsNull {
		<String as sqlx::Encode<MySql>>::encode_by_ref(&self.to_string(), buf)
	}
}

impl sqlx::Decode<'_, MySql> for ClientType {
	fn decode(
		value: <MySql as sqlx::database::HasValueRef<'_>>::ValueRef,
	) -> Result<Self, sqlx::error::BoxDynError> {
		<&str as sqlx::Decode<MySql>>::decode(value).map(|s| s.parse().unwrap())
	}
}

impl From<String> for ClientType {
	fn from(value: String) -> Self {
		// TODO banish this abomination back to the shadows from whence it came
		value.parse().unwrap()
	}
}

Another workaround is just to cast it as signed:
#[derive(sqlx::Type)]
#[repr(i32)]
pub enum Size {
    Small = 1,
    Medium = 2,
    Large = 3,
}

#[derive(sqlx::FromRow)]
struct Shirt {
    size: Size
}

sqlx::query_as::<_, Shirt>("select cast(size as signed) size from shirts")"

If anyone else is still struggling with this, I made a macro which implements the same things #[derive(sqlx::Type)] does, using std::mem::transmute:
/// Implement `sqlx::Type`, `sqlx::Encode` and `sqlx::Decode` for values that can be safely
/// transmuted to another `sqlx::Type`, but can't use `#[derive(sqlx::Type)]` i.e. Nested enums.
#[macro_export]
macro_rules! impl_sqlx_type {
    (<$db:ty> $in_ty:ty as $out_ty:ty) => {
        impl sqlx::Type<$db> for $in_ty {
            fn type_info() -> <$db as sqlx::Database>::TypeInfo {
                <$out_ty as sqlx::Type<$db>>::type_info()
            }

            fn compatible(ty: &<$db as sqlx::Database>::TypeInfo) -> bool {
                <$out_ty as sqlx::Type<$db>>::compatible(ty)
            }
        }

        impl sqlx::Encode<'_, $db> for $in_ty {
            fn encode_by_ref(&self, buf: &mut <$db as HasArguments<'_>>::ArgumentBuffer) -> IsNull {
                #[allow(clippy::transmute_ptr_to_ptr)]
                let out: &$out_ty = unsafe { std::mem::transmute(self) };
                <$out_ty as sqlx::Encode<$db>>::encode_by_ref(out, buf)
            }
        }

        impl sqlx::Decode<'_, $db> for $in_ty {
            fn decode(value: <$db as HasValueRef<'_>>::ValueRef) -> Result<Self, BoxDynError> {
                <$out_ty as sqlx::Decode<$db>>::decode(value)
                    .map(|v| unsafe { std::mem::transmute(v) })
            }
        }
    };
}

Usage is i.e.:
impl_sqlx_type!(<Sqlite> EventType as u32);

In this case, EventType is a nested enum:
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[repr(u16)]
pub enum EventType {
    Common(CommonEvent),
    DB(DBEvent),
}

Where the types nested within it are also enums:
#[derive(sqlx::Type, Debug, Copy, Clone, Eq, PartialEq)]
#[repr(u16)]
pub enum CommonEvent {
    Created,
    Destroyed,
}

This is only useful if your type can be safely transmuted to another type which already implements sqlx::Type.

Tentatively closed by #2652, feel free to open a new issue if this is not fixed.


Added Dynamic copyright_year to auto fetch the current year

Pull Request
Title

Description

Description:
This PR enhances the footer section of the website by adding the current copyright year, which is fetched dynamically. This ensures that the copyright year will always be up-to-date without requiring manual updates each year.
Changes:

Footer HTML: Updated the footer to include a placeholder for the copyright year.
JavaScript: Added a script to fetch the current year dynamically and insert it into the footer.
CSS: Ensured that the styling of the footer remains consistent with the new dynamic content.
]

Related Issues

fixes #90
Changes Made

feature + bug
Checklist

[X] I have tested the changes locally
[ ] Documentation has been updated (if necessary)
[ ] Changes are backward-compatible

Screenshots (if applicable)

Additional Notes

@subinoybiswas please review this pr


Save error due to file permissions

VSCode Version: 1.12.1
OS Version: macOS Sierra v10.12.4

If saving a file produces access/permission error, VSCode should prompt for macOS password (just like Sublime Text).

// fyi @bpasero

This issue has already been reported. Please use the search function next time before reporting an issue and/or this time if you are curious about the progress of the issue.


It would be helpful to have some automated acceptance tests for Crisis Checking.

In order to ensure that regression bugs are not introduced, it would be nice to have a suite of automated acceptance tests. I strongly suggest using Canopy to create and run the tests.
If you are not familiar with Canopy, it is an F# DSL that uses the Selenium Web Driver infrastructure. So it gives you all of the power of Selenium with an easy to use and easy to maintain scripting environment. You don't need to know much F# to get started, but you have the full power of F# available to you.
All you need to run Canopy is an F# console application with the Canopy NuGet package installed and a browser with web driver plugin installed. Firefox comes with web driver installed automatically, so you might already have it. The other browsers require you to install something. For a full description of getting started, see the GitHub documentation here: http://lefthandedgoat.github.io/canopy/
I have created a few samples of what it would look like to use Canopy with Crisis Checkin. (https://github.com/pottereric/CrisisCheckinCanopyTests) I would love to build out a useful set of acceptance tests.

@pottereric I'd welcome a PR that included those samples. Let's start with a small prototype so that we can run one or two tests.
We've just included AppVeyor to run all tests on a pull request when it's submitted. We are going to add that to Crisis Checkin as well, and it will be great to include a stronger set of feature wide acceptance tests as well.


[release-calendar] add api call getPromotions

Why we need a .getPromotion() : getPromotion will be used by the client side to query for the history of all releases. Then getEvents will sort each part of the history into channels so that when a channelRow is selected, all the releases which have ever passed through that channel will be displayed- this is the main utility of ChannelTable.
-Adds getPromotions() to api-service
-Adds getPromotions() to the set of db queries which joins promotion and releases together and sorts by descending promotion.date
-Adds Promotion class to view-models so that client side will recognize promotions
-Adds converting function to convert promotions to EventInputs
-changes getEvents() into a more generic function with a parameter of EventInput instead of only releases

all the releases which have ever passed through that channel will be displayed- this is the main utility of ChannelTable

Is it? I thought ChannelTable was only displaying the current release. I can imagine this table being extremely long if you are displaying every promotion ever.

all the releases which have ever passed through that channel will be displayed- this is the main utility of ChannelTable

Is it? I thought ChannelTable was only displaying the current release. I can imagine this table being extremely long if you are displaying every promotion ever.

In the table row, only the most current releases is labeled

But when the row/channel is selected, then all the history of the releases that have passed through will be shown on the calendar.

Actually this is a better illustration.

I see. So you're loading the entire promotion table on app start. Then on select, you are passing the channel's promotion data to the calendar component, right? Do you see any pros or cons to that?

I assume you're pointing out how much data this is to be querying.
Possible solutions:

adding a limit query.
only sending the request when someone clicks on a row of the ChannelTable for the first time
moving all the data off the app component and straight into Calendar


base_path option to RTMP module

We are currently using the RTMP feature and have successfully streamed from OBS to the server.
Is there a way to add a prefix to the RTMP URL, similar to the API base_path? For example, we want the RTMP URL to be rtmp://<IP_ADDRESS>/{some_prefix}/{stream_name} instead of rtmp://<IP_ADDRESS>/{stream_name}. If not, is there any existing configuration or workaround that we could use to achieve this?

What the reason for adding prefix to rtmp link?


End to End Testing for zOS

Documentation Discrepancies :

Readme missing to describe the BOM Level https://github.com/cloud-native-toolkit/automation-solutions/tree/main/boms/infrastructure/ibmcloud/zos-dev
BOM links are broken https://github.com/cloud-native-toolkit/automation-solutions/tree/main/boms/infrastructure/ibmcloud/zos-dev/files
Make sure runtime Colima runtime is replaced with docker or multipass based on today announcement (https://gsicsi.slack.com/archives/C039DRPL77U/p1660840741635939)

As per discussion with sean, we are NOT expecting the README BOM links to be working inside the Files Folder.

Purpose of this BOM links to be working in the published automation folder such as automation-integration-* , automation-turbonomic-***


[FACEIT] 404 on match room

Describe the bug
Opening the match room link in most recent matches returns a 404
Link it gave - https://www.faceit.com/{lang}/csgo/room/1-774a7cbb-8361-4b2f-a609-ac0649ca872d
Match room link - https://www.faceit.com/en/csgo/room/1-774a7cbb-8361-4b2f-a609-ac0649ca872d/scoreboard
Looks like it's trying to figure out the language of the site to load it in and not finding it? I'm not sure though

Which command exactly was this?

I did "!faceit profile" for my profile and then clicked the swords react for most recent matches, went to look at my recent match and that was the match room link that came out

I've still not been able to repo this, I'll have another look over the weekend

fixed in cfe685e
apologies


Adding support for custom/internal annotations to the generated sources via code-gen.

Context:
This issue stems from - #385.
The goal is to add inline directives that can be leveraged as part of code-gen lifecycle to add customized annotations on generated sources. We have put together a PR in place that can generate customized annotations via inline directives in the schema. https://github.com/Netflix/dgs-codegen/pull/386
As per the previous comment from @srinivasankavitha
@Shalima - that is a great suggestion. However, codegen is primarily designed to be a schema-first tool. The dgs-framework does provide minimal support for dynamic schemas, but we don't plan on making this first-class. We won't be adding this as a feature to codegen, but feel free to create a fork and add this.
Follow ups
Following up from the previous comment, we do have some more questions/pointers:

This PR/enhancement does not really deviate from the code-gen's goal - "to be a schema first tool", but rather provides an additional option of adding custom annotations to generated sources via inline directives.
From the enhancement point of view, we have a PR that has the required code changes.
This PR/enhancement is not intended towards providing additional support for dynamic schema(s). Document reference..
Lastly, we did notice a voice on adding support for custom annotations in multiple issues. We believe, this PR can be a path to solving them. A few references: #393, #434

Copy to: @lakshmisunid, @Shalima

@omni3 - Thanks for providing such a detailed description of the issue with examples, along with a PR contribution. Given the requests we are seeing for the different scenarios folks would like to use this feature , this does make sense. I will review and get these changes in shortly.

@srinivasankavitha  - thanks for providing the update. Appreciate the time you took to evaluate this. Looking forward to hearing more from you and your team on the review.

Hey @srinivasankavitha - thank you so much for collaborating and merging earlier PR. We appreciate the collaboration.
As per your guidance, we have made the corresponding java code-gen enhancements in this PR - https://github.com/Netflix/dgs-codegen/pull/453.
Would you please review this as well and let us know any feedback? Thanks!

Done. Looks good to me!

@srinivasankavitha Could you take a look at the corresponding java code-gen enhancements in this PR - https://github.com/Netflix/dgs-codegen/pull/453 as well.