DNS-1123 unsafe job names are rejected by k8s at runtime

I noticed this when I was creating job with non-DNS 1123 safe names. K8s was rejecting the creation of those with this error message:
   body:
   { kind: 'Status',
     apiVersion: 'v1',
     metadata: {},
     status: 'Failure',
     message: 'Secret "score-k8s_deploy_demo-01c8nbp3vtmk7y5p1nq45wmmzz" is invalid: metadata.name: Invalid value: "score-k8s_deploy_demo-01c8nbp3vtmk7y5p1nq45wmmzz": a DNS-1123 subdomain must consist of lower case alphanumeric characters, \'-\' or \'.\', and must start and end with an alphanumeric character (e.g. \'example.com\', regex used for validation is \'[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\')',
     reason: 'Invalid',
     details:
      { name: 'score-k8s_deploy_demo-01c8nbp3vtmk7y5p1nq45wmmzz',
        kind: 'Secret',
        causes: [Array] },
     code: 422 } }
[brigade:app]   Error: job score-k8s_deploy_demo(score-k8s_deploy_demo-01c8nbp3vtmk7y5p1nq45wm  mzz): [object Object]

  - brigadier.js:56 jr.run.catch.err
    ./dist/brigadier.js:56:35

I worked around this with a simple regex replace:
function cleanRepoName(repoName) {
  return repoName.replace(/[^a-zA-Z\d\s]/g, '-')
}

Is there a way we could update the brigade Job to either:
a) catch this earlier and raise an error
b) replace the invalid chars using the regex (with dashes or some other safe character)

I went the route of raising an error inside of the Job() constructor. There was a check function already, but it allowed both underscores and capitals.


move logging nodeselectors to inventory logging.yml

move logging nodeselectors to inventory logging.yml
this should fix current logging CI issues

/lgtm
thanks @richm I was going to try a few different permutations to fix this, I think this is the cleanest approach


Cram Md5 not authenticatin correctly

Hello,
I noticed that my CRAM-MD5 challenges keep failing.  Is there anyways i could disable that auth ? I can confirm that is the right challenge response. It should of been accepted.
Anyone had that issue before ?
LOG
[8] [2022-06-02T13:57:43.009] DEBUG -- : [KRFHGM]    Connection opened from REDACTED
smtp_1      | [8] [2022-06-02T13:57:43.009] DEBUG -- : [KRFHGM]    Client identified as REDACTED
smtp_1      | [8] [2022-06-02T13:57:43.089] DEBUG -- : [KRFHGM] <= ehlo [REDACTED]
smtp_1      | [8] [2022-06-02T13:57:43.099] DEBUG -- : [KRFHGM] => 250-My capabilities are
smtp_1      | [8] [2022-06-02T13:57:43.099] DEBUG -- : [KRFHGM] => 250-STARTTLS
smtp_1      | [8] [2022-06-02T13:57:43.099] DEBUG -- : [KRFHGM] => 250 AUTH CRAM-MD5 PLAIN LOGIN
smtp_1      | [8] [2022-06-02T13:57:43.179] DEBUG -- : [KRFHGM] <= STARTTLS
smtp_1      | [8] [2022-06-02T13:57:43.180] DEBUG -- : [KRFHGM] => 220 Ready to start TLS
smtp_1      | [8] [2022-06-02T13:57:43.949] DEBUG -- : [KRFHGM] <= ehlo [REDACTED]
smtp_1      | [8] [2022-06-02T13:57:43.957] DEBUG -- : [KRFHGM] => 250-My capabilities are
smtp_1      | [8] [2022-06-02T13:57:43.958] DEBUG -- : [KRFHGM] => 250 AUTH CRAM-MD5 PLAIN LOGIN
smtp_1      | [8] [2022-06-02T13:57:44.038] DEBUG -- : [KRFHGM] <= AUTH CRAM-MD5
smtp_1      | [8] [2022-06-02T13:57:44.038] DEBUG -- : [KRFHGM] => 334 *REDACTED challenge *
smtp_1      | [8] [2022-06-02T13:57:44.058] DEBUG -- : [KRFHGM] <= *REDACTED responsechallenge *
smtp_1      | [8] [2022-06-02T13:57:44.062] DEBUG -- : [KRFHGM] => 535 Denied
smtp_1      | [8] [2022-06-02T13:57:44.082] DEBUG -- : [KRFHGM] <= AUTH PLAIN [redacted]
smtp_1      | [8] [2022-06-02T13:57:44.099] DEBUG -- : [KRFHGM] => 235 Granted for redacted
smtp_1      | [8] [2022-06-02T13:57:44.119] DEBUG -- : [KRFHGM] <= mail FROM:
smtp_1      | [8] [2022-06-02T13:57:44.119] DEBUG -- : [KRFHGM] => 250 OK
smtp_1      | [8] [2022-06-02T13:57:44.139] DEBUG -- : [KRFHGM] <= rcpt TO:
smtp_1      | [8] [2022-06-02T13:57:44.140] DEBUG -- : [KRFHGM] Added external address 'redacted'
smtp_1      | [8] [2022-06-02T13:57:44.140] DEBUG -- : [KRFHGM] => 250 OK
smtp_1      | [8] [2022-06-02T13:57:44.159] DEBUG -- : [KRFHGM] <= data
smtp_1      | [8] [2022-06-02T13:57:44.159] DEBUG -- : [KRFHGM] => 354 Go ahead
smtp_1      | [8] [2022-06-02T13:57:44.179] DEBUG -- : [KRFHGM] <= From:redacted
smtp_1      | [8] [2022-06-02T13:57:44.179] DEBUG -- : [KRFHGM] <= To: redacted
smtp_1      | [8] [2022-06-02T13:57:44.180] DEBUG -- : [KRFHGM] <= Subject: Test Message from smtptest at 2022-06-02 09:57:42
smtp_1      | [8] [2022-06-02T13:57:44.180] DEBUG -- : [KRFHGM] <=
smtp_1      | [8] [2022-06-02T13:57:44.180] DEBUG -- : [KRFHGM] <= Test message from the smtptest tool sent at 2022-06-02 09:57:42
smtp_1      | [8] [2022-06-02T13:57:44.181] DEBUG -- : [KRFHGM] <= .
smtp_1      | [8] [2022-06-02T13:57:44.439] DEBUG -- : [KRFHGM] => 250 OK
smtp_1      | [8] [2022-06-02T13:57:44.458] DEBUG -- : [KRFHGM] <= quit

The last time someone reported an issue with it, there was a problem with the username https://github.com/postalserver/postal/issues/414#issuecomment-401848161


make sure that top-level css is not inlined twice

Make sure that top-level css is not inlined twice. this is probably not a problem for link-rel elements inside <template> tags, but for <link-rels> that occur on the top of several imported files we are probably duplicating things.

@sigmundch could you please triage this issue.

moved to https://github.com/dart-lang/polymer-dart/issues/516


Out of range grip values cause hands to remain partially gripped

The Godot OpenXR library has an issue where the controller.get_joystick_axis(JOY_VR_ANALOG_GRIP) can report values outside of the 0.0 - 1.0 range (observed on Oculus Quest controllers).
This causes a secondary failure in the Godot XR Tools LeftHand.gd and RightHand.gd scripts which aren't robust to out-of-range values. These scripts just multiply the joystick position by 2.5 to produce animation tree positions. The result is that the animation tree positions can be outside of the legal range and the animation doesn't update. As such quickly releasing the grip button can result in the hand remaining partially gripped.
The solution appears to be adding the following line to LeftHand.gd and RightHand.gd after reading the controllers:
    grip = clamp(grip, 0.0, 2.5)

It may also be advisable to do the same protection on the trigger axis, just be robust to out-of-range values in the future.

I need to find time to investigate this further, I think this should be a fix in the OpenXR plugin itself

This has been fixed upstream: https://github.com/GodotVR/godot_openxr/pull/163
And merged into master but not yet officially released.

This has been fixed with godot-openxr 1.2.0 and godot-xr-tools 2.3.0


Support for Unreal Engine Plugin

Is your feature request related to a problem? Please describe.
N/A
Describe the solution you'd like
Do we have a plan to hook up with Unreal Engine as it supports Unity as a plugin today?
Describe alternatives you've considered
N/A
Additional context
Unreal Engine may have better visual fidelity compared Unity.

Unreal is nice, but it is 60GB, last I checked. Adding it as a dependency would be a bit of a nightmare.
That said, we are actively looking into creating a bridge to external renderers, including Unreal, based on the USD specification.

Unreal Engine 5.3.2 is incredible looking and so fast. Just download the Linux binaries and try for yourself. It accepts plugins that can be turned on & off.
The Unreal Engine would be incredible for robotic application because its realistic renders are actually useful in computer vision, unlike other renderers.

Unreal is nice, but it is 60GB, last I checked. Adding it as a dependency would be a bit of a nightmare.
That said, we are actively looking into creating a bridge to external renderers, including Unreal, based on the USD specification.

Hi, What is your current projection on this idea? Will we see it within a couple of years? Thanks.

The short-term plan is to write a script for importing assets specified as USD. The next step would be to write a Hydra delegate that exports the transforms of the different geoms for external rendering. We're not currently planning to write this Hydra bit in-house, but we'd be thrilled to offer support if someone is willing to take that on.


feat: convert markdown mermaid code blocks

Basically, this makes mermaid diagrams in the README.md also get properly converted.

it might also be good to have html escape in the inline/tagged mermaid diagrams. basically, the project i was testing this had some diagrams with names as seen added in the test.

@forivall Thanks for your contribution!

@all-contributors please add @forivall for code, test.


Can't seem to be able control an non windows pre installed program

Expected Behavior
I want to press some buttons on a program, TeXstudio for example. The given example for the notepad works but i cant seem to be able to run any other application that is not preinstalled with windows.
Actual Behavior
Open the program but when i try to search for some specific button (e.g. File) like in the example, it raises ElementNotFoundError with mesage "pywinauto.findwindows.ElementNotFoundError: {'title_re': 'TeXstudio', 'backend': 'uia', 'process': 3592}"
This also happens as im trying to print the control identirfiers.
Steps to Reproduce the Problem

