Xash3D FWGS engine

From https://github.com/dreamer/luxtorpeda/issues/67

Project link: https://github.com/FWGS/xash3d-fwgs
Project license: Unknown, marking as non-free - https://github.com/FWGS/xash3d-fwgs/issues/63
Does it work on 64-bit only Linux: NO, 32-bit required
Is source code available?: YES
Is source code stored in Git?: YES
List of Steam AppIds of supported games:

https://store.steampowered.com/app/812440/HalfLife_Absolute_Zero/
https://store.steampowered.com/app/70/HalfLife/
https://store.steampowered.com/app/40/Deathmatch_Classic/
https://store.steampowered.com/app/50/HalfLife_Opposing_Force/
https://store.steampowered.com/app/60/Ricochet/
https://store.steampowered.com/app/130/HalfLife_Blue_Shift/
https://store.steampowered.com/app/20/Team_Fortress_Classic/

Additional information
Need to determine if all games listed above are supported.
Absolute Zero information here: https://www.reddit.com/r/linux_gaming/comments/htc25t/halflife_absolute_zero_can_run_natively_on_linux/
https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/supported-mod-list.md
https://www.moddb.com/engines/xash3d-fwgs-engine

This information is completely wrong.
Our project was named as Xash3D FWGS when Xash3D was developed by another man.

Does it work on 64-bit only Linux: NO, 32-bit required

Nope. You can compile 64-bit libraries.

https://store.steampowered.com/app/10/CounterStrike/
https://store.steampowered.com/app/80/CounterStrike_Condition_Zero/
https://store.steampowered.com/app/30/Day_of_Defeat/

All this games does not work under Xash3D and Xash3D FWGS.

Absolute Zero information here: https://www.reddit.com/r/linux_gaming/comments/htc25t/halflife_absolute_zero_can_run_natively_on_linux/

I think this mod not fully work under Xash3D FWGS on linux.

https://www.indiedb.com/engines/xash3d-engine/features/running-half-life-under-xash3d-users-manual-english

This manual for original Xash3D, so it's completely bad idea to use this manual for Xash3D FWGS.

https://www.moddb.com/engines/xash3d-engine/tutorials/xash3d-compatible-half-life-mods-for-any-supported-os

It would be better to check this list:
https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/supported-mod-list.md
Also, we have separate page on moddb:
https://www.moddb.com/engines/xash3d-fwgs-engine

Ok, thanks for the information. This was mainly following the links on the README.md in the repo, which links to the other project's moddb page
Is the description here no longer valid? This is where I got the idea that it'd only be 32-bit: https://github.com/FWGS/xash3d-fwgs#gnulinux
Is there a list of steam games that work with Xash3D FWGS?

While we do support 64-bit and successfully utilize it in different ports, the only thing that stops us using 64-bit on GNU/Linux and Windows is binary compatibility.
GoldSource engine doesn't have any kind of virtual machine like Quake, although being derived from it. So to load a Half-Life mod on a Linux, you need to find source code of game logic DLLs and recompile them to Linux. @nekonomicon is working on that field, fixing different mods or reverse engineering them to be compatible with most platforms we support: https://github.com/FWGS/hlsdk-xash3d
Other our precious contributor @mittorn had implemented DLL loader support for the old engine branch. Support was limited to old mods that was built with old Visual Studio compilers, so it's would not be compatible with newer ones.
It's NOT ported for new engine and it's future is not bright. I don't like how it's being injected to the engine instead of being a wrapper, like QuakeWrapper, a QuakeC virtual machine implemented as Half-Life mod. Also, I don't like it's source code, it's hard to read and probably contains a lot of errors we've never encountered due to obscurity of this feature. :(

Is there a list of steam games that work with Xash3D FWGS?
CS 1.6, CS: CZ and DOD uses vgui2 library which Xash3D does not support at all.

CS: CZ-DS required special sequence support on engine side that was implemented in Xash3D FWGS by @a1batross, but without vgui2 support It does not work too.
Other games must work fine.
Also, many Half-Life-based games and mods required vgui1 library as dependency, but this library is closedsource and exists only for 32-bit x86 architecture, and for porting to other platforms need to remove vgui interface from client library.

@nekonomicon Nagist's vgui is opensource and under permissive license. But it's never tested.

As a starter of this topic (kinda) I'd like to clarify something.

Absolute Zero information here: https://www.reddit.com/r/linux_gaming/comments/htc25t/halflife_absolute_zero_can_run_natively_on_linux/

I think this mod not fully work under Xash3D FWGS on linux.

Have you checked the instructions by the link? They report it working with version 0.19 (and not working with version 0.20) of Xash3D FWGS — and this task need some workarounds, if I got that correctly. It's very interesting to get your detailed commentaries as the creators of the engine, and what could be done (and what, most probably, not).

@thaewrapt @a1batross already said about dll-loader.
Dll-loader is kludge which based on an old version of wine and with normal half-life client some features will not work, such as dynamic fog, so there is no way to run this mod on linux natively.
But HL: Absolute Zero is opensource and It's possible to port this mod to linux.
https://gitlab.com/Cobalt-57/half-life-absolute-zero/

@nekonomicon Thanks for clarification, I'm still being confused by the way those people from Reddit thread have used game_ui.so and particleman.so from a current Steam version of Half-Life to make AZ work with your engine, I'll try their solution to check if it's actually working, haven't got any spare time yet.
As for devs of Absolute Zero, they seem unaware of possibility to make a native Linux port due to (quote) "older version of GoldSrc being used and not available for Linux".

particleman.so

It's particle manager library that used only in CS 1.6 and DOD.

game_ui.so

It's vgui2-based steam menu user interface, but Xash3D does not support it and uses own UI library.

As for devs of Absolute Zero, they seem unaware of possibility to make a native Linux port due to (quote) "older version of GoldSrc being used and not available for Linux".

Main difference in old and new HLSDK - input device code:
https://gitlab.com/Cobalt-57/half-life-absolute-zero/-/blob/master/cl_dll/inputw32.cpp
https://github.com/ValveSoftware/halflife/blob/master/cl_dll/inputw32.cpp
Valve just ported old input code from win32 api to sdl2.
Also, may be need to fix old code for modern C/C++ compilers, but it's not hard.
We have guide about mod porting, but this guide is more related to Xash3D:
https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/mod-porting-guide.md

Absolute Zero is getting delisted from Steam soon - https://store.steampowered.com/newshub/app/812440/view/2916602385067012696
Closing for now, unless there's interest and/or anyone wants to try to provide a PR for supporting this engine.

Added in https://github.com/luxtorpeda-dev/packages/pull/233

Added in https://github.com/luxtorpeda-dev/packages/pull/233


[HUDI-4963] Extend InProcessLockProvider to support multiple table ingestion

Change Logs
Extend InProcessLockProvider to support multiple table ingestion
Impact
Adds capability to use multiple tables leveraging InProcessLockProvider within same jvm.
**Risk level: low *
n/a
Documentation Update
n/a

going ahead and landing this in.
@jonvex : Can you check why compliance is failing. we need better error message as well.

It's failing because the checklist is missing


Update Manylinux container tags

Resolves #141 and #138

Still broken:

WinMac: Should be fixed after #140 is merged
Conda CPU/GPU: can look into this next week

@driazati Sorry, forgot to mention you.


[aenetworks] Prevent missing ratings extractor crash

IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
Certain shows without ratings on AE networks will crash and not allow the download to complete.
To duplicate this:
yt-dlp -V https://play.history.com/shows/kennedy/season-1/episode-2
or
yt-dlp -V https://play.history.com/shows/kennedy/season-1/episode-3
(not sure if one will get ratings in the meantime of this being merged and prevent duplication)
I found code already in this project from the amcnetworks.py extractor that fixes the problem there. I copied that code over to the aenetworks.py and tested it manually. It works.
Template

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests
[ ] Checked the code with flake8 and ran relevant tests

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

[ ] I am the original author of this code and I am willing to release it under Unlicense
[x] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[x] Fix or improvement to an extractor (Make sure to add/update tests)
[ ] New extractor (Piracy websites will not be accepted)
[ ] Core bug fix/improvement
[ ] New feature (It is strongly recommended to open an issue first)

@bashonly I pushed the requested changes.


[Feature] Ensures the selectors for deployments used by DWD abide to the Gardener Extension concept

Feature (What you would like to be added):
With GEP-01 (extensibility) cloudprovider specific details are extracted to extensions.
With the introduction of scaleRef dependencies in the release v0.7.0. The component model of gardener/gardener is broken as it requires it to have knowledge of machine-controller-manager deployment name. Details can be checked here.
As currently its resolved by adding a constant in the g/g api types to identify MCMDeploymentName as design with an alternate selection criteria will require a re-design of concepts which the basic functionality of DWD relies on.
Motivation (Why is this needed?):
To ensure we don't break the contract and keep the separation of concern design principle in play.
Approach/Hint to the implement solution (optional):

Let's close for now as currently I don't know of a provider extension that does not use MCM currently. If there is one in the future, we could think of a approach similar the logging extensibility where provider extensions provide a ConfigMap (filters, parsers) with a well-known label and these ConfigMaps are aggregated and passed to the fluent-bit on Seed bootstrap. Let's for now do not introduce such complexity when there is no real need for it.
/close


MSRV 1.64 & Workspace inheritance for dependencies

The first two commits are just bumping the MSRV and fixing the clippy lints.
The last commit is more involved. I'm using the new workspace inheritance method for declaring dependencies. This means that we have a global list of dependencies in the root Cargo.toml that the other crates refer to. If we then want to, for example, bump the version a dependency, we only need to change the version in root Cargo.toml. I think it also creates a clear overview of (almost) all dependencies in the project. There were also many dependencies for which the spec was outdated or where one crate specified it as "0.2" and another as "0.2.3".
I can remove this last commit if you want, but I think it's useful. @sylvestre

So much better, it will make our life much easier :)
many thanks


