Setting DateFactory to use CarbonImmutable breaks date validation when Date::setTestNow() is used

Laravel Version: 7.9.1
PHP Version: 7.4.5
Database Driver & Version: mysql 8.0.20

Description:
Setting the DateFactory to use CarbonImmutable in AppServiceProvider by calling DateFactory::use(CarbonImmutable::class); in the register function and setting a test date like Date::setTestNow(Date::parse('2018-07-19')) causes the date validation to fail. This is because validation logic uses Carbon and so it doesn't recognise the test date in Illuminate\Validation\Concerns\ValidatesAttributes trait:
/**
     * Check if the given value should be adjusted to Carbon::getTestNow().
     *
     * @param  mixed  $value
     * @return bool
     */
    protected function isTestingRelativeDateTime($value)
    {
        return Carbon::hasTestNow() && is_string($value) && (
            $value === 'now' || Carbon::hasRelativeKeywords($value)
        );
    }

Steps To Reproduce:
Set the DateFactory to use CarbonImmutable in AppServiceProvider:
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        DateFactory::use(CarbonImmutable::class);
    }

    ...
}

Run the following test:
public function testDateValidation()
    {
        Date::setTestNow(Date::parse('2018-07-19'));

        $validator = Validator::make(['date' => '2018-07-23'], [
            'date' => 'required|date_format:Y-m-d|after_or_equal:today',
        ]);

        $this->assertTrue($validator->passes());
    }

Just use Carbon directly.

@vincemukiiri I think you may have a valid point!
The Carbon:: calls in ValidatesAttributes were introduced in Feb 2018 => https://github.com/laravel/framework/commit/7bcfa908f8bd3bfcccfb0aedbd7e5d1417241b80
Later that year we got the Carbon / Date overhaul which added the ability to switch implementations => https://github.com/laravel/framework/commit/ccb9d6c311bdfa8d22e32131f3e5474d588415ac
As can be seen, many occurrences of Carbon have been replaced with the Date facade to accommodate the flexibility when the date handler is changed.
@kylekatarnls do you remember / have an idea why some occurrences like these were not adapted? https://github.com/laravel/framework/blob/a66caa51ae1a99990ce6a572ade5fd78e4ad3d3a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L258-L269
Thanks

Actually, the getDateTime() make me feel a bit uncomfortable:
    protected function getDateTime($value)
    {
        try {
            if ($this->isTestingRelativeDateTime($value)) {
                return Date::parse($value);
            }

            return date_create($value) ?: null;
        } catch (Exception $e) {
            //
        }
    }

When isTestingRelativeDateTime($value) is true, it will return a Carbon instance (or the configured class such as CarbonImmutable or any other compatible date class), else it will return a simple DateTime (mutable).
However, if it would simply return Date::parse($value); in every case, this should be uniform and produce predictible return type.
So I agree to use Date::hasTestNow and Date::hasRelativeKeywords but the whole sense isTestingRelativeDateTime may also be questioned.
@derekmd Could you please explain why handling isTestingRelativeDateTime() cases differently if true or false? Why not using Carbon to get date/timestamp in any of the 2 circumstances and let Carbon deal with the testNow which is yet properly handled?

As a first option, I propose #33623, it would fix this by removing the code in this file that is specific to hasTestNow and simply use the Date::parse() in every case so handling the testNow is delegated to Carbon or the class chosen via the Date which is my opinion the one which is responsible for that.

Thank you @kylekatarnls 🙏

Thanks @kylekatarnls! 😁


[Snyk] Upgrade prisma from 4.16.0 to 4.16.1

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade prisma from 4.16.0 to 4.16.1.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 10 versions ahead of your current version.
The recommended version was released 22 days ago, on 2023-06-22.

Release notes

Package name: prisma

4.16.1 - 2023-06-22Today, we are issuing the 4.16.1 patch release.
Fixes in Prisma Client

Field references are not available on extended clients
4.16.x cannot wrap $extend in factory function when compilerOptions.composite is true
Prisma Schema Type inside a Type not generating a right Payload
Query in findMany in prisma extends returns a wrong type
4.16.0 Count query is not returning the right type when in a transaction
FindMany returns wrong type after extending prisma client
Can't specify $queryRawUnsafe return type after extending prisma client

4.16.1-dev.9 - 2023-06-22