Open program you installed your self
Find the File option
Click on it and show the drop down menu

Short Example of Code to Demonstrate the Problem
from pywinauto.application import Application
Running the program
app = Application(backend="uia").start("C:\Program Files\texstudio\texstudio.exe")
Linking the app name to skp varible.
skp = app.window(title_re='TeXstudio')
Trying to print the control identifiers
search = skp["Texstudio"].print_control_identifiers()
Specifications

Pywinauto version: 0.6.8
Python version and bitness: 3.10
Platform and OS: windows 10

afaik print_control_identifiers() doesn't return anything.
Also, have you tried skp = app.top_window() ?

@AlexanderStavrop  u can learn from here manual
What you described I think could be summary to how to locate element in application.

Try this:
from pywinauto import Application
app = Application(backend="uia").start(r"absolute_path")
dlg = app.top_window()
Change "backend" and "absolute_path" accordingly.
Also read the documentation: https://pywinauto.readthedocs.io/en/latest/getting_started.html


IIO: activate firmware/hardware feature before read out sensor data

Some device firmware/hardware feature default state is off, thus need to
activate it before read out sensor data. Do activate in sol_iio_add_channel()
and deactivate in sol_iio_close().
Activate 'in_<channel>_en' before read 'in_<channel>_input' or 'in_<channel>_raw'.
For example: activate 'in_steps_en' before read 'in_steps_input'.

@edersondisouza,
Push in the changes already.

@laykuanloon so I'm merging it.
Also I'll grant you write access to this repository.
I just would ask you to read our Contribution, wiki page, specially the section regarding contribution flow: https://github.com/solettaproject/soletta/wiki/Contributing#contributions-flow


Add support Last

Coverage increased (+0.6%) to 72.672% when pulling 43ba27648e12659b4b153ac673ae54e3e3386976 on pocket7878:last into 51d692ceb75baafe758b65a6af9d7c65e963402e on jochasinga:master.

Coverage increased (+0.5%) to 73.988% when pulling 381b41d1944782b2910ce26713f0a8029212f620 on pocket7878:last into e1b20f6e804fcca041a9d90f85a9d7441d9a161b on jochasinga:master.


Add time_lag metric to process_batch instrumentation_payload

Why?
As explained in https://github.com/zendesk/ruby-kafka/pull/811 we're excited to try out racecar 2 beta but need a metric for lag in the process_batch instrumentation. It doesn't look like offset_lag will be possible initially but the time_lag metric available in the process_message metrics would be useful to us if added to the process_batch metrics
How?
Adds time_lag to process_batch metrics.

Thanks!


Transfer Nami wallet to Milkomeda Cardano.

Hello. How are they?
Today I have sent 60 ADA from my nami wallet to the Milkomeda Cardano network in metamask. In the detail of the transaction I do not see the metadata or my destination wallet, and I have not received the funds.
Could you explain to me what happened?
The Nami wallet transaction is as follows:
https://cardanoscan.io/transaction/707a986add6cde36861683364a3ef29fe5d6dac5e3f7e94b06b31d8d9392c319
Please i need help thank you

Hey, not sure how you made the transaction, but the address you sent to is wrong and is not even the milkomeda address.

Yes, yesterday I realized that I sent it to a dripdropz wallet, so I will
wait for the refund.
Thank you!
El mié., 30 de marzo de 2022 8:02 a. m., alessandrokonrad <
@.***> escribió:

Hey, not sure how you made the transaction, but the address you sent to is
wrong and is not even the milkomeda address.
—
Reply to this email directly, view it on GitHub
https://github.com/Berry-Pool/nami-wallet/issues/490#issuecomment-1082988604,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYPCN5QFQ62EFPR6LHVDVADVCQYFLANCNFSM5SAPA7OQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

I just talked to someone who accidentally sent ADA to a BSC address and it ended up in this wallet https://pool.pm/$milkomedaftw - how can that be?!


Add Twitter feed to homepage

Can we add a Twitter feed to this page Comcast.github.io? and make it look nice too?
Twitter accounts to follow to start:
@vinyldns
@trafficctrlcdn
@TricksterIO
@todogroup
@opensourceway
@OpenSourceOrg
@ShillaSaebi
@nithyaruff

Do you have any design in mind?

Sure maybe something off to the side like this below format but on the right side of the page? https://twitter.github.io

This cannot be implemented to the right with the current flow of the website as the content is centered.
I have tried embedding a feed panel though. Please take a look and suggest any changes needed.

@pumpkinman008 Thanks!


Bot does not respect TradingPreferences

If there's a donation trade AND TradingPreferences is set to 0 it rejects/declines the trade. This should not happen as I want to be able to that manually.

This should not happen as I want to be able to that manually.

Then set IsBotAccount appropriately.


feat(cli): add api for printing sst arrangement status

What problem does this PR solve?
add api for printing sst arrangement status
Issue link:
What is changed and how it works?
store trait add new method
Code changes

[x] Has Rust code change
[ ] Has CI related scripts change

Check List
Tests

[x] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Note for reviewer

move print_sst


Recover test_pyarrow_conversion_dispatch

[x] Closes https://github.com/dask/dask/pull/10500/files#r1319881063
[x] Tests added / passed
[x] Passes pre-commit run --all-files

Thanks @hendrikmakait ! Any chance we can address my other comment from #10500 here?

Sure, we can do that here. Should we also clean up the **kwargs in other pyarrow-related dispatches in a follow-up?

Should we also clean up the **kwargs in other pyarrow-related dispatches in a follow-up?

I will be supportive of any cases where we can formalize the specific/necessary arguments in the pandas dispatch functions. However, I will understand if there are still arguments you are planning to experiment with in p2p.


New user account validations

Pull Request Type

[x] ✨ feat
[ ] 🐛 fix
[ ] ♻ refactor
[ ] 💄 style
[ ] 🔨 chore
[ ] 📝 docs

Relevant Issues

resolves #1315
What is in this change?

On new user creation we now validate for usernames that are lowercase and have no spaces
Modified NewUserModal, EditUserModal, and AccountModal components for these validations
Frontend validation and User prisma model are updated for these validations
We do not validate the update function in the User model to prevent forcing users to have to change usernames when updating just their password
Still allow login with usernames that are not all lowercase and have spaces to prevent current users from getting locked out of their accounts

Additional Information

Developer Validations

[x] I ran yarn lint from the root of the repo & committed changes
[x] Relevant documentation has been updated
[x] I have tested my code functionality
[x] Docker build succeeds locally

Updated backend validations to only validate the username with all lowercase and no spaces when calling the User.create() db model function.

[!NOTE]
We are aware you can create a valid username and edit it to an invalid name. This is simply a convenience function around the username creation to enable backward compatibility for now with minimal overhead


how to enable bclm directly from macOS?

Hi, I realize this isn't an issue for this app, but I've looked online and couldn't find this answer
How can I write the BCLM value to the SMC without using any 3rd party apps? Are there a set of terminal commands that will achieve the same thing? (And also allow reading the value, and reading/writing BFCL)
Thanks

If there were native binaries to do the same thing, bclm would have no reason to exist.
bclm (and probably many other tools) utilize SMCKit which interacts with the SMC via private APIs.

thanks