I have error :(

`C:\Users\MrFallen\AppData\Roaming\Composer\2fe>php artisan voyager-page-blocks:install
Publishing Page Blocks assets, database, and config files
Copied Directory [\vendor\pvtl\voyager-page-blocks\config] To [\config]
Publishing complete.
Dumping the autoloaded files and reloading all new files
Migrating the database tables into your application
Nothing to migrate.
Seeding data into the database
Illuminate\Database\Eloquent\ModelNotFoundException  : No query results for model [Pvtl\VoyagerPages\Page].
at C:\Users\MrFallen\AppData\Roaming\Composer\2fe\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php:414
410|         if (! is_null($model = $this->first($columns))) {
411|             return $model;
412|         }
413|

414|         throw (new ModelNotFoundException)->setModel(get_class($this->model));
415|     }
416|
417|     /**
418|      * Execute the query and get the first result or call a callback.

Exception trace:
1   Illuminate\Database\Eloquent\Builder::firstOrFail()
C:\Users\MrFallen\AppData\Roaming\Composer\2fe\vendor\pvtl\voyager-page-blocks\database\seeds\PageBlocksTableSeeder.php:28
2   PageBlocksTableSeeder::run()
C:\Users\MrFallen\AppData\Roaming\Composer\2fe\vendor\tcg\voyager\src\Traits\Seedable.php:13
Please use the argument -v to see more details.`

Hi @MrFallen, this has been addressed in 0.8.3, including for existing voyager frontend sites. For new builds, follow the installation instructions before installing page blocks.


Issue 1850 Concept. Add dialog to Organization Upload page to show outcome.

🗣 Description
Added a dialog that opens once the import function is done that will show the number of successful and failed uploads.
We can add to this, but this could be considered the MVP for now and we can add this type of feedback to more types of functionality.
💭 Motivation and context
The user needs more info about things they are doing. The Organization Import function should have some feedback to the user. If we want to add a notification panel, that might be a good start. We could read off every error into the notification panel and extend it more and more.  Just an idea.
Closes issue 1616 and 1850.
🧪 Testing
Manual testing. Try uploading some organizations and it should pop up with how many failed and succeeded.
📷 Screenshots (if appropriate)

✅ Pre-approval checklist

[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All future TODOs are captured in issues, which are referenced
in code comments.
[x] All relevant type-of-change labels have been added.
[x] I have read the CONTRIBUTING document.
[x] These code changes follow cisagov code standards.
[x] All relevant repo and/or project documentation has been updated
to reflect the changes in this PR.
[x] All new and existing tests pass.

✅ Pre-merge checklist

[ ] Revert dependencies to default branches.
[ ] Finalize version.

✅ Post-merge checklist

[ ] Create a release.

Closing as this functionality is no longer relevant.


never stops saying 'stopped'

idk if it just doesnt start mining or the site is broken

That means that the miner can't connect to the pool. Make sure that the settings are correct and that the pool is reachable.

idk I use ethermine is that not supported?

All pools should be supported, most people here use ethermine. Can you post the settings you use?

ETHASH as algorithm

{
"url": "stratum://0x1EE77fFF7bA95a4dc9dEc1c86389946aBDbFA1DA@eu1.ethermine.org:4444",
"algo": "ethash",
"max-gpu": 20,
"idle-wait": 5,
"idle-gpu": 100,
"stealth-targets": "Taskmgr.exe,ProcessHacker.exe,perfmon.exe,procexp.exe,procexp64.exe",
"kill-targets": ""
}

That should work fine, and the miner isn't running in any of the countries ethermine blocked? I think they blocked Russia, Belarus, Afghanistan, Cambodia, Iran, Iraq , North Korea, Syria, and Pakistan from using ethermine, not sure if they block IPs from mining but they said that they've suspended operation in those countries.

as test

Hmm yeah then it should work, can you run the checker that gets built with the miner and post what it displays (should show a miner running)?

Not run as Administrator, only non-administrator miners can be searched for.
Watchdog Running: No
Miners:
--cinit-algo=ethash --pool=stratum://0x1EE77fFF7bA95a4dc9dEc1c86389946aBDbFA1DA@eu1.ethermine.org:4444  --cinit-max-gpu=20 --cinit-api="shhhhh" --cinit-idle-wait=5 --cinit-idle-gpu=100
GPUs:
NVIDIA GeForce GTX 950M
Intel(R) HD Graphics 530
Compatible GPU found: True

Yes those settings work fine, you should be getting "Out of free VRAM" as a status (since you only have a GTX 950M) and not "Stopped", if you are getting "Stopped" then most likely your IP could be blocked from ethermine (not sure why though), Can you try running a normal ETH miner like maybe T-Rex or nbminer or something and see if ethermine works with them?

ok

oof idk


tick() not called consisently on windows 10

I've noticed some weird behavior with tick() on windows. You can see it with the the first example. If the mouse is over the window, everything works as you would expect and FPS counter shows 120 (on a 120hz display). If I move the mouse away from the window, so that it's no longer over the client area of the window, then when I stop moving the mouse you can see the game basically freeze. If you wait a second and move the mouse again then it starts processing tick() again. The FPS counter will then update and you can make it go arbitrarily low by waiting between when you move the mouse. I can post a video clip if that explanation is confusing.
I looked through the issue tracker for glutin and I didn't see any issues like this so I suspect the bug is in the Rltk code. I tried the example on linux (X11) and it behaved as I would have expected (full frame rate all the time, regardless of mouse movement or position).
Looking at the Rltk event loop, it looks like tick() is called after all the events have been cleared and the application is about to give control back to the OS. The only thing I can think is that perhaps on windows glutin only creates this EventsCleared event when there were events to process and that on linux this event is created more often.
Have you noticed this bug before? It's probably not a big deal for turn based simulations. I think for simulations that are not turn based that the current API might be restrictive in the sense that tick() appears to be tied to the framerate. (Unless I'm missing something, of course.) For instance, is it possible to have a simulation that runs at 20hz with animations and event  processing that runs at 60hz?

This might be related to #6.

This might be related to #6.

After reading through #6, I think you actually meant #7. Anyway, I tried changing it to Poll instead of Wait and now it behaves as I would expect.

Sorry for the delay - moving house is crazy, and I don't have reliable Internet at home until early next week. I'm pretty sure this is related to the Linux polling problems. *control_flow = ControlFlow::Wait; gets events on Linux, but on Windows 10 it only works if the mouse is inside the window (so there are events being streamed in). On Windows 10, *control_flow = ControlFlow::Poll; works consistently, but gives some problems for Linux users. I'll see if I can find a better way, otherwise it might be time for some platform-specific code.
Thanks!

I've added a commit varying the tick behavior between Linux (which doesn't seem to like polling on a lot of platforms, there are earlier bugs about this) and Windows (which doesn't tick unless the window has focus and the mouse is over it on Wait mode). Hopefully that'll help.

I've merged in some more changes that have it running smoothly on both Windows 10 and Ubuntu (in a VM on VirtualBox) on my machine.

Thanks! Much appreciated.
On Mon, Oct 7, 2019 at 11:31 thebracket<EMAIL_ADDRESS>wrote:

I've merged in some more changes that have it running smoothly on both
Windows 10 and Ubuntu (in a VM on VirtualBox) on my machine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/thebracket/rltk_rs/issues/9?email_source=notifications&email_token=AAC547OOMPXYU5SSCQC4RULQNN6ALA5CNFSM4IZPR6YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEARLH6Y#issuecomment-539145211,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAC547MGMUIP6NTU5BT6C6TQNN6ALANCNFSM4IZPR6YA
.


responsive-sm not working on WP8

Hi,
I know that support for WP8 will appear after the released ionic 1.0.0 but is a bug in responsive-sm
The small code in blank starter

    <ion-pane>
      <ion-header-bar class="bar-stable">

Ionic Blank Starter

      </ion-header-bar>
      <ion-content>

"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.

.col

.col

.col

      </ion-content>
    </ion-pane>

with responsive-sm (broken)
http://i60.tinypic.com/264q87t.jpg
http://i57.tinypic.com/25i55vk.jpg
without responsive-sm
http://i57.tinypic.com/2h5uyrd.jpg
http://i57.tinypic.com/29axnkk.jpg
Do you have any plan to fit it?
http://forum.ionicframework.com/t/wp8-responsive-sm-not-workig/4759

We will not be supporting WP8 with ionic v1.

The @media parts in the css are the problem, it seems. Instead of
flex: 1;
it should be
flex: 1 0 auto;
My fix is in my css file like this:
@media (max-width: 567px) {
.responsive-sm .col, .responsive-sm .col-10, .responsive-sm .col-20, .responsive-sm .col-25, .responsive-sm .col-33, .responsive-sm .col-34, .responsive-sm .col-50, .responsive-sm .col-66, .responsive-sm .col-67, .responsive-sm .col-75, .responsive-sm .col-80, .responsive-sm .col-90 {
flex: 1 0 auto;
}
}
@media (max-width: 767px) {
.responsive-md .col, .responsive-md .col-10, .responsive-md .col-20, .responsive-md .col-25, .responsive-md .col-33, .responsive-md .col-34, .responsive-md .col-50, .responsive-md .col-66, .responsive-md .col-67, .responsive-md .col-75, .responsive-md .col-80, .responsive-md .col-90 {
flex: 1 0 auto;
}
}
@media (max-width: 1023px) {
.responsive-lg .col, .responsive-lg .col-10, .responsive-lg .col-20, .responsive-lg .col-25, .responsive-lg .col-33, .responsive-lg .col-34, .responsive-lg .col-50, .responsive-lg .col-66, .responsive-lg .col-67, .responsive-lg .col-75, .responsive-lg .col-80, .responsive-lg .col-90 {
flex: 1 0 auto;
}
}
It could break in the future, but hopefully the ionic team might just change their stylesheet.

Thx, your workaround works for Windows 10 too!


Can't create .torrent file

Hi, I created an Unraid docker with your source and have been using it for a few weeks without issue. Great program btw. Today I tried creating a .torrent file for the first time and it is giving me the following error message in the diagnostics box:
/var/www/rutorrent/plugins/create/mktorrent.sh: line 11: /usr/local/bin/mktorrent: not found
chmod: cannot access '/config/rutorrent/share/settings/tasks/17149484146638093ee69ac5.58690490/temp.torrent': No such file or directory
It looks like the create plugin is enabled and loaded so I'm not sure why it isn't working. I have the same plugin running on my seedbox rutorrent and can create a .torrent on there without any problems. Any insights or advice would be appreciated.

Hi @motif82
Thank you for pointing out this bug. It appears that the path for mktorrent is incorrect.
The plugin is looking for the binary in /usr/local/bin/ while it is actually located in /usr/bin/.
Source : /var/www/rutorrent/plugins/create/conf.php`
Temporary Fix : You can temporarily fix the issue by creating a symbolic link, for example:
docker exec -ti rutorrent bash
ln -s /usr/bin/mktorrent /usr/local/bin/mktorrent

I'll make a note of this to fix the bug in a future release.

Thanks for the fast reply. The symlink worked to fix the issue for now.

New release v4.3.1 👍🏼


partials didn't cache

# lib/express.js
renderPartials p, options

the missing options  cause fcompile failed to cache partials, which made a huge impact on Node.js io & QPS performace if you have several partials

Due to no support on this library for months and a last release years a ago we decided to fork this lib to https://github.com/linslin/hjs and released a new version on NPM with all the latest fixes. The "bus factor" on this lib is to high. With our fork we try to get this lib back into life.


How to edit checkbox of table?

I want to give some 'right: 10px' attribute to that checkbox but I don't know if it's possible because I couldn't find any css information about it in the project. Anybody knows how can I give that attribute?

I don't believe this is an actual issue with material-ui and would be better served on StackOverflow.  If you can demonstrate that this is a failing of this package rather than an implentation issue, please provide the reproduction steps here (including the versions of react, material-ui).
To get you started, take a look at the documentation for TabelCell, which exposes a checkbox class that can be overridden.  For more information on overridding styles, read this.

@kgregory speaks true. The checkbox can be added to the TableBody or the TableHeader in version 0.18.*.
In v1.alpha, it looks like using TableSortLabel like here might do the trick.


add mentions of the gluon toolkits and links to resources

Description
This PR responds to community feedback about the lack of visibility of some Gluon resources.

@mxnet-label-bot [pr-awaiting-review]

@nswamy All good now? Can you approve the change?


Update http version

The Flutter ecosystem is moving forward with http version 1.0.0, and I had to update this dep just to use flutter_pexels_api.

Closing as a dup of #1


Animated just animate first time, don't show animation when Animated.timing back to old value

React Native version:
Binaries:
Node: 13.10.1 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.13.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK: Not Found
IDEs:
Android Studio: 3.5 AI-191.8<IP_ADDRESS>91312
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
`
import React, { useRef, useState, RefObject, MutableRefObject, useEffect } from 'react'
import { StyleSheet, Animated, View, TouchableOpacity } from 'react-native'
export interface SwitcherOptions {
onTurnOn: () => void,
onTurnOff: () => void,
on: boolean
}
const index = ({ on, onTurnOn, onTurnOff }: SwitcherOptions) => {
const _circleOffsetx = new Animated.Value(0)
const _onToggle = () => {
if (on) {
onTurnOff()
} else {
onTurnOn()
}
}
useEffect(() => {
if (on) {
Animated.timing(_circleOffsetx, {
toValue: 35 - 24,
duration: 200,
useNativeDriver: false
}).start()
} else {
Animated.timing(_circleOffsetx, {
toValue: 0,
duration: 200,
useNativeDriver: false
}).start()
}
}, [on])
return (
    <TouchableOpacity
        onPress={_onToggle}
        activeOpacity={1}
        style={{
            ...styles.container,
            backgroundColor: on ? '#78b5ff' : 'gray'
        }}>
        <Animated.View style={{
            ...styles.circle,
            backgroundColor: on ? '#318bfb' : '#ddd',
            left: _circleOffsetx,
        }} />
    </TouchableOpacity>
)

}
export default index
const styles = StyleSheet.create({
container: {
height: 15,
width: 35,
borderRadius: 10,
position: 'relative'
},
circle: {
position: 'absolute',
zIndex: 1,
top: (15 - 24) / 2,
height: 24,
width: 24,
borderRadius: 24,
}

})
`
2.
Expected Results
I used Animated from react-native but, I only got animation on first time. But when I use Animated 2nd to back to old value, I don't see any animation, even callback was called after 200ms.
Hope you can help me get out this issue. Thank for reading

It might be the same issue like this one: #27003

I fixed with React.useMemo(()=>new Animated.Value(0),[])


Cannot start or accept audio calls

When i try to start an audio call, nothing happens: the small spinner spins for one second and then nothing happens. Similarly, when someone sends me an audio call request, when i click on join nothing happens.
I use vscode on wsl and this is the configuration
Version: 1.46.0 (user setup)
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-10T09:03:20.462Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363

I've tried to export the log but Live share: Export logs creates an empty file.
In the previous case, both computers run vscode on wsl. However, when i try to reproduce it using a virtual machine running debian and the last version of vscode, if vscode on debian starts the call, the caller pops up in the list but not the receiver. If vscode on windows (wsl) calls first, nothing happens as above.

Having a similar issue on Windows 10 with WSL.
Here's the some log output that might be useful.

[LiveShareAudio I] Trace log: /tmp/VSFeedbackVSRTCLogs/20200624_204812_15930316928780_VSLSAudio.log
[ExternalAppCallingService I] Calling stack will be lazy loaded
[LiveShareAudio V] Current state: Initializing, Action: InitializeDone
[LiveShareAudio I] Can Collect PII: false
[LiveShareAudio I] LiveShare session changed:
[LiveShareAudio V] Current state: NoLiveShare, Action: LiveShareSessionStarted
[LiveShareAudio V] Current state: LiveShareWithoutAudio, Action: AttemptConnectAudio
[ExternalAppCallingService E] [JsonRPC] Dispose start
[ExternalAppCallingService E] [JsonRPC] Dispose end
[ExternalAppCallingService I] Getting SkypeToken
[LiveShareAudio V] Current state: AudioConnecting, Action: AudioDisconnected
[ExternalAppCallingService E] Electron closed unexpectedly: code:127 signal:null
[ExternalAppCallingService I] Initializing SlimCore
[ExternalAppCallingService E] Failed to initialize electron app: Call initialization failed Error: Call initialization failed
at ExternalAppCallingService. (/home/tk891973/.vscode-server/extensions/ms-vsliveshare.vsliveshare-audio-0.1.85/out/calling/externalAppCallingService.js:218:27)
at Generator.next ()
at fulfilled (/home/tk891973/.vscode-server/extensions/ms-vsliveshare.vsliveshare-audio-0.1.85/out/calling/externalAppCallingService.js:4:58)
at processTicksAndRejections (internal/process/task_queues.js:89:5)
[LiveShareAudio W] startOrJoinAudio: cancellation on connect to audio: Call initialization failed
[LiveShareAudio V] Current state: LiveShareWithoutAudio, Action: AudioConnectionFailed
[LiveShareAudio W] No transition exists for action: AudioConnectionFailed

This looks similarly related to issue #3028. Following steps from there I determined that I could not run the packaged electron in my WSL environment.
I had to install the additional dependencies like so:
 sudo apt-get install libnss3 libgtk-3-0 libxss1 libasound2

at which point I was able to run electron and begin a audio call!

Looks like there's not native sound support on WSL. I've come up with a work around that is working for me.
Enable audio in WSL
This trick uses a PulseAudio client on the WSL side, and a PulseAudio server on the Windows side to route audio via TCP.
Quick how-to here: https://wiki.ubuntu.com/WSL#Enabling_Sound
Details are here: https://github.com/microsoft/WSL/issues/486
I also installed pavucontrol and alsa-utils. With pavucontrol I was able to confirm that PA saw my Windows sound devices. I then used aplay and arecord to verify that ALSA saw the PA record and playback devices.
After rebooting my WSL instance I was able to see audio devices in LiveShare and successfully do an audio call (to myself).

Closing this as a duplicate of #3359.


UnknownIdentifierResolveResult when referencing a static defined in another project.

Project A has a static class B that defines a constant string C
namespace A
{
    public static class B
    {
        public const string C = "C";
    }
}

Project D has a reference to project A and defines a class E that accesses the string defined in A.B.C
namespace D
{
    public class E
    {
        public string F = A.B.C;
    }
}

This solution builds but the output javascript has an UnknownIdentifierResolveResult in it:
D.js
/**
* @version <IP_ADDRESS>
* @copyright Copyright © 2019
* @compiler Bridge.NET 17.7.0
*/
Bridge.assembly("D", function ($asm, globals) {
    "use strict";
    Bridge.define("D.E", {
        fields: {
            F: null
        },
        ctors: {
            init: function () {
                this.F = [UnknownIdentifierResolveResult A].b.c;
            }
        }
    });
});

See Also
https://forums.bridge.net/forum/bridge-net-pro/bugs/6125-unknownidentifierresolveresult-when-referencing-a-static-defined-in-another-project

The fix looks good, it will be included next Bridge release!


Fixes #991 - fix watch namespace regex

Signed-off-by: Ian McGraw<EMAIL_ADDRESS>Fixes issue #991
Thanks for taking the time to contribute to clickhouse-operator!
Please, read carefully instructions on how to make a Pull Request.
This will help a lot for maintainers to adopt your Pull Request.
Important items to consider before making a Pull Request
Please check items PR complies to:

[x] All commits in the PR are squashed. More info
[x] The PR is made into dedicated next-release branch, not into master branch1. More info
[x] The PR is signed. More info

--
1 If you feel your PR does not affect any Go-code or any testable functionality (for example, PR contains docs only or supplementary materials), PR can be made into master branch, but it has to be confirmed by project's maintainer.

Yes! This makes so much sense - especially when Kubernetes Namespaces follow a DNS naming regex.


2.0 Empty Timeline / Timeline Erasing Bug

Need some proper handling for if a timeline file loads successfully, but it is empty and so no Event nodes created. Right now it just sits there doing nothing, with no indication that anything happened.
I discovered this tied together with another, bigger issue. One of my timelines just completely got erased, replaced by an empty file.  I'm not sure what exactly had led to it, but I did have it open in Editor. Can't recreate it right now, will need to thoroughly go over the Editor and game Timeline loaders to make sure everything is robust.

It's pretty likely that the timeline erasing happened because of the weird two time saving of both timeline editors. It should not happen anymore now, but oc it could've been something else. Think this should be split into two or edited.
A) is a UI/UX issue
B) is a bug

I got the timeline erasing bug while simply toggling the visual/text editor button. I don't remember exactly the steps I followed or if these were the errors that caused it, but I'll leave a screenshot of the output screen here:

i saw that case a couple days ago too, and was trying to narrow it down to figure it out but didn't find it yet. something to do with whatever's triggering that first error, puts the object in memory in a state that then the editor can't read it, i might be able to try cheking it out in a bit
that last error I added as a safety check so the actual file itself doesn't get overwritten like this, so if you were able to close and reopen Godot and it was fine then at least that works as intended

I'm going to close this. If this happens again, we can reopen this or create a new issue, both are fine. For now, this isn't a necessary problem to track imo.


Don't add runKey query param in offline mode [#177374559]

@scytacki Good catch. I've set a constant runKey for ofline mode in this follow on commit: https://github.com/concord-consortium/activity-player/pull/196/commits/50b4d501411ffc7107cb7da882c1df16961af09b


[FEATURE] how can I use helm chart for aws-ebs-csi-driver

Hi,
For now, I installed aws-ebs-csi-driver using helm chart.
Because I can set storageClass with it.
I think it is great benefit.
But blueprints' aws-ebs-csi-driver addon is not consider this way.

Hi @Hokwang - correct, the current implementation for the aws-ebs-csi-driver is through an EKS managed addon. We can look at providing an alternate route for deploying/managing through a Helm chart which will allow for custom configuration.

I think that all addons including vpc-cni will be removed. Because it is a prerequisite for installing other cni.
So if some addon has installing helm way, it is better to use.

@Hokwang I too had the same issue.
I managed to preserve the EBS StorageClass by implementing a similar approach to the Helm chart in my own Terraform manifetss, like this:
  # EBS CSI Driver
  enable_amazon_eks_aws_ebs_csi_driver = true
  amazon_eks_aws_ebs_csi_driver_config = {
    addon_name               = "aws-ebs-csi-driver"
    addon_version            = local.ebs_csi_driver_version
    resolve_conflicts        = "OVERWRITE"
    namespace                = "kube-system"
    additional_iam_policies  = []
    service_account_role_arn = ""
    tags                     = merge(var.tags, {
      Name = var.name
    })
  }

  # EFS CSI Driver
  enable_aws_efs_csi_driver      = true
  aws_efs_csi_driver_helm_config = {
    version    = "2.2.6"
    tags       = merge(var.tags, {
      Name = var.name
    })
  }

And later...
resource "kubernetes_storage_class_v1" "ebs" {
  metadata {
    name = "ebs"
  }

  storage_provisioner    = "ebs.csi.aws.com"
  allow_volume_expansion = true
  reclaim_policy         = "Delete"
  volume_binding_mode    = "WaitForFirstConsumer"
  parameters             = {
    encrypted = true
    fsType    = "ext4"
    type      = "gp3"
  }
}

On first cluster I manually imported the storage class, then updated the Helm chart, then removed annotations, and many other steps in order to ensure the EBS StorageClass never got deleted. On subsequent clusters (I manage 5 big clusters), I just applied Terraform a few times sequentially and eventually everything worked out. In my case, as long as no auto scaling was happening during this transition, StorageClass was not used and everything worked like a charm.
PS: With EFS CSI Driver I did the same and it also worked well.

@guilhermeblanco Thanks for sharing your workaround. 🙌🏼


Implement rename function in the language server

Godot version:

3.2.3.stable.official
OS/device including version:

                                       astrale@Sharp
 MMMMMMMMMMMMMMMMMMMMMMMMMmds+.        OS: Linuxmint 20.1 ulyssa
 MMm----::-://////////////oymNMd+`     Kernel: x86_64 Linux 5.4.0-70-generic
 MMd      /++                -sNMd:    Uptime: 14h 35m
 MMNso/`  dMM    `.::-. .-::.` .hMN:   Packages: 4224
 ddddMMh  dMM   :hNMNMNhNMNMNh: `NMm   Shell: fish 3.1.0
     NMm  dMM  .NMN/-+MMM+-/NMN` dMM   Resolution: 1920x1080
     NMm  dMM  -MMm  `MMM   dMM. dMM   DE: Cinnamon 4.8.6
     NMm  dMM  -MMm  `MMM   dMM. dMM   WM: Metacity
     NMm  dMM  .mmd  `mmm   yMM. dMM   GTK Theme: Mint-Y-Dark-Red [GTK2/3]
     NMm  dMM`  ..`   ...   ydm. dMM   Icon Theme: Mint-Y-Dark-Red
     hMM- +MMd/-------...-:sdds  dMM   Font: Ubuntu Condensed, 24
     -NMm- :hNMNNNmdddddddddy/`  dMM   Disk: 867G / 1,1T (89%)
      -dMNs-``-::::-------.``    dMM   CPU: Intel Core i3-2330M @ 4x 2.2GHz [63.0°C]
       `/dMNmy+/:-------------:/yMMM   GPU: GeForce GT 630M
          ./ydNMMMMMMMMMMMMMMMMMMMMM   RAM: 3339MiB / 3844MiB
             \.MMMMMMMMMMMMMMMMMMM

Issue description:

When editing gdscript code from VScode, with godot connected, i tried using the very handy "rename" feature: (its not a simple find&replace, it renames a variable (or a function) everywhere it is used.) and there was an error message in the console.
Steps to reproduce:
open any gdscript file in VScode with godot-tools extension, select the name of a variable, right click -> rename
Minimal reproduction project:

Any project after setting up VSCode
Bugsquad edit (keywords for easier searching): LSP

I'd be happy to try to implement it,
I believe other function are implemented in modules/gdscript/language_server/lsp.hpp,
I've also read :
modules/gdscript/language_server/gdscript_language_protocol.cpp
modules/gdscript/language_server/gdscript_language_server.cpp
but i'm honestly having trouble understanding how it all works...
I have not much experience in C++ (I understand what the code does, i can successfuly build godot but that's all)
i have some experience coding (mostly python, rust, gdscript :p). I know it may be a little ambitious to start with this issue but I'd like to try!
I also have some experience building games in godot, so classes I see in the C++ code are familiar to me.

You should read :
modules / gdscript / language_server / gdscript_text_document.cpp
modules / gdscript / language_server / gdscript_workspace.cpp
modules / gdscript / language_server / gdscript_extend_parser.cpp
There are specific implementation.

The client will send a textDocument/rename request. It sends the position of the text cursor, and the symbol's new name. See https://microsoft.github.io/language-server-protocol/specification#textDocument_rename
This should then be sent to the Workspace class to rename the symbol and re-parse the script. The server is when expected to send a WorkspaceEdit object, which includes an array of TextDocumentEdit objects where the symbol we want renamed is renamed everywhere it's referenced.
This presents a complication, however, as we can't just do a search and replace. We have to know, for sure, that the symbol being replaced is the variable that was renamed. And there isn't really a fool proof way of knowing that unless everything is strictly type checked and tested and get_node() calls are tested.

My idea was the following :
Given we're in a class,
we could (theorically ofc, as im still reading/trying to understand the files and i feel out of my depths :/) rename all occurences where we know we have a instance of the class via typechecking
And it would be ideal to also display an optional replace UI for the parts of the code where it might be that we have a class instance but we're not sure (duck typing).


How to retrieve only uids with .query(v5) / getAll{...}(v6)

Hi. Is it possible to somehow get just the UID using params.fetch or params.graphQuery? It would be cool to add the ability to pass something like document.{AnyDocumentField(like uid, id, first_publication_date, etc.)} to fetch / graphQuery. I need this for getStaticPaths in next.js. I would like to decrease the payload size and only return what is really needed, because it affects the build time

Hi @GrefriT,
If you only want to fetch document metadata, including its UID, you can use the fetch parameter to exclude any data fields. You can set the fetch parameter to ${documentType}.uid (the .uid part can be anything that isn't a data field name).
For example, this is what it looks like using the v6 beta:
import * as prismic from '@prismcio/client'

const endpoint = prismic.getEndpoint('my-repo')
const client = prismic.createClient(endpoint)

const documents = client.getAllByType('page', { fetch: 'page.uid' })

There is no way to only return the UID field. This should be handled by Next.js, however. If you are using getStaticPaths, only the return value is persisted. Your return value should only include a list of UID strings.
I hope that answers your question! I'm going to close this but feel free to reply here if you have further questions.

@angeloashmore  thanks for the answer. It just seems a little strange to me that using the graphql api you can only return the UID, but not using fetch. I tried to use graphql in my project, but using the client is much more convenient and simpler. Is it possible in the future to have something like an alternative to _meta from graphql in params.graphQuery?

@GrefriT Good point. I think that highlights the difference between GraphQL and REST APIs (speaking generally). Querying for only what you need is a core part of GraphQL API.
REST APIs (at least Prismic's API at this time) differ in that the API itself must support its own way of providing a subset of fields. Prismic provides that through the fetch or graphQuery parameters, but they are limited to the fields within data. "Meta" fields cannot be filtered.
Including a _meta field like you're requesting sounds reasonable to me. Could you open a feature request on the Prismic community forum here? https://community.prismic.io/c/features/12


Fix compile options for plugins

Fix coverage, sanitizers and strict build with plugins

@mwestphal please review again, I fixed a lot of things.

reader.h coverage is lower than expected. Do you know why these methods are not hit ?
   * The reader having the highest score (from 0 to 100) is used to read the file.
   * Default is 50.
   */
  virtual int getScore() const { return 50; }

  /**
   * Create the geometry reader (VTK reader) for the given filename
   */
  virtual vtkSmartPointer<vtkAlgorithm> createGeometryReader(const std::string&) const
  {
    return nullptr;
  }

reader.h coverage is lower than expected. Do you know why these methods are not hit ?
   * The reader having the highest score (from 0 to 100) is used to read the file.
   * Default is 50.
   */
  virtual int getScore() const { return 50; }

  /**
   * Create the geometry reader (VTK reader) for the given filename
   */
  virtual vtkSmartPointer<vtkAlgorithm> createGeometryReader(const std::string&) const
  {
    return nullptr;
  }

I fixed the getScore by overriding it only if the CMake argument is set.
Regarding getGeometryReader, it's a bit more difficult. The base implementation would be called only if the plugin is defining no importer and no reader, which makes no sense.

Regarding getGeometryReader, it's a bit more difficult. The base implementation would be called only if the plugin is defining no importer and no reader, which makes no sense.

Then I'm not sure we should provide an implementation then.

Then the impl should be {} since it cant be reached.

It is already. great.


Error: leader election lost

I encountered this issue during the testing process. Here are my steps to proceed
curl -fsLO https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml
kubectl apply -f cert-manager.yaml

curl -fsLO https://github.com/cybozu-go/moco/releases/download/v0.20.2/moco.yaml
kubectl apply -f moco.yaml

After running for 1 day, I found that the pod restarted. Here is the restart log
{"level":"info","ts":"2024-05-24T06:51:05Z","msg":"Starting workers","controller":"mysqlcluster","controllerGroup":"moco.cybozu.com","controllerKind":"MySQLCluster","worker count":8}
{"level":"info","ts":"2024-05-24T07:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T08:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T09:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T10:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T11:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T12:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T13:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T14:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T15:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T16:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T17:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T18:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T19:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
{"level":"info","ts":"2024-05-24T20:51:04Z","logger":"agent-client","msg":"certificate reloaded"}
E0524 21:19:58.830509       1 leaderelection.go:327] error retrieving resource lock moco-system/moco: Get "https://<IP_ADDRESS>:443/apis/coordination.k8s.io/v1/namespaces/moco-system/leases/moco": context deadline exceeded
I0524 21:20:58.630679       1 leaderelection.go:280] failed to renew lease moco-system/moco: timed out waiting for the condition
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"Stopping and waiting for non leader election runnables"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"Stopping and waiting for leader election runnables"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"Stopping and waiting for caches"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"Stopping and waiting for webhooks"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"Wait completed, proceeding to shutdown the manager"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"shutting down server","path":"/metrics","kind":"metrics","addr":"[::]:8080"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"Shutdown signal received, waiting for all workers to finish","controller":"mysqlcluster","controllerGroup":"moco.cybozu.com","controllerKind":"MySQLCluster"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"Shutdown signal received, waiting for all workers to finish","controller":"pod","controllerGroup":"","controllerKind":"Pod"}
{"level":"info","ts":"2024-05-24T21:20:58Z","logger":"controller-runtime.webhook","msg":"Shutting down webhook server with timeout of 1 minute"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"All workers finished","controller":"mysqlcluster","controllerGroup":"moco.cybozu.com","controllerKind":"MySQLCluster"}
{"level":"info","ts":"2024-05-24T21:20:58Z","msg":"All workers finished","controller":"pod","controllerGroup":"","controllerKind":"Pod"}
{"level":"error","ts":"2024-05-24T21:20:58Z","logger":"setup","msg":"problem running manager","error":"leader election lost","stacktrace":"github.com/cybozu-go/moco/cmd/moco-controller/cmd.subMain\n\t/work/cmd/moco-controller/cmd/run.go:150\ngithub.com/cybozu-go/moco/cmd/moco-controller/cmd.glob..func1\n\t/work/cmd/moco-controller/cmd/root.go:82\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039\ngithub.com/cybozu-go/moco/cmd/moco-controller/cmd.Execute\n\t/work/cmd/moco-controller/cmd/root.go:89\nmain.main\n\t/work/cmd/moco-controller/main.go:6\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267"}
leader election lost
Error: leader election lost

k8s version:
1.26.13

The log does not seem to be a bug.
It just says the moco-controller process failed to keep the lease due to, probably, a lost connection with kube-apiserver somehow.
Please check your control plane status when it happened.

thanks


Instrument gRPC status code for client spans

Ref #172

Updated the PR description and changelog to state that this is just for client spans. Looks like server spans will be a pretty different approach (reading handleStream) so I'll do a separate PR for that


Fix Schläfli symbol mirror generation.

It was missing a negative sign

Dang, good catch!! I only just read thru this and understood what the change really meant geometrically, and damn that's subtle!


feat: cwd-based project root

Simplify system and move toward a cli flag for custom.

@Weakky Let's keep iterating on this. This doesn't quite go back to how it was. I think this makes the codebase and system simpler for now. We need to keep discussing the final solution to effective project root detection.


Reduce storage footprint

Some operation create relatively large files (tens of GB+).
To use command on PCs which have less storage, the command should reduce storage footprint with budget option.

Log rotation:
Keep file instance, or close & append.
% go test -bench=.
goos: darwin
goarch: amd64
pkg: github.com/watermint/toolbox/essentials/log/es_rotate
BenchmarkOpen-8           400132          2713 ns/op
BenchmarkAppend-8          17962         66942 ns/op
PASS
ok      github.com/watermint/toolbox/essentials/log/es_rotate    3.063s

Reopening file for append took ~67ms per single write. A long-running command such as one-day operation.
1940 records in 58 seconds for the test run of team diag explorer. If the rate is the same, it could generate roughly 3M records per day.
3M record could cost 192,687,000,000 ns -> 192.7 sec (3.2 min). That sounds like acceptable compared to the advantage of stability in particularly on Windows.

goos: windows
goarch: amd64
pkg: github.com/watermint/toolbox/essentials/log/es_rotate
BenchmarkOpen
BenchmarkOpen-4     	  379042	      2992 ns/op
BenchmarkAppend
BenchmarkAppend-4   	     338	   3057213 ns/op

Comparison on Windows 10 (on Parallels). 1000 times slower than holding file handler.

fixed in Release 66


Update the golang version in README

Why?
Well golang:1.4 does not come in some unpopular variant such as ppc64le which could cause error when new users (like me) try to copy and paste the content of the Dockerfile to test out dapper to see if the tooling works on their boxes. Plus the Dockerfile.dapper no longer use the 1.4

ty @runlevel5


Add get_corpus_default_db and thainer 1.5 model

What does this changes
Add get_corpus_default_db and thainer 1.5 model
What was wrong
Now, You can add corpus on default_db,json and you dont load last thainer model from Internet.
How this fixes it
Description of how the changes fix the issue.
Fixes #575 #298
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.

[ ] Passed code styles and structures
[ ] Passed code linting checks and unit test

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

In the file pythainlp/corpus/core.py:

Line 117:46: E203 whitespace before ':'
Line 117:80: E501 line too long (80 > 79 characters)
Line 126:80: E501 line too long (86 > 79 characters)
Line 130:8: E111 indentation is not a multiple of four
Line 133:80: E501 line too long (90 > 79 characters)
Line 181:1: W293 blank line contains whitespace
Line 183:21: E711 comparison to None should be 'if cond is not None:'

Coverage increased (+0.01%) to 95.985% when pulling 0a6cf7cceb10014494d3a97fd5cd9f51adade87a on add-thainer-model into ab888ccbbb724800dc02b5ea16a543f511d8f434 on dev.

May need test for get_corpus_default_db()

what if name or version is None or not found?

May need test for get_corpus_default_db()
* what if `name` or `version` is None or not found?

The load model function maybe failed. I used it in get_corpus_path function.


Where to paste code in node.js server

I am trying to bypass Bitgo cloudflare which is running on my mannual Server (http://www.rubitcurrency.com/login).
Once I click /login it takes time but nothing happens. For immediate testing purpose I like to know where to paste code that you have written in your Readme.

You can write this in any node environment. Create an app on your computer and install the package, require it, and then run it with node myfile.js


CO-2816_Present_Subset_of_COUs_in_Enrollment_Flow

A couple of minor comments…
I think we should call this “Configuration Labels” instead of just “Labels”. It’s a more descriptive term and also constrains its scope a bit.
If color is going to be defined as a hex value (which seems fine to me) then the field should be defined as varchar(6) (or maybe varchar(8)) to make it harder to store the wrong type of value. Also, we should just decide whether the leading # is required or omitted so we don’t end up with both formats.

A couple of minor comments…
I think we should call this “Configuration Labels” instead of just “Labels”. It’s a more descriptive term and also constrains its scope a bit.
If color is going to be defined as a hex value (which seems fine to me) then the field should be defined as varchar(6) (or maybe varchar(8)) to make it harder to store the wrong type of value. Also, we should just decide whether the leading # is required or omitted so we don’t end up with both formats.

Addressed both of them. Model renamed and the validation rule has been modified in order to ensure the hex string consistency.


Hi! How can I submit Formik form, using button from another functional component?

❓Question
Hi! How can I submit Formik form, using button from another functional component?

If the functional component is being used under the Formik wrapper, and the button type is submit, it should work out of the box.
Another option, is to pass down the props submitForm that you receive from formik, and call that function when you wish to submit the form.


Ecto.SubQuery is calling a select statement on a virtual field of a struct

Elixir Version: 1.9.4
Ecto Version 3.3.4
Database: PostreSQL
Here is the subquery I am running
    where_patient_id = &where(&1, patient_id: ^patient_id)

    from(
      event in subquery(
        Encounter.as_timeline_event()
        |> where_patient_id.()
        |> union(^calls_as_timeline_event(patient_id))
        |> union(^tasks_as_timeline_event(patient_id))
        |> union(^(Hospitalization.as_timeline_event() |> where_patient_id.()))
        |> union(^(LTC.as_timeline_event() |> where_patient_id.()))
        |> union(^(SNF.as_timeline_event() |> where_patient_id.()))
        |> union(^(ResearchCase.as_timeline_event() |> where_patient_id.()))
        |> union(^(Discharge.as_timeline_event() |> where_patient_id.()))
        |> union(^(DischargeRecommendation.as_timeline_event() |> where_patient_id.()))
        |> union(^(Note.as_timeline_event() |> where_patient_id.()))
        |> union(^(Order.as_timeline_event() |> where_patient_id.()))
      ),
      order_by: [desc: event.event_date, desc: event.id]
    )

Here is the struct
  @primary_key {:id, :integer, []}
  typed_embedded_schema enforce: true do
    field(:category)
    field(:created_at, :naive_datetime_usec)
    field(:created_by_id)
    field(:created_by_name)
    field(:created_by_role)
    field(:reference_id)
    field(:event_date, :date)
    field(:notes, {:array, :map})
    field(:details, :map)
    field(:interpret_as_timestamp, :boolean, virtual: true)
  end

And here is an example from calls_as_timeline_event() where I am trying to pass interpret_as_timestamp = true
      select: %TimelineEvent{
        id: c.id,
        ...
        details:
          fragment(
            ~s"""
            (SELECT json_build_object(
              'callDisposition', ?, 'callIntent', ?, 'inbound', ?, 'phoneNumber', ?
            )) :: JSONB
            """,
            d.disposition,
            ci.label,
            a.inbound,
            c.phone_number
          ),
        interpret_as_timestamp: true
      }

Here is the query Ecto is running which is causing the issue, because interpret_as_timestamp is not a column in the database:
** (Postgrex.Error) ERROR 42703 (undefined_column) column s0.interpret_as_timestamp does not exist
query: SELECT s0."id", s0."category", s0."created_at", s0."created_by_id", s0."created_by_name", s0."created_by_role", s0."reference_id", s0."event_date", s0."notes", s0."details", s0."interpret_as_timestamp" FROM (SELECT e0."id" AS "id", 'encounter' AS "category", e0."created_at" AS "created_at", u1."sfid" AS "created_by_id", u1."name" AS "created_by_name", u1."role_name__c" AS "created_by_role", e0."id"::varchar AS "reference_id", coalesce(coalesce(v5."cancelled_at", c6."start_at"), e0."created_at") AS "event_date", json_build_array(json_build_object('note', coalesce(v5."notes", c6."notes"))) :: JSONB AS "notes

What we ended up doing to work around this in the query was:
interpret_as_timestamp: fragment("true")

This is obviously not an ideal way to handle this...

Hi @wilkinson4, I could not reproduce this with simple queries, so there is probably something more going on here. Can you provide a sample minimal query that reproduces the error? Your query above is large and it doesn't have all pieces, therefore I can't fully reproduce it. Thanks!

Here is the sql to generate test tables for this issue:
CREATE TABLE test2 (
  id int
  , name varchar(255)
  , PRIMARY KEY (Id)
);

CREATE TABLE test1 (
  id int
  , name varchar(255)
  , PRIMARY KEY (Id)
);

INSERT INTO test1 (Id
  , name)
  VALUES (1
    , 'Joe');

INSERT INTO test2 (Id
  , Name)
  VALUES (1
    , 'Bob');

Here is the test.ex file I created
defmodule Test1 do
  @moduledoc false

  use TypedEctoSchema

  import Ecto.Query

  alias TestWithBoolean

  typed_schema "test1" do
    field(:name, :string)
  end

  def get_with_boolean do
    from(test1 in __MODULE__,
      select: %TestWithBoolean{
        id: test1.id,
        name: test1.name,
        is_true: true
      }
    )
  end
end

defmodule Test2 do
  @moduledoc false

  use TypedEctoSchema

  import Ecto.Query

  alias TestWithBoolean

  typed_schema "test2" do
    field(:name, :string)
  end

  def get_with_boolean do
    from(test2 in __MODULE__,
      select: %TestWithBoolean{
        id: test2.id,
        name: test2.name,
        is_true: false
      }
    )
  end
end

defmodule TestWithBoolean do
  @moduledoc false

  use TypedEctoSchema

  @primary_key {:id, :integer, []}
  typed_embedded_schema enforce: true do
    field(:name, :string)
    field(:is_true, :boolean, virtual: true) #THIS SHOULDN'T QUERY THE DB FOR THIS FIELD?
  end

end

defmodule CallSubquery do
  @moduledoc false

  import Ecto.Query

  alias Test1
  alias Test2

  def tests do
    from(
      tests in subquery(
        Test1.get_with_boolean()
        |> union(^(Test2.get_with_boolean()))
      )
    )
  end
end

When I run CallSubquery.tests() |> Repo.all() in iex I get the following error message:
** (Postgrex.Error) ERROR 42703 (undefined_column) column s0.is_true does not exist

    query: SELECT s0."id", s0."name", s0."is_true" FROM (SELECT t0."id" AS "id", t0."name" AS "name" FROM "test1" AS t0 UNION (SELECT t0."id", t0."name" FROM "test2" AS t0)) AS s0
    (ecto_sql 3.3.2) lib/ecto/adapters/sql.ex:629: Ecto.Adapters.SQL.raise_sql_call_error/1
    (ecto_sql 3.3.2) lib/ecto/adapters/sql.ex:562: Ecto.Adapters.SQL.execute/5
    (ecto 3.3.2) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
    (ecto 3.3.2) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3


Show appropriate animations on screens when there are no results

When we get no results from the API due to any reason ( there are actually no results, server error, internet connection), we just show a snackbar with some appropriate message. Replace, the snackbar with proper animations.
Which screens are to be added with this layout?

City info (opens up on clicking any city)
Hotel booking
Online shopping
Trip info (opens up on clicking any trip)
Profile

What to do?

Checkout https://github.com/project-travel-mate/Travel-Mate/blob/1dac4f949697f2766c923a16eb0eb89cd0386286/Android/app/src/main/java/io/github/project_travel_mate/mytrips/MyTripsFragment.java
We have functions for networkError noResults. These functions show approriate animations. Add these functions & animationView to above mentioned screens & show them when required.

I would like to work on this issue.

You can pick up only 1 issue at a time. Pick https://github.com/project-travel-mate/Travel-Mate/issues/192 first.

Okay

Would like to work on this.

Also, there is a possibility that a few of them might already be resolved.


Version 1.18.3 does not have defaults defined

When working with version 1.18.2 I was able to access sanitizeHtml.defaults but with version 1.18.3 I'm getting undefined. If I rollback to the former version, there are no problems with the following line:
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['h1', 'h2'])

This is a potential duplicate of #241

Thanks, that makes more sense. My guess is the tests never do this. Obviously we'll add one.

Actually the tests do use the defaults object in exactly this way.
Are you using the frontend build? I don't see any issues with this in src/index.js or its tests, i.e. what server side code sees.
What I do see is that dist/sanitize-html.js (front end) looks way too short to be valid. But I haven't the slightest why that is happening unfortunately. I wonder if something changed in browserify.
Don't get me wrong here, if there's a bug in the original src/index.js or in dist/index.js please enlighten me with specifics of how to reproduce it. But I can't find one with the tests that are using the exported defaults property.

This was caused by gitignoring and removing package-lock.json in https://github.com/punkave/sanitize-html/pull/240/files#diff-32607347f8126e6534ebc7ebaec4853d. What is the reason this was done? It seems that without the lockfile, some devDependency was silently updated, which changed the build output. This is exactly what lockfiles are there for to prevent - making the build reproducible and deterministic, so breakages can't suddenly happen without any changes to master. Please keep a lockfile checked in.

Seems this solves the problem. Thank you Felix, I'm closing the issue.

To anyone reading this, the problem was actually not caused by that commit / the lockfile, the previous release wasn't tagged right. See https://github.com/punkave/sanitize-html/issues/241#issuecomment-409881724


Escape escape

Provide and option to escape ''  Expected  output will clarify this better :
 BLACK='\\e[30m'
 RED='\\e[31m'

Why do you need \\e[31m? It is not an ANSI escape code.


Deployment of debian release -2 not for version 11

Is there some problem with the deployment of the package builds to Artifactory?
The new -2 version of AdoptOpenJDK-8 is here:
https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/pool/main/a/adoptopenjdk-8-hotspot/
But it misses the architectures other than amd64.
The new -2 version od AdoptOpenJDK-11 is missing completely:
https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/pool/main/a/adoptopenjdk-11-hotspot/
I have looked other directories and it seems to be inconsistenst too regarding architectures and debian release version.

As far as I know there's a magic script that only publishes a new release if there's a new JDK release. The case that existing packages should be re-released because of changes applied to the packaging isn't covered yet.
One possible solution: Create a daily Jenkins job that builds the packages in any case and also runs the publish task. Then let the Gradle publish task figure out if a package should actually be published (because of new version numbers) or not.
What do you think, @gdams?

The debian release, actually -2, is actually persisted within the sourcecode in the git repository. When a new JDK release appears this must be reseted to -1. The same is true for rpm releases too.

Could you elaborate why we should reset the variant number? If I remember correctly, at least the Debian guidelines do not dictate a particular format or behaviour as long as the new variant comes after the last when you sort them naturally. Ubuntu for example uses variant numbers like 1ubuntu2~19.04.1.

There must be a debian release starting with - but as far as i know this is not a requirement. Thus all packages i have seen have reseted the debian release to -1 after an upstream update this way:
1.2.3-1
1.2.3-2
1.3.0-1

Of course not resetting would not hurt:
1.2.3-1
1.2.3-2
1.3.0-3

Any news on this? I wanted to get rid of my self built packages in our own repo but the -2 is still not online for all java variants.

Will this work when the new 8u222, 11.0.4, 12.0.2 and 13.0.0 Versions come?

@gdams or @nudgegoonies Any idea?  If we need to make changes now is the time :-)

New JDK releases are never a problem, only re-releases or installer-only. Will fix as soon as I‘m out of crunch mode.

Thank you for the answer. Then the release is not affected. But then the decision to not reset the debian release version is taken? If yes, i could add a section in the documentation that distro build release versions increase individually and never reset to -1 also after AdoptOpenJDK version updates.

I don't want to reset the number if there aren't pressing reasons for it. Otherwise we have to add that to some pre-release checklist. So either someone overrides me or it stays that way. If you think this needs to be documented, go ahead.

Ok. Please excuse one last question. When will the debian-release version be increased? Immediately after a new version was deployed or before a new version will be deployed? Actually it is still -2 in the iteration variable in the deb sources from my latest MR that was merged to master. In my opinion it is better to increase it automatically during the deployment build/pipeline when it is finished. So from that time on people work on the "new" version and on a "released" version.

@nudgegoonies Just keep the questions coming.
My personal policy is to increase the version together with any change that alters the behaviour of the packages. Otherwise, there's no reason to increase the number because the packages don't change.
Examples:

Alter release targets: No change to version because the packages don't change.
Change contents (files added/removed etc.): Increase version because the packages change.
Alter metadata (dependencies, descriptions etc.): Increase version because the packages change.

If I remember correctly, your change was the last that altered the packages so it's okay if the packages are still at version 2.
I might have missed something, though.

@aahlenst Thank you for the examples. This sounds like a a good strategy. If the old releases are safe when someone forgets to increase the version number this is completely fine. I am a build engineer and i saw so much trouble with release-build-automation like overwritten older releases or useless increments in micro-versions that i am very cautious and sensitive in that topic :)

The Artifactory user that pushes the releases (and nightly builds) does not have the necessary permissions to overwrite files. So even in case of a misconfiguration that should not happen.
Forgetting to increase version numbers or erroneously increasing them can still happen, especially if I'm at sleep at the keyboard.

This was fixed with #141.
For future reference: If it's time to re-release Linux packages, compile the necessary arguments for the Jenkins job standalone_create_installer_linux and open TSC issue (example: https://github.com/AdoptOpenJDK/TSC/issues/105).


Add V-Ray CPU to the render fidelity test

Description
We should add V-Ray to the model-viewer render fidelity page.  This will encourage improved interoperability of the Khronos PBR BDSF with the V-Ray ecosystem.
There is an existing Python project for rendering glTFs in V-Ray here: https://github.com/ChaosGroup/vray_gltf. It is a couple years old so I believe it doesn't support the latest extensions, but maybe we can start with it.
We should likely take this existing python project and modify it to load the relevant models, cameras and environments used by the model-viewer fidelity test framework, and then submit the updated code and relevant images to this repository, allowing us to see what works and what doesn't work in V-Ray.
This can then drive further updates to the V-Ray test script (probably adding support for modern glTF extensions) either V-Ray, the integrate test.
I am willing to fund this on behalf of Threekit.
Live Demo
Not relevant.
Version
Not relevant.
Browser Affected
Not relevant.
OS
Not relevant.
AR
Not relevant.

Acceptance criteria:

A PR is produced, although getting it accepted is not required.
That PR should includes all of the source code and a clear README for reproducing this, excluding the V-Ray SDK which is proprietary.  This allows for others to both confirm and develop upon this solution in the future.
While we can not expect perfect reproduction in this first go around for all features, we expect at minimum that the render size, aspect ratio, color space of the output render, color spaces of the textures, environment map, basic lighting, camera aspect/position/rotation, and the glTF geometry and textures are all loading and are correct.
What is acceptable to not be correct is (1) unsupported gltf extensions that are not yet implemented in vray_gltf - these are extensions created in the last two years, (2) incorrectly rendered material effects that are not supported correctly by the existing code in vray_gltf.
It is expect that most of the materials will render relatively close to other engine results on the Renderer Fidelity page excluding the advanced effects.  It would be surprising if everything was completely off.

I'll have a go at this.

Any idea what the default camera settings should be when not specified by the glTF model?
The following options are supported by vray_gltf:
  --default_cam_look_at DEFAULT_CAM_LOOK_AT
                        Camera look at (x,y,z)
  --default_cam_rot DEFAULT_CAM_ROT
                        Default camera rotation(degrees) (x,y,z) or "(x,y,z)" around the avarage object position of the scene, other brackets work too
  --default_cam_moffset DEFAULT_CAM_MOFFSET
                        Default camera multiplier offset (x,y,z) or "(x,y,z)", all brackets will work
  --default_cam_pos DEFAULT_CAM_POS
                        Default camera Pos (x,y,z) or "(x,y,z)", other default cam still work but relative on this position
  --default_cam_fov DEFAULT_CAM_FOV
                        Default camera FOV is degrees
  --default_cam_zoom DEFAULT_CAM_ZOOM
                        Default camera Zoom -inf to 1.0 as 1.0 max zoom
  --default_cam_view DEFAULT_CAM_VIEW
                        Default camera view, one of front, back, left, right, top, bottom or auto

I'm guessing the orbit property defines the camera rotation, for each scenario.

I notice there are other renderer specific hardnesses that seem to have camera code in them, like this one:
https://github.com/google/model-viewer/blob/master/packages/render-fidelity-tools/src/components/renderers/rhodonite-viewer.ts#L162
I suspect that is a guide to calculating the camera matrix from the harness information?
I think both V-Ray and Blender Cycles are problematic to integrate into this test suite.  Maybe one could create a mini-web server that just has a post that the harness calls with the information and then that single route passes the information to python to do the render and returns the result?  Then it still run within the harness?

I could write a webserver tomorrow morning for this purpose?  Would that help you?

The most important issue right now is translating the scenario camera information to V-Ray's transform, which I believe is a rotation matrix and a translation matrix. I'm going to bed now, but will look at this tomorrow morning.
Regarding the test harness, let's figure that out once we have at least one render scenario working. I was planning to use the offline rendering path anyway for the initial version.

The code I linked to in my earlier comment calculates the matrix position (eye) and direction/up manually. From direction and up you get right/left via cross product and then you can use that to set the basis.

Success:

Compare to three-gpu-pathtracer-golden:

Note that vray_gltf supports a fairly limited set of extensions:
Textures:

KHR_texture_transform

Materials:

KHR_materials_pbrSpecularGlossiness
KHR_materials_transmission
KHR_materials_clearcoat
KHR_materials_sheen

Lights:

KHR_lights_punctual

Using the above extension list, it seems the following scenarios are unsupported (list of unsupported extensions in brackets):

khronos-DragonAttenuation (KHR_materials_volume, KHR_materials_variants)
khronos-IridescentDishWithOlives (KHR_materials_ior, KHR_materials_iridescence, KHR_materials_volume)
khronos-SheenChair (KHR_materials_variants)
khronos-MaterialsVariantsShoe (KHR_materials_variants)
khronos-ABeautifulGame (KHR_materials_volume)
khronos-IridescenceLamp (KHR_materials_volume, KHR_materials_iridescence)
khronos-MosquitoInAmber (KHR_materials_ior, KHR_materials_volume)
khronos-EmissiveStrengthTest (KHR_materials_emissive_strength)
khronos-IridescenceDielectricSpheres (KHR_materials_ior, KHR_materials_iridescence)
khronos-IridescenceMetallicSpheres (KHR_materials_ior, KHR_materials_iridescence)
khronos-IridescenceSuzanne (KHR_materials_ior, KHR_materials_volume, KHR_materials_iridescence)
khronos-GlamVelvetSofa (KHR_materials_specular, KHR_materials_variants)
khronos-TransmissionTest (KHR_xmp)
khronos-TransmissionRoughnessTest (KHR_materials_ior, KHR_materials_volume)
khronos-AttenuationTest (KHR_materials_volume)
khronos-SpecularTest (KHR_materials_specular)
khronos-TextureTransformMultiTest (KHR_materials_unlit)
khronos-UnlitTest (KHR_materials_unlit)

The KHR_material_variants isn't really a visual extension, rather it is about the loader switching the glTF materials or nodes around.
These are visual ones that are missing in order of descending importance:

KHR_materials_ior
KHR_materials_specular
KHR_materials_emissive_strength
KHR_materials_volume
KHR_materials_iridescence

I personally think this one isn't important and it also may not be feasible in most pathtracers, rather implementing it is figuring out how to get around all of the path tracer features:

KHR_materials_unlit

Amazing work!  I notice the background is different.
How different are the images that do not use the unsupported extensions?
I would love to see how close is the match when we know all features are supposed to be supported?

I think the HDR light intensity or the tone mapping is different as well.  I wonder if it is even possible to have the tone mapping match?  I suspect it may not be possible as the tone mapping operators in V-Ray may different from those available in Three.js.

The render above was done without any HDR environment (looks like most scenarios should use lightroom_14b.hdr if nothing is specified).  The background colour was originally black by default (but now fixed to white).
I managed to load lightroom_14b.hdr and convert to V-Ray's LightDome but I think it's not working quite right yet (maybe incorrect intensity?):

I think that usually in these tests the HDR intensity isn't adjusted and often it just uses what is in the file directly.  Output intensities may be affected by the tone mapping?

I also notice now that the very recent KHR_materials_anisotropy isn't supported by either the fidelity test framework or the vray_gltf project.

OK, finally figured out the UVW transform required for the default HDR.  Compare:
V-Ray:

Stellar:

It still feels like intensity is off, but at least it's oriented correctly.

Here's the command I'm currently generating for khronos-Fox:
python3 main.py /Users/jason/tmp/model-viewer/packages/shared-assets/models/glTF-Sample-Models/2.0/Fox/glTF/Fox.gltf --output_file /Users/jason/tmp/model-viewer/packages/render-fidelity-tools/test/goldens/khronos-Fox/vray-golden.png --render_mode production --default_cam_rot '(-60,0,0)' --default_cam_look_at '(-35,37,25)' --default_cam_pos '(0,0,124)' --size '(1536,1536)' --num_frames 1

Here's the JSON config:
    {
      "name": "khronos-Fox",
      "model": "../../../shared-assets/models/glTF-Sample-Models/2.0/Fox/glTF/Fox.gltf",
      "target": {
        "y": 37,
        "x": -35,
        "z": 25
      },
      "orbit": {
        "theta": -60,
        "radius": 124
      },
      "exclude": [
        "stellar"
      ]
    }

I think there's an issue with --default_cam_look_at (or how I'm using it).
You'll need to use my vray_gltf branch.

A while ago I added some code to the render-fidelity-tools that allows for an easy integration of external renderers with the existing pipeline. It's being used to generate the path-traced DS Stellar renderings.
An external renderer can simply be added to the renderer list in the test config like this:
{
  "renderers": [
    {
      "name": "stellar",
      "description": "Dassault Systèmes STELLAR",
      "command": {
        "executable": "python",
        "args": [
          "test/renderers/stellar/stellar.py"
        ]
      }
    }
  ]
}

On `npm run update-screenshots', the test suite calls the provided command with a single argument, that is the stringified json object containing scenario config (the same info that is provided to the web rendering backends).
The python main then looks looks like this
def main():
    """cmd render script

      ARGS:
          argv[1] (str): The stringified json object containing scenario config and outputPath properties
          Example:
          {
            "scenario": {
              "lighting": "../../../shared-assets/environments/lightroom_14b.hdr",
              "dimensions": {
                "width": 768,
                "height": 450
              },
              "target": {
                "x": 0,
                "y": 0.3,
                "z": 0
              },
              "orbit": {
                "theta": 0,
                "phi": 90,
                "radius": 1
              },
              "verticalFoV": 45,
              "renderSkybox": False,
              "name": "khronos-SheenChair",
              "model": "../../../shared-assets/models/glTF-Sample-Models/2.0/SheenChair/glTF-Binary/SheenChair.glb"
            },
            "outputFile": "../../../test/goldens/khronos-SheenChair/stellar-golden.png"
          }
    """
    config = json.loads(sys.argv[1])

    scenario = config["scenario"]
    outpath = config["outputFile"]

    # parse scenario
    resolution = (scenario["dimensions"]["width"], scenario["dimensions"]["height"])
    scenePath = "shared-assets" + scenario["model"].split("shared-assets")[1]
    iblPath = "shared-assets" + scenario["lighting"].split("shared-assets")[1]
    renderSkybox = scenario["renderSkybox"]

    target = np.array([scenario["target"]["x"], scenario["target"]["y"], scenario["target"]["z"]])
    theta = scenario["orbit"]["theta"]
    phi = scenario["orbit"]["phi"]
    radius = scenario["orbit"]["radius"]
    verticalFov = scenario["verticalFoV"]
    aspect = resolution[0]/resolution[1]

    # setup scene
    scene = load_scene(scenePath)
    camera = create_camera(scene, target, verticalFov, aspect, theta, phi, radius)
    ibl = create_hdri_light(scene, iblPath, renderSkybox)

    #render
    beauty_image = render_scene(config, scene, renderer, camera, ibl, NUM_SAMPLES)

    # tonemap
    beauty_image[:,:,:3] *= 1.0 / 0.6;
    beauty_image[:,:,:3] = ACESFilmicToneMapping(beauty_image[:,:,:3])
    # gamma
    beauty_image[:,:,:3] = np.power(np.clip(beauty_image[:,:,:3], 0.0, 0.9999), 1.0/2.2)

    if renderSkybox:
      beauty_ldr = (beauty_image[:, :, :3] * 255).astype(np.uint8)
    else:
      beauty_ldr = (beauty_image * 255).astype(np.uint8)

    save_image(os.path.join("./", outpath), beauty_ldr)

Test scenarios can be disabled for a renderer by adding the renderer's name to the scenario's exclude list in the test config. E.g.
    {
      "name": "khronos-IridescenceDielectricSpheres",
      "model": "../../../shared-assets/models/glTF-Sample-Models/2.0/IridescenceDielectricSpheres/glTF/IridescenceDielectricSpheres.gltf",
      "orbit": {
        "radius": 50,
        "theta": 45,
        "phi": 65
      },
      "target": {
        "y": -3
      },
      "dimensions": {
        "height": 700,
        "width": 700
      },
      "exclude": [
        "stellar"
      ]
    }

@jasondavies I notice the ACESFilmicToneMapping python call in @bsdorra's script above.  We likely have to have V-Ray render to a linear HDR image and then apply that tone mapping as he did.  I think it can be hard to have V-Ray do this properly.

@bsdorra do you have the code available for the ACESFilmicToneMapping function you used?

@bhouston sure

def RRTAndODTFit( v: np.array ):
  a = v * ( v + 0.0245786 ) - 0.000090537;
  b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
  return a / b;

def ACESFilmicToneMapping(img: np.array) -> np.array:
  """Using the same tonemapping function as three.js and glTF Sample Viewer
  https://github.com/mrdoob/three.js/blob/dev/examples/jsm/shaders/ACESFilmicToneMappingShader.js

  Args:
      img (np.array): The HDR image to be tonemapped

  Returns:
      np.array: The tonemapped LDR image
  """
  # sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT
  ACESInputMat = np.array([
    [0.59719, 0.07600, 0.02840], # transposed from source
    [0.35458, 0.90834, 0.13383],
    [0.04823, 0.01566, 0.83777],
  ])

  # ODT_SAT => XYZ => D60_2_D65 => sRGB
  ACESOutputMat = np.array([
    [ 1.60475, -0.10208, -0.00327], # transposed from source
    [-0.53108,  1.10813, -0.07276],
    [-0.07367, -0.00605,  1.07602],
  ])

  img = img@ACESInputMat
  img = RRTAndODTFit( img );
  img = img@ACESOutputMat

  return img;

And there's this additional pre-tonemapping scale factor of exposure/0.6 (where exposure defaults to 1.0), as explained in the three.js shader

@bsdorra This is great, thanks!  Is there any chance you can also share:

create_camera (I'm having difficulty with vray_gltf's camera code)
save_image

I'm tempted to ask for create_hdri_light too, just in case it helps.  Thanks!

@jasondavies Here's the code that I use to calculate relevant cam params

target = np.array([scenario["target"]["x"], scenario["target"]["y"], scenario["target"]["z"]])
theta = scenario["orbit"]["theta"]
phi = scenario["orbit"]["phi"]
radius = scenario["orbit"]["radius"]
fovy = scenario["verticalFoV"]
aspect = resolution[0]/resolution[1]

theta = theta * math.pi / 180;
phi = phi * math.pi / 180;
radius_sin_phi = radius * math.sin(phi);
cam_pos = [
  radius_sin_phi * math.sin(theta) + target[0],
  radius * math.cos(phi) +  target[1], #y-up
  radius_sin_phi * math.cos(theta) +  target[2],
]

center = np.array([target[0], target[1], target[2]]);

if (radius <= 0):
  center[0] = cam_pos[0] - math.sin(phi) * math.sin(theta)
  center[1] = cam_pos[1] - math.cos(phi)
  center[2] = cam_pos[2] - math.sin(phi) * math.cos(theta)

view_matrix = look_at(cam_pos, center, up)
focal_length = np.linalg.norm(center-cam_pos)

sensor_height = math.tan(fovy*0.5* math.pi / 180.0) * dist * 2.0
sensor_width = sensor_height * aspect

create_hdr_light won't help, it just forwards the IBL image path to the renderer's loading function. But there's nothing special going on in there, just reading the image data and storing it as texture for rendering.
If necessary, pre-loading image data into an array is straight forward with imageio
data = imageio.imread(ibl_path, format='HDR-FI')

Thank you @bsdorra for your help on this issue!  It wasn't possible to achieve these quality results without your example code!


Bug with backtracking and generate?

It appears that parsy has issues with, e.g.,
import parsy
@parsy.generate
def parser():
  a = yield parsy.regex('.*')
  b = yield parsy.string('za')
  return [a, b]
parser.parse('hiza')

Which yields
ParseError: expected 'za' at 0:4

This looks like a backtracking issue to me, but I did not investigate parsy's internals too much.

If this is a limitation of parsy due to its flexibility, documenting that it cannot represent this class of languages somewhere like https://parsy.readthedocs.io/en/latest/tutorial.html#alternatives-and-backtracking would be helpful.

Eh, I guess it is covered, just in a way that's a bit difficult to reason about. Would there be any way to emulate the sort of backtracking required to handle that case within parsy? In a real scenario, the b parser might be significantly more complicated.

So the | operator (and alt combinator which does the same) is the only built-in way to do backtracking in parsy, and it tries the second option only if the first fails, as documented. I could make this fact a bit clearer.
I don't think there would be an easy way to make parsy do backtracking by default over everything, and for the example you give, it seems impossible in fact: for it to succeed, we would somehow have to instruct the regex engine (i.e. Python's normal regex library) to not consume the za part, or to yield every possible match from the .* instead of the default greedy one, which I don't even think is possible.
Even if we could achieve this, it would drastically change performance characteristics, including the possibility of catastrophic backtracking. So there isn't likely to be a change here.

Alright, that makes sense.
I'm going to close the issue, since the only thing to do would be doc improvements. Thanks for your work on Parsy!


Broken link for NamedParameterJdbcTemplate

This seems to be a change in the Spring Framework.
This links do not work:
https://docs.spring.io/spring-framework/docs/5.3.5/spring-framework-reference/data-access.html#jdbc-JdbcTemplate
But this one does:
https://docs.spring.io/spring-framework/docs/5.2.13.RELEASE/spring-framework-reference/data-access.html#jdbc-JdbcTemplate
The working variant of the first link is:
https://docs.spring.io/spring-framework/docs/5.3.5/reference/html/data-access.html#jdbc-JdbcTemplate
So it seems framework 5.3.5 now uses reference instead of spring-framework-reference

This seems to be a change in the Spring Framework.
This links do not work:
https://docs.spring.io/spring-framework/docs/5.3.5/spring-framework-reference/data-access.html#jdbc-JdbcTemplate
But this one does:
https://docs.spring.io/spring-framework/docs/5.2.13.RELEASE/spring-framework-reference/data-access.html#jdbc-JdbcTemplate
The working variant of the first link is:
https://docs.spring.io/spring-framework/docs/5.3.5/reference/html/data-access.html#jdbc-JdbcTemplate
So it seems framework 5.3.5 now uses reference instead of spring-framework-reference

@schauder
I found more broken links in preface.adoc and a history that links changed as well. (https://github.com/spring-projects/spring-framework/issues/25071)
Until 5.3 M2, they used spring-framework-reference.
(https://docs.spring.io/spring-framework/docs/5.3.0-M2/spring-framework-reference/core.html#expressions)
Now they are placing docs under a html subfolder after 5.3 RC1.
(https://docs.spring.io/spring-framework/docs/5.3.0-RC1/reference/html/core.html#expressions)
(https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#expressions)


Move odo-init image tests to IBM Cloud

Currently, odo-init image tests are blocked on Travis and it's preventing PRs from getting merged. We need to move these tests to PSI along with moving our integration tests, unit tests and Kubernetes tests on PSI.
/area testing
/area infra

scope of this issue can be divided into either or
If we want to implement test on 3.11 cluster as it is for now on the repo using travis we will need
Either

[ ] add odo-init-image in release repo and Create prow job
[ ] Create sendqueue and exchange (may require to add a secret for amqp server)
[ ] Create a vm with 3.11 will be similar to #4288
[ ] create nodessh file for same
[ ] Script to execute the test
OR to use 4.x for test
[ ] Add odo-init-image in release repo and Create prow job
[ ] Create sendqueue and exchange (may require to add a secret for amqp server)
[ ] Create a Linux vm and configure it for test and use existing 4.x psi cluster
[ ] create nodessh file for same
[ ] Script to execute the test

I'm not sure why we would want to test on 3.11 cluster. Why not test it on latest 4.x cluster?
Also, how were we doing this in the past? Since odo is supposed to work on both 3.x and 4.x, should we run tests on both cluster types?
I really don't mean to overdo this than what's required.
@kadel @mohammedzee1000 wdyt?

As per cabal discussion we will use PSI cluster to test on odo-init-image repo. And will use Openshift built-in container image registry to store PR build image and use the built-in container image registry to perform tests.

As per Sprint 198 I was able to understand we will require to give permissions to access to use OpenShift image registry to the OpenShift user which is used for CI purposes, I have created Prow configuration for the tests.
To accomplish this task we need write a script that will create a project and push the image on OpenShift internal image registry and then will be used by the tests. For cleanup delete the container image from  cluster's internal registry by deleting
container's image stream.

Acceptance Criteria for sprint 199:

[ ] Setup existing 4.x cluster to use internal registry for tests
[ ] Create sendqueue and exchange
[ ] Configure existing Linux vm for test
[ ] Create Jenkins Jobs for tests
[ ] Scripts to execute the test and cleanup

Something more relevant for Sprint 201.

/remove-lifecycle stale

If we are thinking to use external registry then,
updated Acceptance Criteria:

[ ] Create prow job
[ ] Scripts build and push init-image to image registry and to execute tests/cleanup

In https://github.com/openshift/odo/issues/4315#issuecomment-796459778, it's mentioned that on a cabal call, we discussed to use OpenShift internal registry to build odo-init image and test it.
I'm not sure why we're proposing the scope for an external registry in https://github.com/openshift/odo/issues/4315#issuecomment-888145926.
I could be missing something.

[ ] Scripts build and push init-image to image registry and to execute tests/cleanup

Have you tried building a container image and push it to the OpenShift internal registry? Were you successful? Are the steps documented anywhere? Or do you have a link to OpenShift docs using which you are sure to be able to successfully do it repeatedly? I'm asking all these questions because "Script" can be created only if answer to these questions is yes.

[ ]  Create prow job

Isn't this just about creating a Jenkins job using the Jenkins Web UI?

Have you tried building a container image and push it to the OpenShift internal registry? Were you successful? Are the steps documented anywhere? Or do you have a link to OpenShift docs using which you are sure to be able to successfully do it repeatedly? I'm asking all these questions because "Script" can be created only if answer to these questions is yes.

No we were not able to push a container image into OpenShift internal registry.
I followed these steps doc1 & doc2, but was not able to do it .

Isn't this just about creating a Jenkins job using the Jenkins Web UI?

No, we have to create prow config on release repo to create a job to run the test.

I followed these steps doc1 & doc2, but was not able to do it .

what was the problem?

Have you tried building a container image and push it to the OpenShift internal registry? Were you successful? Are the steps documented anywhere? Or do you have a link to OpenShift docs using which you are sure to be able to successfully do it repeatedly? I'm asking all these questions because "Script" can be created only if answer to these questions is yes.

No we were not able to push a container image into OpenShift internal registry.

I don't see a mention of that anywhere on this issue so far. Did you try to raise it as a problem/blocker anywhere? Why not on the GH issue?

I've just tried to follow that docs and was able to sucesfully do it:
# login as kubeadmin for setup

▶ oc login --token=<redacted> --server=https://api.testocp47.psiodo.net:6443

Logged into "https://api.testocp47.psiodo.net:6443" as "kube:admin" using the token provided.

You have access to 102 projects, the list has been suppressed. You can list all projects with 'oc projects'

▶ oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
config.imageregistry.operator.openshift.io/cluster patched

▶ oc policy add-role-to-user registry-editor tkral
clusterrole.rbac.authorization.k8s.io/registry-editor added: "tkral"

▶ oc policy add-role-to-user registry-viewer tkral
clusterrole.rbac.authorization.k8s.io/registry-viewer added: "tkral"
▶ HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')

▶ echo $HOST
default-route-openshift-image-registry.apps.testocp47.psiodo.net

▶ podman pull docker.io/busybox
Trying to pull docker.io/library/busybox:latest...
Getting image source signatures
Copying blob b71f96345d44 done
Copying config 69593048aa done
Writing manifest to image destination
Storing signatures
69593048aa3acfee0f75f20b77acb549de2472063053f6730c4091b53f2dfb02

▶ podman tag docker.io/busybox:latest default-route-openshift-image-registry.apps.testocp47.psiodo.net/tkral-test/busybox:latest

Using project "tkral-test".

# login as a normal user
▶ oc login -u tkral  --server=https://api.testocp47.psiodo.net:6443

Logged into "https://api.testocp47.psiodo.net:6443" as "tkral" using existing credentials.

You have access to the following projects and can switch between them with 'oc project <projectname>':

    cmd-devfile-app-test96ncp
    cmd-devfile-delete-test97oyx
    cmd-devfile-push-test442yqx
    cmd-devfile-storage-test72dvb
  * tkral-test

Using project "tkral-test".

▶ podman login --tls-verify=false -u tkral -p $(oc whoami -t) default-route-openshift-image-registry.apps.testocp47.psiodo.net
Login Succeeded!

▶ podman push --tls-verify=false default-route-openshift-image-registry.apps.testocp47.psiodo.net/tkral-test/busybox:latest
Getting image source signatures
Copying blob 5b8c72934dfc done
Copying config 69593048aa done
Writing manifest to image destination
Storing signatures

I don't see a mention of that anywhere on this issue so far. Did you try to raise it as a problem/blocker anywhere? Why not on the GH issue?

I raised it on a call but I should have mentioned the blockers on the issue and updated it.

Acceptance Criteria

[ ] Setup existing 4.x cluster to use internal registry for tests in the Linux VM.
[ ] Scripts to execute the test and cleanup
[ ] Create prow job

Acceptance Criteria
* [ ]  Add user developer on 4.x cluster to use internal registry

* [ ]  Scripts to execute the test and cleanup

* [ ]  Create prow job

Can we do these same steps on IBM Cloud @rnapoles-rh ?

First try to get the entire thing done manually as research and then specify what needs to be done to automate it.
/triage needs-information

Steps need to be done

assign role of registry-editor and registry-viewer to the user and expose the registry using DefaultRoute

Note: need to do only for 1st time

Script to

Login into cluster and podman as user
create temporary namespace to store image
build image with tag and push image
export image with env var ODO_BOOTSTRAPPER_IMAGE
clone odo and run test
delete temporary namespace containing image

Script to start test from prow side

setting env for starting the test and a ci-firewall command starting the test from prow

Create job on prow side for test.

Closing this as we will be using github-actions for the tests PR
/close