4.16.1-dev.8 - 2023-06-22

4.16.1-dev.7 - 2023-06-21

4.16.1-dev.6 - 2023-06-21

4.16.1-dev.5 - 2023-06-21

4.16.1-dev.4 - 2023-06-21

4.16.1-dev.3 - 2023-06-21

4.16.1-dev.2 - 2023-06-21

4.16.1-dev.1 - 2023-06-21

4.16.0 - 2023-06-20 Read more

    from prisma GitHub release notes

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Codecov Report
Patch and project coverage have no change.

Comparison is base (5ce3115) 81.66% compared to head (efe140c) 81.66%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@           Coverage Diff           @@
##           master      #55   +/-   ##
=======================================
  Coverage   81.66%   81.66%
=======================================
  Files           4        4
  Lines          60       60
  Branches       11       11
=======================================
  Hits           49       49
  Misses         11       11

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


UI tests

Draft pull request. Jest/Material-UI tests.

Awesome, thanks Sean! I will take a look today or tomorrow

Failing npm type check.

Failing npm type check.

Updated tests. Will create new pull request with updates.

Updated tests. Will create new pull request with updates.


resume the training

Hi,
Thank you for the great work.
I use the following command to resume the job but It does not resume but still start training from the scratch!why?
I'm running it on the server and it was running for 2 days(max time of allocation for students) and reached the Epoch 500 and stopped.
Now I wanna run the remaining but it does not work. what should I do?
I've double-checked the paths.
python finetune_sam2_img.py
-i ./data/npy
-task_name MedSAM2-Tiny-Flare22
-work_dir ./work_dir
-batch_size 16
-pretrain_model_path ./checkpoints/sam2_hiera_tiny.pt
-model_cfg sam2_hiera_t.yaml
-resume ./work_dir/<task_name>--/medsam2_model_latest.pth

Hi,
would you mind if you could share screenshots of

slurm job submission script
in python shell torch.load('./work_dir/<task_name>--/medsam2_model_latest.pth') and print checkpoint["epoch"]?

Hi Thank you for responding:
this what I get which is correct based on run:

I get it into run.
The issue was while everything was good, there is a line which assignes a default value to resume "resume=None" in the first lines of the code.  changing it to another value other than "None" fixed the problem:


[BUG] Custom properties added with addTelemetryInitializer are ignored for exceptions

Description/Screenshot
Custom properties added with addTelemetryInitializer are ignored for exceptions
Custom property session_id is only send for custom events. It is not send with any exception

Steps to Reproduce
init telemetry with custom properties
        const telemetryInitializer = (item: ITelemetryItem) => {
            if (item.data !== undefined) {
                item.data.session_id = theConferenceController.getClientSessionIdentifier();
            }
        };
        appInsights.loadAppInsights();
        appInsights.addTelemetryInitializer(telemetryInitializer);