Prevent accidental user overwrites (#21).

Fix #21

Unfortunately I cannot implement the modal window function, I'm not very familiar with react.
I'll close this PR and open new one with different commit.


[SourceKit] Resolve a nondeterministic deadlock in SourceKit while cancelling

This fixes a race-conditioned deadlock which could occur while cancelling SourceKit AST build request
We have one thread that claimed CancellationRequestCallbackMtx in SwiftASTConsumer::requestCancellation and wants to claim ConsumersAndResultMtx in ASTBuildOperation::requestConsumerCancellation
Another thread claimed ConsumersAndResultMtx in ASTBuildOperation::schedule and now wants to claim CancellationRequestCallbackMtx in SwiftASTConsumer::removeCancellationRequestCallback.
In both cases we could actually release one lock before claiming the other.
Fixes rdar://90870793

@swift-ci Please smoke test


bug: could not find refactor nil when using select_refactor

E5108: Error executing lua ...ack/packer/opt/refactoring.nvim/lua/refactoring/init.lua:20: Could not
 find refactor nil.  You can get a list of all refactors from require("refactoring").get_refactors()

stack traceback:
        [C]: in function 'error'
        ...ack/packer/opt/refactoring.nvim/lua/refactoring/init.lua:20: in function 'refactor'
        ...ack/packer/opt/refactoring.nvim/lua/refactoring/init.lua:48: in function 'select_refactor
'
        [string ":lua"]:1: in main chunk

config:
...

        use {
            'ThePrimeagen/refactoring.nvim',
            after = 'nvim-treesitter',
            config = function()
                require('refactoring').setup()
                vim.api.nvim_set_keymap(
                    "v",
                    "<leader>rr",
                    ":lua require('refactoring').select_refactor()<CR>",
                    { noremap = true, silent = true, expr = false }
                )
             end }

...

I can see its happening in init.lua:20 as in select_refactor, the selection is async, and is triggered after refactor is called with a null param.

@ViRu-ThE-ViRuS thanks for opening an issue. This has been fixed in #273 - take a look and let us know if it's fixed!

yup all good now!


Add DEVSETUP for firestore-bigquery-change-tracker

This is a WIP to document how to build the firestore-bigquery-change-tracker extension locally.

Codecov Report

Merging #244 into next will not change coverage by %.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             next     #244   +/-   ##
=======================================
  Coverage   40.48%   40.48%
=======================================
  Files          20       20
  Lines         625      625
  Branches       81       81
=======================================
  Hits          253      253
  Misses        370      370
  Partials        2        2


Add polygons

Implements polygons according to #15
Also, I propose refactoring all the translate<element> functions to the patters I used for translatePolygon (concat a bunch of sub-lists to create the operation list for the element). Opinions?

nice!

Very nice. It would be cool if we could get a screenshot of what the example looks like to put inline in the docs.
I also left feedback on the [].concat style, happy to merge when you're ready.


cadical: 1.8.0 -> 1.9.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/cadical/versions.
meta.description for cadical is: Simplified Satisfiability Solver
meta.homepage for cadical is: https://fmv.jku.at/cadical/
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.9.0 with grep in /nix/store/myrh3wspw1nsmpldspv0afmx1af5l2s1-cadical-1.9.0
found 1.9.0 in filename of file in /nix/store/myrh3wspw1nsmpldspv0afmx1af5l2s1-cadical-1.9.0

Rebuild report (if merged into master) (click to expand)

4 total rebuild path(s)

4 package rebuild(s)

First fifty rebuilds by attrpath
bitwuzla
cadical
cbmc
cvc5

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/myrh3wspw1nsmpldspv0afmx1af5l2s1-cadical-1.9.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A cadical https://github.com/r-ryantm/nixpkgs/archive/f23cd2617d143cf73e3996211851755376842675.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/f23cd2617d143cf73e3996211851755376842675#cadical

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/myrh3wspw1nsmpldspv0afmx1af5l2s1-cadical-1.9.0
ls -la /nix/store/myrh3wspw1nsmpldspv0afmx1af5l2s1-cadical-1.9.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

4 packages built:

bitwuzla
cadical
cbmc
cvc5

Maintainer pings
cc @shnarazk for testing.

Succeeded in building and testing os MacOS 👍


FIX: Staff can participate in private categories' chat presence channels.

When a staff member joins a channel, and it's not a member of one of the groups with access to it, it should still be able to join the presence
channel.

This seems fine, but so I understand properly, allowed_user_ids in a private channel will only contain staff ids (presumably, non-staff participants are stored elsewhere)?

Participants have access through the groups associated to the category, but staff can join a channel even if it's not a member of one of those groups.

Im wondering if should auto add admin/staff/moderator AUTO groups ids to this list?

Im wondering if we shouldnt auto add admin/staff/moderator AUTO groups ids to this list?

I don't know why I didn't think about this before 🤦

Im wondering if we shouldnt auto add admin/staff/moderator AUTO groups ids to this list?

I don't know why I didn't think about this before 🤦

there are a lot of things to think about :p


Use pragmas to turn off warnings about __builtin_return_address

We need to replace this code with assembler, I think.
Signed-off-by: Dan Cross<EMAIL_ADDRESS>

I know, right? Let me make sure it boots up ok.

boots ok for me.

Me too, now.


Consider basing COVIDcast metadata min/max/stdev based on specific date range

One issue raised repeatedly about the COVIDcast map is that the color scale is based on the minimum, maximum, and standard deviation of the entire signal history. If a signal has changed significantly over time, the map can hence be poorly scaled.
Figuring out how to adjust the scale dynamically when the user switches days is one problem; but before it can do that, the covidcast_meta endpoint would have to provide metadata about a specific date or date range. For example, if we said the scale is based on the variation over the past month, we'd need to be able to request the scale for 2020-04-20 and get the variation over the preceding month.
Unfortunately this would break the caching strategy we currently use, so it also remains to be seen whether there is an efficient way to do this. I wonder whether the strategy might end up being "just stick Varnish in front of the API server" instead of a clever caching system, but I don't know what will prove best.

Roni proposes a leaky-capacitor model for a per-day set of min/max/mean/stdev computations that weight recent data more heavily than distant data. This could be constructed incrementally to reduce the computation cost at acquisition time, but we'd want to consider whether to implement it as a separate signal (and all the database and server overhead that includes) or by overloading covidcast with a dedicated geo level for the purpose.

wontfix


feat: ML Model Backend Implementation

Fixes #1877
Checklist

[X] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[X] Links to related issues (if applicable)
[X] Tests for the changes have been added/updated (if applicable)
[X] Docs related to the changes have been added/updated (if applicable)

I'm confused on how the build is broken now... All I committed was a change to the index configuration, but it's saying that I broke backwards compatibility by changing EvaluationData to Cost 😕 is there a way to re-run the check? It passes locally without issue. Only uncommitted file is yarn.lock which seems like it should probably be added to the .gitignore.

Build is failing due to a 502 bad gateway when reaching out to the gradle maven repo for ElasticSearch's rest client. Should pass now after the fix from a typo I made (if it can reach all the dependencies). Not sure how to force a rebuild without making more changes

Where was the typo? Did you already commit it? We ran the build jobs for your last few commits (see the Xs or check mars on them).

Where was the typo? Did you already commit it? We ran the build jobs for your last few commits (see the Xs or check mars on them).

Yeah the typo fix was the last commit. The previous failure was due to the restspec not having EvaluationData endpoints because I typoed the text in the Rest.li annotation for EvaluationDataResource which is now fixed. The current build failure is due to this error which does not seem to be code related, it hit a timeout when reaching out to the Gradle repository to get a dependency:

Could not resolve all files for configuration ':metadata-utils:compileClasspath'.
Could not resolve org.elasticsearch.client:elasticsearch-rest-high-level-client:5.6.8.
Required by:
project :metadata-utils
Could not resolve org.elasticsearch.client:elasticsearch-rest-high-level-client:5.6.8.
Could not get resource 'https://plugins.gradle.org/m2/org/elasticsearch/client/elasticsearch-rest-high-level-client/5.6.8/elasticsearch-rest-high-level-client-5.6.8.pom'.
Could not GET 'https://jcenter.bintray.com/org/elasticsearch/client/elasticsearch-rest-high-level-client/5.6.8/elasticsearch-rest-high-level-client-5.6.8.pom'. Received status code 502 from server: Bad Gateway

Sorry but just noticed that all the ML-related models are placed under com.linkedin.ml.metadata namespace (see https://github.com/linkedin/datahub/tree/master/metadata-models/src/main/pegasus/com/linkedin/ml/metadata). @RyanHolstien do you mind if I submit a PR before this to move them to com.linkedin.ml instead?

Sorry but just noticed that all the ML-related models are placed under com.linkedin.ml.metadata namespace (see https://github.com/linkedin/datahub/tree/master/metadata-models/src/main/pegasus/com/linkedin/ml/metadata). @RyanHolstien do you mind if I submit a PR before this to move them to com.linkedin.ml instead?

@mars-lan Not at all, go for it. I'll update as needed :smile:

Sorry but just noticed that all the ML-related models are placed under com.linkedin.ml.metadata namespace (see https://github.com/linkedin/datahub/tree/master/metadata-models/src/main/pegasus/com/linkedin/ml/metadata). @RyanHolstien do you mind if I submit a PR before this to move them to com.linkedin.ml instead?

@mars-lan Not at all, go for it. I'll update as needed 😄

Actually nvm. Seems like the models have been referenced at multiple places, changing the namespace will quickly become a backward incompatible change. Let's live with them for now.

Sorry about the delay, made the requested changes and updated the code to reflect changes to master over time. Let me know if there's anything else needed to get this merged in.

Sorry about the delay, made the requested changes and updated the code to reflect changes to master over time. Let me know if there's anything else needed to get this merged in.

Thanks for taking the time to review @camelliazhang ! I'm not sure what the build error is about, the failing test passes locally. The error is saying that the number of arguments doesn't line up with the constructor call in my new search sanity test, but it is structured the same way as the other tests. I don't have access to run it again without pushing another commit. I can try pushing a harmless commit like adding a local variable for one of the Strings in that test class to see if it passes the build so this can be merged if that's the only way to trigger another build.

The error is saying that the number of arguments doesn't line up with the constructor call in my new search sanity test,

@jplaisted Could you please take a look for the failure of new search sanity test? Thanks

Yeah I added a new parameter, which I acknowledges breaks code, but at the time i thought one no one was using it besides me.
It is weird to me it passes locally but not on the CI. I'd think it'd fail on both. I don't think CI tries to rebase on master before running changes?
In any case, make sure you've rebased on master, and run ./gradlew idea build. It'll probably fail locally then too, something might be cached.
Check out this: https://github.com/linkedin/datahub/pull/2067. Basically there's some new sanity tests to test your config too, just pass the super constructor the search config.

@RyanHolstien It would be great if the GMS sample API calls section in the README is udpated for MLModel entity - https://github.com/linkedin/datahub/blob/master/gms/README.md#sample-api-calls

Nit: Thoughts on making the L lower case? MlModel?
https://google.github.io/styleguide/javaguide.html#s5.3-camel-case
We don't use google's style guide, but still a useful reference.

Since the ML here is a short-form for Machine Learning ... maybe MLModel is more appropriate.
Seems like Apple agrees: https://developer.apple.com/documentation/coreml/mlmodel

Thanks @RyanHolstien for the lift and @camelliazhang, @jywadhwani for detailed reviews!


Log user visit activity

As an important prerequisite for the senate elections and activity based rating/karma models, we need to track user activity.
This is the simplest possible implementation that records if user visited the site (feeds) in a particular 12 hour period.
Implementation:
Table:
 create table user_activity
      (
          user_id    int      not null,
          visited_at datetime not null,
          constraint user_activity_pk
              primary key (user_id, visited_at)
      );

visited_at is truncated to a period (currently 12h) on the server before insertion. No additional indexes and foreign keys are added for insertion performance.
Insertion is performed in FeedController in async fire-and-forget manner. There is an in-memory cache on the server that limits the number of insertions.

I moved table to separate database to prevent main database flooding with non-content data.


Error using use BatchRenorm

X1 = BatchRenorm(X1, rmax, dmax, data_format='NHWC')

File "/usr/local/lib/python3.5/dist-packages/tensorpack/models/common.py", line 106, in wrapped_func
assert isinstance(name, six.string_types), name
AssertionError: Tensor("Reshape:0", shape=(?, 108, 192, 1), dtype=float32)
Some of my code:
rmax = tf.Variable(1)
dmax = tf.Variable(0)
X1 = tf.reshape(data, [-1, height, width, 1])
X1 = BatchRenorm(X1, rmax, dmax, data_format='NHWC')
Maybe its a beginner mistake, but to be honest, i did not find any examples how to use BatchRenorm function

There are examples using other layers. You need a scope name as the first argument.
X1 = BatchRenorm('bn', X1, rmax, dmax, data_format='NHWC')

After dc448bdab391a6eac87de47efd5f8a64caebaf99, [API documentation] was now updated to include the name argument.


docs: update installation guide

It looks like you need to load perspective.js in order to instantiate the 'engine':
const worker = perspective.worker();

Thanks for the PR!  Much appreciated.
To clarify, perspective.js is the API for the WebWorker.  This is already a dependency of perspective.view.js, but this bundle does not expose it as a global variable;  rather, it will internally create it's own WebWorker as needed to manage any data passed to it, which you can access via the <perspective-viewer>'s worker property like so
let elem = document.getElementById('my_viewer');
let table = elem.worker.table([{x:1, y:2}]);
elem.load(table);

Thus, perspective.js is only needed if you A) want to create additional WebWorkers or B) just want to use the Perspective engine library directly.  We could alternatively just export the perspective symbol globally from perspective.view.js - feedback welcome here.  Either way, this part of the documentation needs some substantial fleshing out!

Thanks for merging the PR.

Either way, this part of the documentation needs some substantial fleshing out!

Your API documentation is really quite good. What you are lacking is any 'getting started' type of documentation. These are typically much more tutorial-based.
As an example, the following blog post, which introduces d3fc (our charting component library), has been very popular:
https://blog.scottlogic.com/2018/09/21/d3-financial-chart.html


Missing caret on selection

When you are selecting something, the flashing caret disappears on Atom. This would be nice to revive it, it is useful to know if the current cursor is at the beginning or the end of the line to know where you are going to select when you do left or right.
https://www.youtube.com/watch?v=UVSFBSKcS0Q
Left is Sublime, Right is Atom

This seems to have been an intentional feature:
https://github.com/atom/atom/blob/4d77c9240975c955fe74a758bc96d25c0cc910ad/src/cursor.coffee#L588
If not this seems rather simple thing to fix, I might try my hand at fixing it tonight.

/cc @atom/feedback
I would support showing cursors for selections, so you can see if they are reversed or not. Thoughts?

I agree that this would be useful.

I have no strong feelings about this, but here's something I found a bit odd :thought_balloon::

Although the behavior is consistent with Sublime Text, now that I see the cursor and I move it down, I'd expect it to maintain the same column.
Nothing super disruptive, I know, but I'd probably prefer not showing the cursor at all if it gives unclear hints about the position (unless we want to change how moveDown works).

This was fixed in recent versions of Atom.


Fix PyTorch LTS install instructions

The instructions changed from
pip install torch==1.11.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

to
pip install torch --extra-index-url https://download.pytorch.org/whl/cu113

It seems the exact specification of the version is no longer needed. Plus, I'm guessing this change or whatever it entailed also led to the ROCm wheels being detected. This is disabled in #54, but should be revisited.

With pytorch/pytorch#74753 merged, we can probably switch our backend to this style.

Everything but LTS was fixes in #59.

Although pytorch/pytorch/pull/74753 is merged now, as of 16.04.2022 the official installation instruction still use the -f flag.
In addition, the new links seem to be not set up properly. Without a trailing / the LTS link is broken whereas this works for all other channels:

https://download.pytorch.org/whl/lts/1.8 vs. https://download.pytorch.org/whl/lts/1.8/
https://download.pytorch.org/whl/nightly vs. https://download.pytorch.org/whl/nightly/

The behavior is the same if we append a specific computation backend:

https://download.pytorch.org/whl/lts/1.8/cpu vs. https://download.pytorch.org/whl/lts/1.8/cpu/

Let's wait until this is fixed on their side before we also migrate.

This is now tracked in pytorch/pytorch#76829.


Implementing cross-chain transfer on the Cosmos SDK with IBC (Inter-Blockchain Communication) interoperability to connect with Ethereum Virtual Machine (EVM) smart contracts

Please allow Implementing a complete cross-chain transfer system with IBC interoperability and EVM smart contract integrations

Thanks for the issue, we (and other teams in the ecosystem) are working on it! Take also a look at this: https://github.com/hyperledger-labs/yui-ibc-solidity.


CFE: crash on recursive const constructor

class C {
  Object inner;
  const C() : inner = const C();

This simply crashes.
According to @lrhn it is not allowed because const expressions cannot depend on themselves. So this crash is not preventing a valid pattern but its also not very user friendly.

This no longer crashes, in Dart 2.6.0-dev.0.0, not in dart, nor in dartanalyzer:
$ dartanalyzer 36216.dart
Analyzing 36216.dart...
  error • Can't define a const constructor for a class with non-final fields. • 36216.dart:3:3 • const_constructor_with_non_final_field
1 error found.

$ dart 36216.dart
36216.dart:3:9: Error: Constructor is marked 'const' so all fields must be final.
  const C() : inner = const C();
        ^
36216.dart:2:10: Context: Field isn't final, but constructor is 'const'.
  Object inner;
         ^
36216.dart:3:29: Error: Constant evaluation error:
  const C() : inner = const C();
                            ^
36216.dart:3:29: Context: Constant expression depends on itself.
  const C() : inner = const C();
                            ^

Fixed?

Fixed?

Nope. You can address that error by changing the example program to:
class C {
  final Object inner;
  const C() : inner = const C();
}

If I run that on the VM, I get:
Illegal instruction: 4

I think the 'illegal instruction' behavior may have been fixed recently (at least, I don't get that response). Here's what I get with the corrected program with dart from commit 942af5bd62496330ab24720333cab08a2e8e5e07:
n026.dart:3:29: Error: Constant evaluation error:
  const C() : inner = const C();
                            ^
n026.dart:3:29: Context: Constant expression depends on itself.
  const C() : inner = const C();
                            ^

@jensjoha, it looks like we could close this. Do you think there are any known issues with cyclic constant detection today?

Constant evaluation is actually @askeksa-google so I'll refer to him.

Closing as a duplicate of https://github.com/dart-lang/sdk/issues/34189

I think @munificent might have hit some other issue. The example is rejected by the FE.


Include D2L in VerticaPy

https://github.com/marco-the-sane/d2l
To read: https://www.digitalocean.com/community/tutorials/calling-c-functions-from-python

This function should be implemented server side first. I am closing the issue.


Feature Request: tag auto completion

How about a tag auto completion. It searches through all of your used tags while typing and offers completion so you don't have to type frequently used, long named tags over and over again. Should work in the search field as well as in the adding bookmarklet.

a clickable list for selecting tags in addition to the searching field would be very handy, too :)


upgrade audio downloader tool to automatically download all podcast links to s3 bucket

I will try to work on this

🔥 🔥 🔥 check out oscars notes/todos in #7 and branch podcast-to-wav


[BUGFIX] Fix for docker(-compose) to allow the app to be run as a regular user.

Description
Fixes #857 and #694
Due to the calling of setpriv as an regular user and some weird env variable stuff which seemed set wrongly to me the application couldn't be launched in docker as a non-root user.
(And really, an application like this shouldn't run as root as it simply doesn't need it)
The proposed fix properly sets the environment variables reflecting the actual UID and GID and asseses this before launching.

An user switching an existing setup from root to non-root user might need to manually chown the /app/data directory once depending on how they set up the storage. This does not involve altering any container files.

Type of change

Bug fix (non-breaking change which fixes an issue)

Checklist

[x] My code follows the style guidelines of this project
[ ] I ran ESLint and other linters for modified files

Not applicable. I modified a bash file ;)

[X] I have performed a self-review of my own code and tested it
[X] I have commented my code, particularly in hard-to-understand areas
[X] My changes generate no new warnings

Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.

While this is certainly one way to handle rootles container or containers that run as non root account due to CLI params (i.e. --user 1001:1001), would it not be a more standard way to let the container run as a non root user by default?
What I mean by that is that most of the entrypoint script could be made obsolete and to simply create a user+group during the container build and ensure that the /data dir gets creted and properly assigned.

As I have to deal with this a lot at work some reference from a platform that enforces the container to run as non root unless you explicitly allow it otherwise: OpenShift has a section in their docs on how to build a container so it supports arbitrary user ids

I know this works, since I ended up building a custom image that uses the recomendation from the docs as well as what Nginx uses for their unpribileged container to test uptime-kuma in an unprivileged enforcing environment.
https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/stable/debian/Dockerfile#L20-L21
However, the question remains if this would be the 'better' way or to keep the entrypoint script and use the fix proposed by this PR.
Either way, these are just my two cents to the matter that came up when I saw that you where faster than me to propose changes :slightly_smiling_face:

from what I can tell the scrip has nothing NodeJS specific.
It really just ensures that the /data dir exists and has its owner set 'properly' (with your fix it actually does that, b4 you would have had to specify PUID and PUID) and spawns of the NodeJS process as the same user the data dir now has as its owner.
At least that is what I could gather from it :)
Regardless, all I wanted to do is throw in the comment and open a discussion which way is the preferable one.
Either works since even if you where to create a user within the container build and run by default as that a user could still use the container runtime CLI (Docker, Podman, ...) to overwrite the user and group the container will run as would then lead to the NodeJS process to run as those ids.
There is only one instance where I am not 100% certain how it would react, if a user where to use a docker volume to mount on a pre-created /data dir (created at container build time and owned by the user created at build time) but setting a different UID and GID via the CLI or a thing such as Compose.
The likely 'solution' for that would be to set the /data dir at creation to 777.
(hope that made sense)

Thanks for testing my assumed edge case :sweat_smile:
And yeah I assumed as much that it would run into this issue.
Setting the dir to 777 is NEVER a good idea so my apologies for bribing it up at all, was just throwing it out there for the only way to avoid permission errors I suppose.
I like the idea of giving the entrypoint script the porous of a environment checker and presenting the directions to fix possible issues (i.e. legacy permissions or plain wrong bind mount perms).

Thanks for testing my assumed edge case 😅 And yeah I assumed as much that it would run into this issue. Setting the dir to 777 is NEVER a good idea so my apologies for bringing it up at all, was just throwing it out there for the only way to avoid permission errors I suppose.
I like the idea of giving the entrypoint script the porous of a environment checker and presenting the directions to fix possible issues (i.e. legacy permissions or plain wrong bind mount perms).

I've altered the script to (attempt) to work around this edge-case.
It now assesses ownership, directory and file permissions, and tries to sets them properly.
If it fails it'll exit with an error message instructing on how to resolve the problem.

@Saibamen Thank you for your feedback and approval! :)