Calling examples
      getAppInsights()?.trackEvent({name: "TEST"});
      throw Error("This is just a test, calm down");
    } catch (error) {
      getAppInsights()?.trackException(error);

OS/Browser:
Chrome: Version 81.0.4044.129 (Offizieller Build) (64-Bit)
SDK Version [e.g. 22]:
"@microsoft/applicationinsights-react-js": "^2.5.4",
"@microsoft/applicationinsights-web": "^2.5.4",
How you initialized the SDK:
https://github.com/Azure-Samples/application-insights-react-demo/blob/master/src/TelemetryService.js

Expected behavior
session_id should also be send on exception like it is send when custom events are triggered.
Additional context
No

This is an issue with the way that the exception envelope is created.
I have a work item around enhancing the way the exceptions are serialized (part of a fix for #363), I'll see if I can address this at the same time.

I'm also tagging as an enhancement as it appears to have been like this for a while -- it assumes that custom properties are passed to the trackException() which they aren't for automatically caught exceptions

i had raised this issue almost a year back and it was closed stating this was fixed.
reference: https://github.com/microsoft/ApplicationInsights-JS/issues/954

Release is now fully deployed


Problem with explanatory diagram(s) - no annotations

The diagram illustrating the parts of a lambda expression is duplicated.
Neither of the copies of the diagram actually includes annotation of what the numbers indicate. Nor does the surrounding text.

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

ID: 437be494-4752-c2de-a8c0-c4bc8563ddb4
Version Independent ID: 51317bb8-4c01-146a-f1a7-eba0e54cb5e4
Content: Lambda expressions in C++
Content Source: docs/cpp/lambda-expressions-in-cpp.md
Product: visual-cpp
Technology: cpp-language
GitHub Login: @corob-msft
Microsoft Alias: corob

@Davi-Gray
Thanks for the report; the issue should be fixed soon. Closing it as a duplicate of #4419.


feat: Infinite scroll-added

Related Issue
#941
Description
https://www.loom.com/share/b5f0ba3952834ceba22a91a2650c51cf

there are a conflicts error please resolve 😢


What is the purpose of this driver?

What is the purpose of this driver? Why don't you just join efforts with the Mesa team? why would anyone use this driver instead of the Mesa one that comes pre-installed on all distros?
If there's a reason to keep things separate, I'd just like to know.
Thank you

Thanks for your interest in our driver.
The amdvlk code base exists separately from mesa because the code is shared between Linux and Windows.
A lot of the code is actually also shared with other (non-Vulkan) drivers.
Mesa also shares its code between drivers and vendors but it is not used for Windows drivers.

If amdvlk or radv is better usually depends on the concrete use case/game. For some games radv performs better, for other games amdvlk performs better.
Vulkan makes it easy to install both and choose between them by changing an environment variable.
I hope I was able to answer your questions.

hi, thanks for your answer
I still think this is not the best way to spend your software budget on linux drivers, considering that most linux users will use radv

I believe that this driver is also being used by an AMD customer on Android as well so it isn't just about sharing code between Linux and Windows anymore ?

AMDVLK is mainly to provide reference implementation to our customers, as well as RADV (such as new ASIC support).


Crash AudioFileStream.close

I havent had time to dig into the issue yet, but I'm seeing a crash when using the latest version. I'll spend some more time debugging next week and will paste a screenshot below for now. FWIW, this isn't happening on my forked repo.

Can you try on the latest commits if it's still reproducible?

I tried on main and now I'm consistently getting a crash at:

I tried on main and now I'm consistently getting a crash at:

Can you share which Xcode and iOS version are you using? Also if running on device or simulator.

@mihai8804858 xcode 15.3 and iOS 17.5.1 on a physical iPhone 12 pro

I spent some time looking into this and I think the issue is on my end. I was initializing the AudioPlayer inside an AsyncStream which I think is not very thread-safe. When I move the initialization outside of the AsyncStream I dont experience the crash.

I spent some time looking into this and I think the issue is on my end. I was initializing the AudioPlayer inside an AsyncStream which I think is not very thread-safe. When I move the initialization outside of the AsyncStream I dont experience the crash.

Thanks, I was also able to reproduce the crash on my side and I'm looking into a fix on our side as well.

Should be fixed in 1.0.4.


change number to string for cluster config value

Fix error when trying to add a config that uses a number (eg root_volume_size or ebs_size) on the [advanced cluster setttings]

Tried a test on this stage: https://deploy-integ.pinadmin.com/env/test_env/new_stage/config/cluster/config/
Now we can add the root_volume_size:


Feature Requests: slash command, floating toolbar, drag&drop etc

I saw lexicaljs playground has features like:

slash (/) command to invoke a drop down that contains the shortcut commands.
floating toolbar when selecting some text.
Drag and drop a block node.

I'm wondering if we can introduce those convenient features into MDX-Editor, I can contribute if you would give some guidances :)

These are all cool optional features to introduce, and I've considered all of them for future integration. I draw a lot of inspiration (and use the playground code) as a starting point, but usually end up changing a lot of it.
If you need any of those for your own use, I would be very grateful if you can develop them in a fork of the editor - I would love to pick them up eventually.
Here's what I can describe as a general guideline/difference between MDXEditor and the playground:

The playground uses React components for logical plugins. The MDXEditor codebase uses a stream-based state management - I find it hard to manage complex state with react hooks.
Most of the UI primitives (popups, dropdowns, etc) in MDXEditor use the Radix components.
The icons are taken from Google's Material design system, with some modifications where necessary.

Hope this helps - let me know if you need any further clarifications. I'm going to close this issue but feel free to follow up.


[CI]: Increasing the code coverage

Current Behavior

Desired Behavior

Implementation

Acceptance Tests

Contributor Guides and Handbook

🛠 Meshery Build & Release Strategy
📚 Instructions for contributing to documentation

Meshery documentation site and source

🎨 Wireframes and designs for Meshery UI in Figma
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

I can help on that

Hi @Freedisch Which one do you want to work on?

@Freedisch Ok, I will assign it to you. Please write some useful and simple cases.

remove

Hi @Aisuko  Can you please assign me this issue to work on?
Thank you!!

@gopivaibhav Sorry to reply so late. Please trying to work on increase mesheryctl first.

Thank you @Aisuko I need some time to analyse this issue and work on it as I am packed with 4-5 issues assigned to me.

Hi @gopivaibhav Noticed and thanks.

remove


feature : allow output file name / location

as an efc user, i should be able to provide the output file name or output folder location for encrypt/decrypt operations.
eg:
./efc -o /new_location/output.gif -s /old_location/input.gpg -t d -p pass
The file should be decrypted to /new_location/output.gif.

this feature is implemented: refer to : https://github.com/compilable/efc/pull/19
thxs

pull request approved.


CODEOWNERS seems to have been broken by recent (github) update

It would appear that CODEOWNERS now enforces that owners have write access.
Not sure what brought about this rather annoying change, or whether we can workaround it somehow

ive raised an upstream ticket re this https://github.com/dear-github/dear-github/issues/410


Roblox players both bloxstrap and microsoft store versions fail to load all interfaces.

So I'm not really sure who else to go to about this, about 2 weeks ago I started having this issue and it has not since been fixed. I have tried everything from doing a complete manual Uninstall of both bloxstrap and roblox itself, even went as far as to reinstalling my graphic drivers. The interface will load up but none of the assets will load in, games won't launch and everything from the Microsoft store version to the unaltered windows player is giving me this issue. After about 10-20 seconds the player will proceed to crash. Anyone have any idea how to fix this?

See this: https://github.com/pizzaboxer/bloxstrap/wiki/Roblox-crashes-or-does-not-launch

Will try these out, thank you!

Yeah didn't work sadly, probably a roblox issue. Just gonna have to wait it out. Seems like the platform has been bugging ever since this hyperion update came out SMH.


Use with @astrojs/renderer-solid

Looks like it works with react, vue and svelte, but not solidjs.

@millette Can you share what are you doing? I tried in my machine and I see I can't even use solid-js.

I have in astro.config.js:
export default ({
  renderers: ['@astrojs/renderer-solid']
})

And in package.json:
{
  "dependencies": {
    "@astrojs/renderer-solid": "^0.4.0"
  }
}

My project is currently private, sorry. However, there's an official example https://github.com/withastro/astro/tree/main/examples/framework-solid.

Is the framework-solid example working locally if you don't use astro-imagetools?

Works for me.
mkdir astro-framework-solid
cd astro-framework-solid
npm init astro -- --template framework-solid
npm i
npm run dev # launch browser on localhost:3000 - it works
npm run build
npm run preview # launch browser on localhost:3000 - it works too

NVM, I was using an older version of the renderer. Now after upgrading everything is working fine. The Solid components are rendering images fine too. Exactly what issue are you facing? And does this go away if you upgrade the @astrojs/renderer-solid package?

Can you share your example (based on framework-solid)?
I'll revisit the project later this week and get back to you asap.

I'm sharing a GitPod link with everything set up https://rafidmuhymin-astroimaged-4puvj7bf1ph.ws-us34.gitpod.io/

operation not permitted: missing create permission on workspaceInstance

I never used gitpod - I created an account thru github.

Sorry for issue @millette! I'm not very familiar with GitPod too. I used it because it will provide a complete workspace for testing. However, here's a CodeSandbox link https://codesandbox.io/s/tender-firefly-wkn3kv?file=/src/pages/index.astro

I'm closing this issue @millette and @KyleFontenot. Feel free to reopen this issue or create another issue if you face any problem.


feat: proposition for keeping original file name

See #10.
My idea:

Keep the original name (easy)
When creating the new name, replace ${originalname} with the original name + a key.
This key is a constant, I needed to prevent false positive duplicate found.
As I don't have an idea for the key, I choose to create a constant, so we can change it whenever we want, for something better.
The key is replaced in the final renaming and message information.

Hi, @Lisandra-dev, tks for your PR.
I will merge it first, and release it asap.
Btw, I have no develop this feature currently, because I want to add another feature described in discussion https://github.com/trganda/obsidian-attachment-management/discussions/21 first.
Tips:

You can use const { name } = deduplicateNewName(attachName, attachPath) to prevent the false positive duplicate. I will add more comments for it.


context.query_devices() confuses T265

Required Info

Camera Model
T265

Firmware Version
<IP_ADDRESS>15

Operating System & Version
Ubuntu 18.04 LTS

Kernel Version (Linux Only)
4.15.0-50-generic

Platform
PC

SDK Version
2.22.0 (master) }

Language
Python 3.7

Issue Description
The following program displays the pose from an attached T265:
import pyrealsense2 as rs
ctx = rs.context()
print(list(ctx.query_devices()))
pipe = rs.pipeline()
pipe.start()
print(pipe.wait_for_frames().first_or_default(rs.stream.pose).as_pose_frame().get_pose_data().translation)
pipe.stop()

On the listed setup, it produces the following output when a T265 is plugged in:
$ python3 query_devices_problem.py
[<pyrealsense2.device: Intel RealSense T265 (S/N: <redacted>)>]
Traceback (most recent call last):
  File "query_devices_problem.py", line 5, in <module>
    pipe.start()
RuntimeError: No device connected

When line 2 is commented out, it produces correct output:
$ python3 query_devices_problem.py
x: -3.32125e-06, y: 0.000118504, z: -2.13213e-05

It seems that querying for devices makes the T265 inaccessible to the pipe system. This problem does not occur with a D435 (it instead crashes because the D435 does not offer pose data).

@tpwrules hello,
When working with T265 you have to share and reuse the initial context across all the pipe objects created. This limitation does not apply to other devices.

import pyrealsense2 as rs
ctx= rs.context()
print(list(ctx.query_devices()))
pipe = rs.pipeline(ctx)
pipe.start()
...

See #3734, #3697

Oh, I did not realize that I had to pass the context to the pipeline. That indeed fixes the issue.


Add 'Custom Builds' section to docs

The "Configuration" section has too many things under it. Docs about custom kernels and building custom ISOs makes sense to be in its own section.
Might not be too important now, but as the scope of custom builds increases it'll be better to have a separate area for this in the docs.

LGTM - @deniseschannon do you want to review all docs changes too?

@SvenDowideit yes please :)
LGTM