@justSem Doesn't running as a regular user break the ability of sending pings? I remember a long time ago someone else tried this and it broke the Docker image.

@justSem Doesn't running as a regular user break the ability of sending pings? I remember a long time ago someone else tried this and it broke the Docker image.

No, ping isn't a privileged unix process.
I run my instance with this script and ping works just fine

While I don't run this script yet, I have Uptime-Kuma deployed in the restrictive SCC (Security Context Constraint) of Open Shift and it works just fine.
*I built my own image with a slightly altered version of this script though, since the restricted SCC wont allow for any privileged or root running pod, even if its just at startup.

@justSem Here https://github.com/louislam/uptime-kuma/issues/488 it was a long time ago though.

@k3rnelpan1c-dev  could you share your script? Getting Kuma running on Openshift and with a persistent Volume is now as easy as it should be :-o

While I don't run this script yet, I have Uptime-Kuma deployed in the restrictive SCC (Security Context Constraint) of Open Shift and it works just fine.
*I built my own image with a slightly altered version of this script though, since the restricted SCC wont allow for any privileged or root running pod, even if its just at startup.

Hi,
could you please share the info necessary running this in OpenShift?
Many thanks.

For those curious, yes I will share my config for OCP in a new issue, since it is just marginal connected to this PR.
Sorry to have disrupted the PR topic by my comment :sweat_smile:

When are you gonne merge this? :-)

This would solve my problem of not having root access to my fs!

@Saibamen @louislam Is this going to get merged on any point? Or are there any changes required?

@justSem: I don't have write permissions

May someone merge this it would be really helpful... Thanks !

@louislam may someone merge this it would be really helpful ! Thank you !

Bump. @louislam can we please get this into the next release?

Bumping again and pinging @louislam

@louislam any change this could come in a release?
I would love to see, I have a volume that is mounted under a non-root user for all my containers use but I cannot use that because this runs as root (which is not needed)

Obsolete by #4052.


Add CAMB

Signed-off-by: nstarman<EMAIL_ADDRESS>Description
Adding the CAMB wrapper library.
PR Checklist

[ ] Give a detailed description of the PR above.
[ ] Document changes in the CHANGES.rst file. See existing changelog for examples.
[ ] Add tests, if applicable, to ensure code coverage never decreases.
[ ] Make sure the docs are up to date, if applicable, particularly the docstrings and RST files in docs folder.
[ ] Ensure linear history by rebasing, when requested by the maintainer.

This needs to wait until we have installable versions of everything else.


[MRG] Add iteration callback to BayesSearchCV, fixed value dimension

A continuation of #515 (seemed a bit easier to start a new PR).
Additions in this PR:

A new shiny iteration callback to BayesSearchCV!
Dimensions can be defined by single element list / tuple, which is considered to be a dimension of Category type and fixes dimension value.

Tests / examples included.

Codecov Report

Merging #591 into master will decrease coverage by 0.4%.
The diff coverage is 60%.

@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
- Coverage   86.25%   85.85%   -0.41%
==========================================
  Files          23       23
  Lines        1717     1732      +15
==========================================
+ Hits         1481     1487       +6
- Misses        236      245       +9

Impacted Files
Coverage Δ

skopt/space/space.py
92.77% <100%> (-0.32%)
:arrow_down:

skopt/searchcv.py
87.93% <55.55%> (-4%)
:arrow_down:

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 3430774...c3d8de4. Read the comment docs.


Need more examples and functions

your code is very well. can you add more examples. can you add sibling functions in future by the way.

you can use ChatGPT


Update strain.schema.tpl.json

Just noticed that "species" in the strain schema was optional. Checked the closed issues and such, but there we discussed that this needs to be required because specimen can either choose CT/species or core/strain as "species", but the species information must be there (either directly or via strain schema and then species).

@lzehl this is still open - Could you review the PR?


Awesome lib

I love it.
Thanks!

This isn't really an issue, but I'm going to +1 it anyway :)

This is exactly what I was looking for thanks! We're having issues with asian characters in slugs, this will be fantastic.

+1 :) Really AWESOME!

Thank you!


Failed to defeat challenge.

Hello.
I'm getting this issue when trying to enter with 50 random bots (Or more).
User:kahoot-rand User$ go run main.go 283386 NAME 50
failed to connect: failed to create session: failed to defeat challenge: decode('f5PkMP2ObTFq88EYZ6GG3uiYWwVKA2MD0bKOc10MTdEKIEqUUtKiO9rkeSCllTofwjr95lF6gXfb5zehKp2O1sl0OcIj0WK9lzp2'); function decode(message) {return _.replace(message, /./g, function(char, position) {return String.fromCharCode((((char.charCodeAt(0) * position) + 1) % 77) + 48)});}
exit status 1
Any idea why?

Make sure http://safeval.pw loads for you. This depends on safeval for connecting to kahoot's system.


Examples on material.angular.io not displaying

Bug, feature request, or proposal:
It seems the code examples on material.angular.io are not displaying for the HTML, TS, or CSS.
Example:

What is the expected behavior?
I would expect to see all the examples code display for the various components. I think there was a site update in the past few days.
What is the current behavior?
Example code not displaying on the material.angular.io website.
Is there anything else we should know?
Wasn't sure where else to post this issue. That's why I posted here. Please let me know if there is a better place. The examples were extremely useful and I look forward to them being built out further.

actually this happens since few days ago

On requests to load this example code's is HTML-Code "301 Moved Permanently".
It seems to be in all example code for every component...

Any updates when the examples will be displayed ?

you can check code from plunker.
Click on right  top plunker icon.

Now fixed!


/dev/video0 is not generated

Hi, I had everything working on my old PC with VMware workstation player and win7. I'm working with a new computer now (win10 + VMware) and after I installed everything according to the README.md I encountered this error, any idea?
Thanks

Which camera model do you use?

Thank you for your reply. I was using DFK 23U445, serial number 39710010

Configured VMWare USB setting to be USB 3.0 and the problem is resolved.


Getting this error everytime Cannot read properties of undefined (reading 'default')

Any help?
I'm using Hashlips dapp github source code and trying to use this modal as the UI for connecting providers.
I follow the guide exactly and get this error
Uncaught TypeError: Cannot read properties of undefined (reading 'default')

With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x
Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)
If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.


[OOBE] Remove title bar

Rationale: the titlebar looks quite jarring at the moment, and does not have any purpose since the OOBE is meant as a dialog, not a window.
Therefore, we could hide the title bar and put in a close button into the Xaml Island (UWP) that relays the event to the WPF code to do the actually window closing.
Current:

Proposed changes: (X button still missing):

Until WinUI3 desktop apps, i think this is a no-go.  A dialog should have the X to close out but I don't want to have to recreate while using an island to route this functionality.  It becomes an accessability issue.
We'll have to revisit this with Settings no matter what when we can adopt WinUI3


display-managers: Fix the xsession parameters

From the specification: "Quoting must be done by enclosing the argument
between double quotes" 0.
Tested with:

[x] SDDM
[x] LightDM
[x] SLiM
[ ] GDM (fails to build on master)
[ ] auto (ignores the desktop entry files (i.e. doesn't provide any parameters to the script))

On nixos-unstable (with a VirtualBox VM).
Things done

[x] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS

This does not fix the problem with sddm.

@Mic92 Are you running NixOS 17.03? On nixos-unstable it seems like the xsession script doesn't actually get any parameters (at least that's the case on both of my GUI systems...).

I actually find the current display-manager script too complex

Agreed :smile:

would actually prefer to have a script per desktop file instead of relying on shell scripts parsing.

I'd rather improve the documentation/comments and refactor the code. Normally I would expect that the xsession script is getting called like this: /nix/store/XXX-xsession none\ +\ i3 which shouldn't be that problematic to parse ($1=none\ +\ i3 or $2, if $0=$1 which seems to be the case).

This one works for me: https://github.com/NixOS/nixpkgs/pull/25199/commits/0ad2ba698f123e6a13a3304f386933c48e340133

I guess we want both pull requests though

Here is what I get:
Apr 25 20:56:15 turingmachine xsession[29898]: first: none
Apr 25 20:56:15 turingmachine xsession[29898]: second: +
Apr 25 20:56:15 turingmachine xsession[29898]: third: awesome
Apr 25 20:56:15 turingmachine xsession[29898]: forth:
Apr 25 20:56:15 turingmachine xsession[29898]: fifth:
Apr 25 20:56:15 turingmachine xsession[29898]: first: none
Apr 25 20:56:15 turingmachine xsession[29898]: second:
Apr 25 20:56:15 turingmachine xsession[29898]: third:
Apr 25 20:56:15 turingmachine xsession[29898]: forth:
Apr 25 20:56:15 turingmachine xsession[29898]: fifth:
Apr 25 20:56:15 turingmachine xsession[29898]: 28

I added the following:
  # Handle being called by SDDM.
   if test "''${1:0:1}" = / ; then eval exec $1 $2 ; fi
+ echo "first: $1"
+ echo "second: $2"
+ echo "third: $3"
+ echo "forth: $4"
+ echo "fifth: $5"

it is rexeced twice. It may work for you because you are using a desktop manager rather then a window manager.

It may work for you because you are using a desktop manager rather then a window manager.

It actually doesn't but looking at the specification I hoped it would. I expected that $1 would contain "DM + WM" but the specifications unfortunately doesn't say if the double quotes actually escape the spaces... :o This actually fixes lightdm but breaks slim and sddm. The current situation seems to be horribly broken -> I'll update this PR and change " + " to "+" (no spaces). This should fix everything for sddm and lightdm but will most likely break slim (I'll add a workaround if it doesn't work).

This should fix "everything". I'll run some final tests and merge this in ~1-2h. If it doesn't cause any problems on nixos-unstable (I'll wait 1-2 weeks) I'll test this on 17.03 and backport it to stable if it doesn't cause any problems.

Let's hope that this doesn't break anything :D
But it should be pretty save (tested with all login/display managers) and after I realized that it's a bad Idea to assume that stderr output won't be redirected to /dev/null everything made sense again (that's also why it looked like SDDM wasn't providing any parameters).

Backported to 17.03 (c893d7adcc0c669f0c37f00f7a8cbfbfd7e53604 and<PHONE_NUMBER>53061fef1b78e1398e404b7478ea7d) and tested with SDDM, LightDM and SLiM.


[Bug]: Casting with item (/class bind) causes cooldown to be displayed 2x

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
If you bind a skill to an item and right click while looking at a block it will trigger the cooldown to show up twice in chat.
Expected Behavior
The cooldown that shows up in chat should only show once per cast.
Steps To Reproduce

Bind a skill to your item
Look at a block when you cast it

Environment
- Server Software: 1.17.1
- ProSkillAPI Version: <IP_ADDRESS>
- ProMCCore Version: <IP_ADDRESS>
- Plugins: https://i.imgur.com/byCrYmR.jpeg

latest.log
there are no errors
Anything else?
No response

I'm not getting this behavior. Might have been fixed by recent updates, so I'll mark this as resolved.


chore(deps): update pnpm to v9.12.2

This PR contains the following updates:

Package
Type
Update
Change

pnpm (source)
packageManager
patch
9.12.1 -> 9.12.2

Release Notes

pnpm/pnpm (pnpm)
v9.12.2: pnpm 9.12.2
Compare Source
Patch Changes

When checking whether a file in the store has executable permissions, the new approach checks if at least one of the executable bits (owner, group, and others) is set to 1. Previously, a file was incorrectly considered executable only when all the executable bits were set to 1. This fix ensures that files with any executable permission, regardless of the user class, are now correctly identified as executable #8546.

Platinum Sponsors

Gold Sponsors

Our Silver Sponsors

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Hywax Assistant.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (5ede8f3) to head (fc0ba74).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff            @@
##              main       #78   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            3         3
  Lines          147       147
  Branches        26        26
=========================================
  Hits           147       147

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


COOK-2145 - Perform steps from mysql_secure_installation

Documented allow_remote_root in the READNE.md and updated the grants.sql to delete non-localhost root users if it is false. Also updated to use the queries that mysql_secure_installation uses which updates all root passwords instead of just the localhost one.
Added remove_anonymous_users (default false) which deletes users with no username for security, again copying the query from mysql_secure_installation and documenting in the README.md
Added remove_test_database (default false) which deletes the test database that should not exist in production. It also removes any privliges to the test DB or DBs starting with test_ . These queries are also copied from mysql_secure_installation and documented in the README.md

Sorry for posting in this old PR, but is this functionality still provided by version 6 of this cookbook?

It works slightly differently now, but int he same spirit.
If there are files in the data_dir, it does nothing.
If the data_dir is empty, it initialized a new database, removing all accounts except for root@initial_root_password
https://github.com/chef-cookbooks/mysql/blob/46dccac22d282a05ee6a401e10ae8f5f8114fd66/libraries/helpers.rb#L120-L126

Thanks, I'll have a look.


Python solution for Check if BST

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Additional context
Add any other context or screenshots about the feature request here.
Link for the problem : https://leetcode.com/problems/subtree-of-another-tree/

Please assign me this issue

The link that you have mentioned is not of "Check if BST"

https://practice.geeksforgeeks.org/problems/check-if-subtree/1/
and https://leetcode.com/problems/subtree-of -another-tree/  but are same problems . Changed the title

https://practice.geeksforgeeks.org/problems/check-if-subtree/1/
and
https://leetcode.com/problems/subtree-of-another-tree/
but are same problems . Changed the title

Yeah, that's okay. But previous the title was "Check if BST".
Anyway, you can go ahead !


Optimize DDLGuard to remove useless two-level mapping

What problem does this PR solve?
Issue Number: close #7636
Problem Summary:
What is changed and how it works?
We don't need the two-level mapping database -> table -> exception_message for DDLGuard, because the table(with table_id and keyspace_id) is a global unique.
Thus, we optimize it to simplify the code.
Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/rebuild

/cc @JaySon-Huang @flowbehappy @lidezhu

/merge

/run-all-tests

/run-all-tests

/run-integration-test

/run-all-tests

/run-unit-test

/run-all-tests

/run-integration-test


ustream_forward: a lightweight smart-pointer for fast and efficient data transfer

Interfaces:

flush(): copy data from source to destination directly
read(): copy data from source to destination indirectly utilizing a user-provided local-buffer
get_size(): get total length of data source
dispose(): free all resources associated with ustream_forward smart-pointer

Note: does not yet support infinite streams.

static void check_buffer(

The implementation of this code in a .h was done to integrate it with ctest, however we decided to do not use ctest anymore, so, we can move away from this issue, by implementing it properly in a .c and leaving only the method signature in the .h.
So please create an az_ulib_test_aux.c with these implementation, and rename this file to az_ulib_test_aux.h (or other meaningful name).

Refers to: tests/inc/az_ulib_ctest_aux.h:33 in 242ca43. [](commit_id = 242ca43e554af55676696c75fdd5e5489f342965, deletion_comment = False)

Please avoid double inclusion and add extern "C".

Refers to: tests/tests_ut/az_ulib_ustream_forward_ut/az_ulib_ustream_forward_ut.h:6 in bf96db8. [](commit_id = bf96db8a2fd66acad3a1b745f097e96906e22441, deletion_comment = False)


Crash Report

VSCode Version: Code 1.12.2 (19222cdc84ce72202478ba1cec5cb557b71163de, 2017-05-10T13:13:11.413Z)
OS Version: Darwin x64 15.6.0
CPUs: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz (4 x 2500)
Memory (System): 16.00GB (0.28GB free)
Memory (Process): 209.46MB working set (0.00MB peak, 168.31MB private, 102.50MB shared)
Load (avg): 3, 3, 3
VM: 0%
Initial Startup: no
Screen Reader: no
Empty Workspace: no
Timings:

Component
Task
Time (ms)

renderer
window.loadUrl() => begin to require(workbench.main.js)
365

renderer
require(workbench.main.js)
949

renderer
-> of which require() node_modules
283

renderer
create extension host => extensions onReady()
1283

renderer
restore viewlet
1361

renderer
restore editor view state
1740

renderer
overall workbench load
2143

main + renderer
start => extensions ready
2709

main + renderer
start => workbench ready
3468

Additional Steps to Reproduce (if any):

@spsenthil Please provide some actionable information


"Login unsuccesfull: Unable to login, please check your credentials" after update to HA 2022.05 & Indego 3.8.1

Hello,
I've enjoyed seamless integration until I updated both HA and the Indego module this morning. Now I see...
Logger: custom_components.indego
Source: custom_components/indego/__init__.py:233
Integration: Bosch Indego Mower (documentation)
First occurred: 09:30:47 (1 occurrences)
Last logged: 09:30:47

Login unsuccesfull: Unable to login, please check your credentials
Nothing else changed between a working integration before the update and I can confirm that I have access to my Bosch account using the same details in the Android app.
I'd be very grateful of your advice on how to fix this.

Same here.

And the same here, excellent description by OP.

I had the same issue. But after another HA restart (to activate debug logging) it now works again.

I had the same issue. But after another HA restart (to activate debug logging) it now works again.

I can confirm that. Thanks.

Yup , another restart worked for me also. Many thanks for sharing your discovery.


Middleware

Another approach to test is having Django middleware check the requests and responses across the wire.
Two projects do that https://github.com/zlqm/openapi-toolset and https://github.com/Cohey0727/drf_open_api_validator .  I am using the former, with good results (and few more patches pending), as the latter seems stagnant at https://github.com/Cohey0727/drf_open_api_validator/issues/3 .
While I am moderately happy with my current solution, django-swagger-tester looks like a more comprehensive framework and it could benefit from such a 'live' testing mode, which could be engaged during unit tests, or on real sites.

Very interesting suggestion.
Fundamentally, this package works in a static manner; requiring you to manually write tests for each view, and as a consequence it has no performance impact on the running application.
I take it you're suggesting that the testing is moved from being a part of the test suite, to being performed live on every request? That doesn't sound very difficult, except you would need some mapping to connect incoming requests to the relevant section of the OpenAPI schema.
The way the package currently works, we require

Request method (GET, POST, ..)
Response status code
The API endpoint route

The first would be easy to get in a Middleware context, but how would you go about the other two? Would it be possible to handle an outgoing request in a context where we could infer the last two?

You get the request and response methods passed to the middleware. It includes path, method, status code, body and so on.

This seems like it would be pretty easy to implement then. The only thing I'm unsure of is just whether adding a middleware layer is an efficient way of a validating a static schema. Wouldn't you end up validating the same thing over and over?
That being said, I can see the benefit of having something like this running in the background during development.
@jayvdb, is this something you would be willing to create a pull request for?

Wouldn't you end up validating the same thing over and over?

In a production system especially, validating the requests is a way of identifying and rejecting malformed requests before they hit the views.
And validating the responses is a bit repetitive, but it offers a way of ensuring that a valid response is emitted irrespective of the request and state of the system.  And usually this highlights all sorts of DRF responses which were not described in the spec.  e.g. does the spec accurately describe what the response will be when the database is temporarily locked?  Most people dont include all of those scenarios.   drf-yasg and friends certainly do not do that automatically, and hand-crafting those is not simple, so people usually dont do it.  https://github.com/tfranzel/drf-spectacular/issues/101 will hopefully automate that soon.

is this something you would be willing to create a pull request for?

I've already done quite a bit of the polishing to get https://github.com/zlqm/openapi-toolset/blob/master/openapi_toolset/django_plugin/middlewares.py working, and atm I am focused on getting the value out of that time investment.
But before getting into who codes it, there is much to think about for how the code should work.  I've given links to two existing implementations, and neither are very mature, but they at least allow identification of problems with Django integration which havent really been tackled yet, and this project might build a better mouse trap if it tries to get the design right from the beginning.  This is made more complicated because the focus of this project is testing, and this middleware would mean it needs to also support being run in more diverse environments, possibly even production environments.
If the focus is on testing, errors can simply be exceptions that ripple out to the test runner.
This also works reasonable well in development, but Django will convert those exceptions to 500 HTML responses, which isnt very helpful for a DRF client, probably even violates the spec it is enforcing.  https://github.com/zlqm/openapi-toolset/issues/2 has some thoughts about this.
And in production, Django middleware should never raise exceptions that were not explicitly requested by the implementor, as each piece of middleware needs to interoperate with other middleware.  If a middleware can not safely handle a request or response, it should defer to the next middleware.  In the case of OpenAPI spec checking, obviously the middleware should be active on routes it sees in the specs.
What should the middle do when a route in the spec doesnt have a delete, but a delete request comes in?  Should it reject the unknown operation, or defer since that operation isnt covered by the spec?  Most people would think that should be a clear reject!  Ok, but if we are rejecting unknown delete, what about unknown options requests?  Does your spec explicitly allow options requests, and accurately describe their responses ?  What about head? ;-)  Thankfully the list of HTTP methods is quite small, so there can be a setting to whitelist/ignore options and head, so that delete can be blocked by default, and implementers can add delete to that whitelist if they want to allow delete through even if it isnt advertised in the spec.

... but it offers a way of ensuring that a valid response is emitted irrespective of the request and state of the system. And usually this highlights all sorts of DRF responses which were not described in the spec. e.g. does the spec accurately describe what the response will be when the database is temporarily locked? Most people dont include all of those scenarios. drf-yasg and friends certainly do not do that automatically, and hand-crafting those is not simple, so people usually dont do it. tfranzel/drf-spectacular#101 will hopefully automate that soon.

I'm a little unclear about what you mean here - are you saying that OpenAPI schemas do not always document all response codes? To me it seems like validation of missing response codes or request types in the an OpenAPI schema should be skipped altogether.

To avoid potential misunderstandings I think it might be good to explicitly state what the full scope/purpose of the envisioned middleware should be. The current scope of the package is response validation in the sense that we make sure outgoing responses adhere to the application's OpenAPI specification - I'm assuming that this would also be the scope of the middleware as well - please let me know if that falls short of what you're proposing.
If the scope of the middleware is limited to only verifying that your APIs are adherent to an OpenAPI specification, I don't think it would ever be appropriate to reject a request. Instead I see this as an aid to developers, and would think that a mechanism for alerting developers about non-adherent responses would be sufficient, e.g., by using logging with a settings-specified log level. For this type of solution, you would probably also need a whitelist mechanism, where you could whitelist traffic to certain routes, to avoid problems when serving non-documented endpoints; I have certainly created applications in the past with /health health check endpoint, that were purposely excluded from swagger documentation - this seems like a use pattern that needs to be accommodated for.
I'm currently on vacation, so have not had the chance to browse through the linked implementations in detail, but unless I'm missing some key functionality here, this seems very easy to implement.

I'm also a bit confused here.

What should the middle do when a route in the spec doesnt have a delete, but a delete request comes in? Should it reject the unknown operation, or defer since that operation isnt covered by the spec?

To me this is an obvious no. This package is created to validate response vs. documentation, and wrong or lacking documentation shouldn't interfere with an actual request/response. It's not a serializer.
I agree with @sondrelg here, simply logging it would be a nice feature. How ever, since documentation isn't compiled it could cause some serious overhead.

The current scope of the package is response validation ..

The README also talks about Input Validation :P
Even if the intended scope is response validation, choosing the correct response spec depends on the incoming request being validated, otherwise you cant ignore responses to requests which are outside of the spec.  I mentioned undocumented HTTP methods above, which are very high level, and you mentioned undocumented paths like "health checks".  But there are many more types of requests which deviate from the spec in more subtle ways, such as a request including a query param that are not in the spec's endpoint definition.  In the case of drf-yasg , that probably means the spec creator/generator wasnt able to inspect the view mechanisms correctly, and the spec for that request is probably only correct for a basic subset of requests, and the response might be quite different from the spec.  Where I see this happen frequently is dynamically expanding sub-queries. (e.g. djangorestframework-expandable, but I forget exactly which ones trips up drf-yasg)
fwiw, drf-yasg is dead, long live drf-spectacular, which is much more likely to get OpenAPI 3 right. :P
And I would need https://github.com/snok/django-swagger-tester/issues/61 done first, before me building middleware here would be a worthwhile activity.  But I could conceivable do that.

Wrong or lacking documentation shouldn't interfere with an actual request/response.

OK.  Reasonable approach.  Even in tests, often one wants an invalid request to go through to the view.
But then some other mechanism would be desirable to allow test suites to access the results of this spec validation middleware.  IMO logging alone isnt a useful/desirable way for tests to detect what occurred during the processing of a request.
But I guarantee that as soon as this feature is built without invalid request/response rejection, someone will request it.  Especially validation of incoming requests.  Lots of helpers exist to make DRF easier by automatically doing validation of incoming requests based on dataclasses or similar meta information.  OpenAPI provides the necessary meta information to do this, and so it is natural that people will want to re-use that.
That said, if we build it so that the spec validation information is not lost, people can build separate components that re-purposes this middleware to do rejection according to their own needs.

Some more oddballs that I have encountered, which could effect scope/impl of this middlware, and worth discussing early here to get a common understanding, and possibly require other enhancements before an effective middleware is possible:

undocumented content-types
responses without a content-type
content type mismatches, major, or minor such as application/problem+json (rfc 7807) responses to Accept: application/json requests which the client will recognise without worries, but the spec probably isnt correct.
response content which doesnt match the content-type
requests which dont include a body and/or content-type
requests or responses which are not deserialisable with the charset, declared or default
empty responses
empty specs
invalid spec, or exception occurring inside the schema class loader

If the general approach is going to be to not throw exceptions / reject any request or response, these are the types of oddballs that some outer layer (test runner, or other middleware) may want to know about, and may need to be exposed in a structured way.
I havent studied the code here in detail yet, but it seems that content-type isnt a fundamental part of this library yet - the schema loading mechanisms dont seem to handle varying schema based on content-type.  That seems like it will be a major roadblock for drf-spectacular and this middleware.

Ok, this is good, I think I'm starting to understand.
The way I'm reading you based on the last post is that you want this middleware to be able to validate incoming request data based on the schema. In other words, for a post request to a given endpoint, the middleware should be able to return, e.g., a 400 if the request body is a string where it should be an int. It would work similarly to DRFs ModelSerializer just based on the OpenAPI schema rather than a database model - and it would be more comprehensive, since it could do more than just validate a request body (ref oddballs section). Am I understanding you correctly?
For that purpose I can see how you might want to reject a request in the middleware layer - this is what both me and @JonasKs (probably) were missing before.
With DRF-spectacular, I take it your vision would be that Django REST APIs could be built with DRF as the base layer, DRF-spectacular as the documentation layer (which infers most of it's information from DRF), and you could add request and response validation to various degrees using the schema definitions in a middleware layer? This way you could forego defining a DRF ModelSerializer or Serializer for your APIView and instead automatically have a base level of validation for all your views. Is that right?

That is roughly correct.  However my own goal isnt to remove any validation in views/serializers/etc, but adding an extra layer on top.
I am only recognising that many Django devs are keen to generically handle validation, derived almost exactly on the model, as they view the extra layers are unnecessary.  (And that is sort-of true for very simple models, which is all many people try to build at the beginning, but they tend to find their models get very complicated over time as the business logic gets more complicated, because they are trying to stuff all the extra logic into their model as semantic meta clues used by various other layers.  But I digress..)  For that style of project, it is better if they are enhancing their OpenAPI rather than trying to get their models to define strict validation rules.
To understand my scenario a bit better...
The Django project may be using third-party apps, and those may not have ideal validations, either because they are very flexible, or because of bad coding.  e.g. an address app might allow any address in any country, and may have two sets of problems : the project may not want to support any country, and there may be insufficient constraints in place because of its flexibility.  Or I have two apps which have an address (customer and shipping), and they have slightly different validations.
Typically this is resolved by subclassing the third-party app views, serializers, etc, to refine the exposed API.
However with drf-spectacular especially, but also drf-yasg, and even drf-core with some extra work, it is possible to override the schema definition, adding more constraints as metadata at the outermost level.  Backend devs rarely do this, because it is metadata which is typically not used anywhere, and seems to be duplicating the other layers.
But if that metadata is added to the OpenAPI, third party apps can be adapted to the project needs without adding technical debt, and this can be enforced in middleware.
Likewise on the response side, extracting the schema from third party apps captures the expected output of the third party app, and it can be desk checked, and a client built around it.  But then it emits a strange response under unusual circumstances, or after a "pip" update of some kind, and the client starts behaving strangely.  The client should have logging to sentry etc, but debugging that can be difficult, as the response might be quite close to the expected schema, causing subtle errors not near the http layer.(A TypeScript OpenAPI client validator is also on my shopping list)  If the middleware in Django starts rejecting responses from the third party app, the client gets a very simple error to handle in a uniform way, and the backend is immediately seen as the problem.  No frontend devs are engaged to investigate the problem - managers send it straight to the backend devs, or possibly even ops who just rollback immediately.  Logging only in the backend will also work if ops / managers / etc are directly watching sentry and understand the gravity of the incorrect response schema, but IMO they tend not to, and a policy of rejecting responses empowers ops to rollback the last deploy quickly, or triggers managers if there are suddenly frontend errors occurring and the cause is unrelated to a recent deploy.

I do like the idea of making API development more schema centric, or at least deriving more of a benefit from the effort put into proper API documentation. A schema generator library that infers as much information as possible from DRF coupled with a middleware for providing a base-level input validation seems like a good idea - even better if it can be extended with or from DRF serializers.
I really hope this becomes a reality, but it is not clear to me that the middleware should live in this repository, as it seems like a much bigger undetaking than the whole repo currently is. I'm curious to why you think the middleware should be separate from the schema generator library in the first place - would it not make more sense to build this as a part of drf-spectacular or as a downstream library from it? One thing I found writing this package is that catering to both static OpenAPI schemas and generated schemas creates a lot of overhead.

IMO the middleware shouldnt be tied to the generator - OpenAPI is the interface that separates them.  fwiw, drf-spectacular is primarily static.
The reason to build it in a testing tool is that live request/response checking assists testing, and ideally any invalid requests/responses are caught in tests before deploys.
Any why this project?  Even before I knew about the issue here for supporting drf-spectacular, the design here smacks of a good mix of 'tight' coupling with schema generators to extract as much info as possible, with generic use of that info for validating the implementation.  There are lots of DRF killers being built, and gaining traction, so I dont want to be building/using testing tools that only work with DRF.

Good points. I will have a look at this once I'm back from vacation in about 10 days.
I'm keen to at least build a simple version of what's been suggested.

@jayvdb, how would you propose the middleware should work? Opt-in or opt-out? It seems that both would require some mapping of views. similar to the way routes are structure in an urls.py. After thinking about it, it seems a little backwards to do it this way.
An alternative, perhaps simpler solution seems to be to offer decorator functions you can use for each view. I've created an mvp working example below

def validate(request_body=False, uri_parameter=False, response=False):
    def outer(fn: Callable):
        @wraps(fn)
        def inner(*args, **kwargs):
            if not isinstance(args[0], Request):
                raise ImproperlyConfigured('The first argument to a view needs to be a Request')

            if request_body:
                # input validation function here
                print('Request body', args[0].data)

            if uri_parameter:
                # path param validation function here
                print('URI parameters', kwargs)

            # ^ Code above this line happens before the view is run
            output = fn(*args, **kwargs)

            if response:
                # response validation function here
                try:
                    validate_response(response=output, method=args[0].method.upper(), route=args[0].path)
                except SwaggerDocumentationError as e:
                    logger.error('Response from <class name> (<route>) returned an incorrect response, '
                                 'with respect to the OpenAPI schema')

            return output
        return inner
    return outer

@jayvdb,
I've been looking at this for a while now and I'm getting to the point where I'll start testing the implementation.
The first draft is here. Feel free to have a look and flag anything you think might be missing or confusing.

I'll check it out later today.
We have started using https://github.com/kiwicom/schemathesis , so I can push thousands of test cases through it ;-)

After fiddling with this for a while, I've decided to implement a response validation middleware first, before venturing onto a request body validation type middleware. If you're interested, please have a look at #74


ContextData is missing from Media.Event.StateStart events.

Expected Behaviour
com.adobe.marketing.mobile.MediaTracker#trackEvent should send contextData
Actual Behaviour
contextData is missing from request.
Reproduce Scenario (including but not limited to)
Add contextData to trackEvent that is send from example app
com.adobe.mediaanalyticstestapp.player.PlayerEvent#PLAYER_STATE_MUTE_START.
Please find code below.
Steps to Reproduce
Mute device when playing content on example app.
Platform and Version
Tested on Android 13 and 14 with com.adobe.marketing.mobile:media 3.0.0
Sample Code that illustrates the problem
HashMap<String, Object>stateInfo = Media.createStateObject(MediaConstants.PlayerState.MUTE); 				HashMap<String, String> hashMap = new HashMap<>(); 				hashMap.put("language", "sv"); 				stateInfo.putAll(hashMap); 				_tracker.trackEvent(Media.Event.StateStart, stateInfo, hashMap);
Logs taken while reproducing problem
Logs show that language is added both event.metadata and event.param.
MobileCore/EventHub - Dispatched Event #28 to extensions after processing rules - ({                                                                     class: Event,                                                                     name: Media::TrackMedia,                                                                     uniqueIdentifier: 416de94f-a53a-47e2-bb92-7edd26fe47c3,                                                                     source: com.adobe.eventsource.media.trackmedia,                                                                     type: com.adobe.eventType.media,                                                                     responseId: null,                                                                     parentId: null,                                                                     timestamp:<PHONE_NUMBER>902,                                                                     data: {                                                                     "event.internal": false,                                                                     "event.metadata": {                                                                         "language": "sv"                                                                     },                                                                     "trackerid": "5f2f2850-fbdd-4b86-8ca8-7177f10120b3",                                                                     "event.param": {                                                                         "state.name": "mute",                                                                         "language": "sv"                                                                     },                                                                     "event.name": "statestart",                                                                     "sessionid": "3525998e-dddd-4bf6-ab02-1ac683175f63",                                                                     "event.timestamp":<PHONE_NUMBER>901                                                                 },                                                                     mask: null,                                                                 })
Request JSON body is missing language from both params and from customMetadata
{   "playerTime": {     "playhead": 42,     "ts":<PHONE_NUMBER>902   },   "eventType": "stateStart",   "params": {     "media.state.name": "mute"   } }

Hello @niemton
The trackEvent("stateStart") and trackEvent("stateEnd") APIs don't support any additional context data.
Thanks,
Arjun

Thanks for the reply. How then can we send selected track information? It
includes both language and type fields.
pe 13. lokak. 2023 klo 18.57 Arjun Bhadra @.***>
kirjoitti:

Hello @niemton https://github.com/niemton
The trackEvent("stateStart") and trackEvent("stateEnd") APIs don't
support any additional context data.
Thanks,
Arjun
—
Reply to this email directly, view it on GitHub
https://github.com/adobe/aepsdk-media-android/issues/27#issuecomment-1761747053,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AWQR5KHUSUMWZQUV4CCZO2TX7FQHHANCNFSM6AAAAAA57KNEZM
.
You are receiving this because you were mentioned.Message ID:
@.***>

@niemton, There is no way to do this in the trackEvent Player state APIs. How about passing the language with either trackSessionStart or trackEvent(chapterStart) APIs? If you want to request this feature, you can open a Jira ticket for the PMs look at.


The Preprocessors in C language

Description
I would like to make a documentation on different preprocessors in C language along with suitable example.
Domain
C/CPP
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign

I want to work in this issue.

I want to work with this issue,please assign this issue with me


Enhance 'startplugin' templates

Fixes: #1405
This PR replaces some imports in the startplugin templates.

Replaces the django.views.generic with nautobot.core.views in views.py-tlp file.
Replaces django..TestCase with nautobot...TestCase in the test_views.py-tpl and test_models.py-tpl files.

The first one fixes an error reported in 1405.
The second replaces the TestCase with the one required for properly running the tests.

Thanks for the improvement @grelleum!


[BUG] Poe deadlock

Describe the bug / 描述问题
When sending a prompt to multiple POE LLMs, all LLMs waiting to other demands complete: Waiting for other Poe request(s) to complete…
To Reproduce / 复现步骤

start a prompt with multiple LLMs from Poe
see that all prompt waiting for answer

Expected behavior / 期望行为
No deadlock 😅
Sequentially sends query to Poe, or find a working version of concurrent execution.
Screenshots / 截图

Devtools Info / 开发者工具信息
No errors here.
OS and version / 操作系统版本
macOS 13.5.2 (22G91)
ChatALL version / ChatALL 版本
Version 1.50.73 (1.50.73)
Network / 网络
Yes, ProtonVPN. But the issue si still here without VPN
Additional context / 其它相关信息
No response

Try:

Cmd/Ctrl + R
Resend prompt

Already tried, does not work


chore: revert "fix(deps): update dependency js-base64 to v3"

This reverts commit 87f87153e7de896b51064f53073c543502511c3a merged from #153.
The original update introduced a breaking change that cut off support to older browsers and ES environments. For now, we will err on the side of not cutting off support and attempt to mitigate this issue in a different way later on.

:tada: This PR is included in version 0.3.0-beta.1 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Config load failure when used with Yarn PnP

When running a Vite build with Yarn PnP mode enabled (see https://v3.yarnpkg.com/features/pnp), I ran into the following error:
failed to load config from ...\vite.config.ts
error during build:
Error: vite-plugin-graphql-codegen tried to access @graphql-codegen/plugin-helpers, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Given the usage of this package in src/utils/configPaths.ts, Yarn PnP requires adding the dependency explicitly.
Solution: @graphql-codegen/plugin-helpers should be added either as dependency or peerDependency to package.json.

Should be fixed now, thanks for letting me know!


Remove @author and @version info from License info for the whole object

because we can use git log to show the file history...

closing this...


Language wrongly identified in my two repositories

Preliminary Steps
Please confirm you have...

[x] reviewed How Linguist Works,
[x] reviewed the Troubleshooting docs,
[x] considered implementing an override,
[x] verified an issue has not already been logged for your issue (linguist issues).

Problem Description

URL of the affected repository:
https://github.com/aysunakarsu/is-my-site-in-googles-mobile-first-index
Last modified on:

2018-03-25
Expected language:

Bash shell script
Detected language:

OpenEdge ABL

This file is recognized as OpenEdge ABL because of its file extension. Is that a Bash script?

Yes, it is a bash script.
Thanks
2018-03-25 18:56 GMT+02:00 Paul Chaignon<EMAIL_ADDRESS>
This file
https://github.com/aysunakarsu/is-my-site-in-googles-mobile-first-index/blob/48892b46aadbe1855ba0b2bb322e0979abf61171/is_my_site_in_googles_mobile_first_index.p
is recognized as OpenEdge ABL because of its file extension. Is that a Bash
script?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/github/linguist/issues/4074#issuecomment-375985419,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcJwLxnNr9hRNyJk7S6wfv8sKil4RyUCks5th8xFgaJpZM4S6NVK
.

Then, as indicated in the Troubleshooting guide and detailed in the overrides instructions, you can either tell Linguist to ignore this file from statistics or force it to be recognized as Bash.


fix(kernel): calling super.property unexpectedly returns undefined

When overriding a property, the @jsii/kernel creates a shadow property
for the previous implementation. In order to preserve the existing
implementation (whether the property is dynamic or not), the property
descriptor is retrieved and re-declared with the new name.
This process did not crawl up the prototype chain, and only looked at
the object itself. In many cases, this will never return anything (since
Object.getOwnPropertyDescriptor will not return inherited descriptors)
and in this case the undefined value was always used.
This would break whenever attempting to override a property that was
inherited from a parent class, and appears to fail with certain node
runtimes where the dynamic properties are set on the object's prototype
and not on the object itself.
This change adds the necessary logic to traverse the prototype chain all
the way up to Object (not included), to locate the property descriptor
and upon failing to identify one, uses the current value of the property
instead of undefined.
This was the cause of aws/aws-cdk#9822

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

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: f8d74815b5eeda19e65da4917892b35e9aece548
Result: SUCCEEDED
Build Logs (available for 30 days)

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