New SDK Out, Builds that passed in the morning are now failing

@jprobinson, I was build and deploying successfully this morning, but just started getting the below error message:
This build passed, and when i ran "restart" it failed.
It looks like there is a new SDK available for appengine that must have been released in the last few hours... digging in now to try and find out more information, but wanted to bring this issue to your attention.
Could not guess mimetype for frontend/build/asset-manifest.json.  Using application/octet-stream.
Could not guess mimetype for frontend/build/manifest.json.  Using application/octet-stream.
Could not guess mimetype for frontend/build/static/js/main.a5dca266.js.map.  Using application/octet-stream.
Could not guess mimetype for frontend/build/static/css/main.1d866fd8.css.map.  Using application/octet-stream.
Error 500: --- begin server output ---

Server Error

A server error has occurred.

There is a new release of the SDK available.

-----------
Latest SDK:
api_versions: ['1']
release: 1.9.66
supported_api_versions:
 go:
   api_versions: [go1, go1.6, go1.8]
 java7:
   api_versions: ['1.0']
 python:
   api_versions: ['1']
 python27:
   api_versions: ['1']
timestamp:<PHONE_NUMBER>

-----------
Your SDK:
api_versions: ['1']
release: 1.9.63
supported_api_versions:
 go:
   api_versions: [go1, go1.6, go1.8]
 java7:
   api_versions: ['1.0']
 python:
   api_versions: ['1']
 python27:
   api_versions: ['1']
timestamp:<PHONE_NUMBER>

-----------
Please visit https://developers.google.com/appengine/downloads
for the latest SDK
****************************************************************
--- end server output ---
error: exit status 1

[info] build failed (exit code 1)

@Adusei  There was a significant outage with App Engine and Datastore this afternoon. I'm pretty sure that was the cause. Mind retrying your build?

https://status.cloud.google.com/incident/cloud-dev-tools/18001#5629499534213120

all set @jprobinson , everything is working properly.. many many thanks for the follow up