Support for generating (RW)StructuredBuffers

SPIR-V compiled from GLSL like the following:
layout(std140, set = 1, binding = 0) readonly buffer ExampleData
{
    vec4 Data[];
};

will produce HLSL using ByteAddressBuffer (or RWByteAddressBuffer if it's mutable).
ByteAddressBuffer _196 : register(t0);

Is there any support for generating (RW)StructuredBuffer? For cases like the above, where the SSBO is just a simple, single-type array, it seems like a StructuredBuffer could be used. The graphics library I am intending to use SPIRV-Cross with does not (at the moment) support raw buffers in the D3D11 backend, and I would like to avoid supporting that.

So, ByteAddressBuffer vs StructuredBuffer is actually a different buffer type in DX? Wow :|
Picking StructuredBuffer vs ByteAddressBuffer at whim sounds like it would be even more painful for an application to deal with.
The only workable solution to this I think would be to have an option which forces structured buffers for specific buffers, and will fail to compile if it encounters anything which does not conform to that. Atomics might also get funky.

So, ByteAddressBuffer vs StructuredBuffer is actually a different buffer type in DX? Wow :|

Yeah, it's rather annoying. On top of that, it's not possible to create a buffer that is both "structured" and "raw":

You can't combine the D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS flag with D3D11_RESOURCE_MISC_BUFFER_STRUCTURED.

https://msdn.microsoft.com/en-us/library/windows/desktop/ff476900(v=vs.85).aspx#Raw_Buffer_Views
It wouldn't be very hard to support raw buffers in my graphics library, but I'm trying to avoid adding in concepts that are unnecessarily confusing or D3D-specific.

The only workable solution to this I think would be to have an option which forces structured buffers for specific buffers, and will fail to compile if it encounters anything which does not conform to that.

That was exactly the sort of thing I was imagining. I would be fine getting an error saying "Resource A cannot be compiled into a StructuredBuffer because XYZ". I'm already going through and processing all of the resources, so it's easy for me to just mark them with an extra flag.

Right, but you still have to plumb through if a buffer is UAV capable at some point, so picking STRUCTURED or RAW_VIEWS shouldn't be that much different?
It seems to me like a very specific workaround for a very specific case, so I'm not convinced this should be in SPIRV-Cross.

Right, but you still have to plumb through if a buffer is UAV capable at some point, so picking STRUCTURED or RAW_VIEWS shouldn't be that much different?

Yeah, it wouldn't be hard to allow that. Users would just have to choose between Structured or Raw buffers up-front. I'm just trying to avoid muddying the waters by introducing a D3D11-specific concept with no analog in other API's, and trying to keep things simpler in general. It's certainly debatable whether that decision is worth it, though.

Right, but if you control which shaders go in (i.e. SPIR-V), you know you will only see ByteAddressBuffer, so Structured should not be needed, or?

I don't have a tight coupling with SPIRV-Cross, so it's hard to make that assumption, although it would make this part simpler (if more restrictive). Users are free to produce the HLSL bytecode however they want -- directly from HLSL with FXC, through some other shader translation framework, etc.

Do you need complex types in that structured buffer, e.g. a struct or matrix?

I think it would need to include custom structs to be worth including -- it would be too limited otherwise.

I would need to add a whole new buffer alignment validation scheme for StructuredBuffer

What sort of validation are you referring to?

The byte layout of a struct in a structured buffer will need to exactly match the layout which is defined in the SPIR-V. This needs to be validated by SPIRV-Cross or subtly wrong HLSL code can be generated. ByteAddressBuffer gets around this by using the offsets from the SPIR-V directly.

I see; that is indeed important. Doesn't similar validation need to be done for things like uniform buffers containing structs?

Interesting, do you have some examples? I had thought the alignment/size requirements for StructuredBuffers were pretty lenient compared to SSBO's. This does seem like an area where a lot of subtle, hard to track issues could pop up, though, so it makes sense to be very careful.

One example I think is float3, which would have 12 byte stride (?!), but SPIR-V will most certainly specify 16 bytes. I don't know of a way to force 16 bytes stride here, so that wouldn't work for example.
Basically, to use StructuredBuffer, the rules FXC apply must exactly match with the SPIR-V. If not, we're out of luck, and we have to use ByteAddressBuffer. It can get really shaky to make sure whatever input you get can always map cleanly to a StructuredBuffer. This assumption will only hold for trivial cases where there is no question about how to pack data.

I think that (u/i)vec3 are the only types that have these unusual alignment requirements in GLSL. At least, those are the only types that I've special-cased when I did similar validation in the past. When I did that, though, I validated uniform buffers in the same way. Wouldn't this analysis need to be applied if your uniform buffer contained, for example, an array of custom structs?

Yes, structs and arrays in cbuffer are indeed validated (cbuffer aligns to float4 in general, similar to std140), so the logical leap to validate for StructuredBuffer as well isn't that large.


Fontawesome.init() not a function

i instaled in a JS App in my app.js Fontawesome.init();  says its not a function

@devyaz can you provide example repo

this is a typescript that your example code requires
import { Fontawesome } from 'nativescript-fontawesome'; Fontawesome.init();
but am using vanilla Javascript so it goes
const  Fontawesome= require("nativescript-fontawesome"');
Fontawesome.init();//here is the problem!!
`

@devyaz
i copped what type script generate try use this and let me know
var nativescript_fontawesome_1 = require("nativescript-fontawesome");
nativescript_fontawesome_1.Fontawesome.init();

@moayadnajd  sorry for late response, but after using the code you suggested, it now runs without error but nothing is displayed!! here's my app.js
var application = require("application");
var nativescript_fontawesome_1 = require("nativescript-fontawesome");
nativescript_fontawesome_1.Fontawesome.init();
var frame = require('ui/frame');
if (application.android) {
    application.android.on(application.AndroidApplication.activityBackPressedEvent, backEvent);
}
function backEvent(args) {
    var currentPage = frame.topmost().currentPage;
    if (currentPage && currentPage.exports && typeof currentPage.exports.backEvent === "function") {
         currentPage.exports.backEvent(args);
   }
}

application.start({ moduleName: "home" });

@devyaz  did you download the fonts files ? and put them in the fonts folder ?

@devyaz can you send me your code or send me example so i can take a look

yes thats why i said it can display only unicode but not by font name
On Tue, Nov 21, 2017 at 3:24 PM, Moayad Al-Najdawi<EMAIL_ADDRESS>
wrote:

@devyaz https://github.com/devyaz did you download the fonts files ?
and put them in the fonts folder ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/moayadnajd/nativescript-fontawesome/issues/2#issuecomment-346025345,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATfQSReWxb0u2hbMRmRnP_Mn328VWrhFks5s4s8SgaJpZM4QRESI
.

this is my app.js
var application = require("application");
var nativescript_fontawesome_1 = require("nativescript-fontawesome");
nativescript_fontawesome_1.Fontawesome.init();
var frame = require('ui/frame');
if (application.android) {
    application.android.on(application.AndroidApplication.activityBackPressedEvent, backEvent);
}
function backEvent(args) {
    var currentPage = frame.topmost().currentPage;
    if (currentPage && currentPage.exports && typeof currentPage.exports.backEvent === "function") {
         currentPage.exports.backEvent(args);
   }
}

application.start({ moduleName: "home" });

 <Label class="fa" text="{{'fa-bluetooth' | fontawesome }}"></Label>

CSS
.fa { font-family: "FontAwesome"; }

 .ion{ font-family: "ionicons"; }

@devyaz are you using iOS or android ?
try this css for iOS need actual font name
.fa {
    font-family: FontAwesome, fontawesome-webfont;
}

am on android, and my font name is FontAwesome which should work for both IOS and Android


Boilerplate GHA script

Here is a starting point for a GitHub Actions script that runs CI. This assumes some structural similarity to the MolSSI cookiecutter (python -m pip install . should install the package, there should be a conda environment specified in devtools/conda-envs/test_env.yaml) but with some small modifications. The only necessary modification to get this running off the shelf should be updating PACKAGE_NAME_HERE
name: ci

on:
  push:
    branches:
      - "master"
      - "maintenance/.+"
  pull_request:
    branches:
      - "master"
      - "maintenance/.+"
  schedule:
    # Run a cron job once daily
    - cron: "0 3 * * *"

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macOS-latest, ubuntu-latest]
        python-version: [3.6, 3.7]
    env:
      PYVER: "${{ matrix.python-version }}"
      PACKAGE: PACKAGE_NAME_HERE  # Replace with the name of your package

    steps:
    - uses: actions/checkout@v2

    - uses: conda-incubator/setup-miniconda@v2
      with:
        python-version: ${{ matrix.python-version }}
        activate-environment: test
        channel-priority: true
        environment-file: devtools/conda-envs/test_env.yaml
        auto-activate-base: false

    - name: Additional info about the build
      shell: bash
      run: |
        uname -a
        df -h
        ulimit -a

    - name: Environment Information
      shell: bash -l {0}
      run: |
        conda info --all
        conda list

    - name: Install package
      shell: bash -l {0}
      run: |
        python -m pip install --no-deps .

    - name: Run tests
      shell: bash -l {0}
      run: |
        PYTEST_ARGS=" -v --cov=$PACKAGE --cov-report=xml --cov-config=setup.cfg"
        pytest $PYTEST_ARGS $PACKAGE

    - name: Codecov
      uses: codecov/codecov-action@v1
      with:
        file: ./coverage.xml
        fail_ci_if_error: true

This is awesome! Thanks for putting it together.
Only a few comments:

I think mamba-version is not ready for production usage yet (some inconsistencies between solved envs with conda env).
conda info could be conda info --all.
PACKAGE_NAME_HERE can be exported as an environment variable in jobs.tests.env.
CI_OS: ${{ matrix.os }} is not needed now that we use Goanpeca's action.
What about including some scheduled crons?

Thanks for the feedback!

I think mamba-version is not ready for production usage yet (some inconsistencies between solved envs with conda env).

Done - I like that this can be configured with only 1-2 lines changed, not needing an extra file or several lines changed

conda info could be conda info --all.
PACKAGE_NAME_HERE can be exported as an environment variable in jobs.tests.env.
CI_OS: ${{ matrix.os }} is not needed now that we use Goanpeca's action.
What about including some scheduled crons?

Agre on each, and done too!

Awesome, thanks!

What was once coanpeca/setup-miniconda needs to now be conda-incubator/setup-miniconda. The author forked it from the org, so something will be downloaded by an script, but that is not guaranteed to be updated and should not be used in general. See for details/updates: https://github.com/conda-incubator/setup-miniconda/issues/70

I've updated the above script to reflect the conda-incubator/setup-miniconda bump to v2

Based on discussion in https://github.com/conda-incubator/setup-miniconda/issues/129, it is probably better to run cron jobs a few hours before or after midnight UTC, since that's when everybody else runs their cron jobs and Anaconda's servers are less reliable then (for non-cached channels; conda-forge and the defaults channel should be fine, but the omnia channel is very flaky). I've updated the script at the top to run at 3am UTC

Based on discussion in https://github.com/conda-incubator/setup-miniconda/issues/129, it is probably better to run cron jobs a few hours before or after midnight UTC, since that's when everybody else runs their cron jobs and Anaconda's servers are less reliable then (for non-cached channels; conda-forge and the defaults channel should be fine, but the omnia channel is very flaky). I've updated the script at the top to run at 3am UTC

Note a small syntax fix that @mikemhenry found, which will be necessary to have YAML resolve 3.10 as 3.10 and not 3.1: https://github.com/openforcefield/openff-interchange/pull/359/files


Marketplace add & update: Kepler Builder & WireGuard

Description
This PR adds the fakespec & svgs for Kepler Builder & update Wireguard  for Marketplace
Type of Change

Non breaking change ('update', 'change')

Note to Reviewers

Made a release branch for this and moving it to staging.

Made a release branch for this and moving it to staging.


Example use of SwiftNIO ChannelHandlers

Expected behavior
This is an exciting library! It would be fantastic to have a slightly more elaborate code sample for the SwiftNIO ChannelHandlers, which I assume would be the most common API for users of swift-nio-imap.
Currently, the README includes a short login example using IMAPClientHandler, but it's not clear from the code how you'd handle an incorrect login for example. Being new to SwiftNIO, I'm not even sure where the response ends up. It would be great to have a slightly more elaborate example with a call and response for both Client and Server, to demonstrate the basic usage. Perhaps these are outside the scope of a README, and could end up in /examples.

Do you know how I can handle the login Response?


Deploy laravel-filemanager to DirectAdmin host , can not upload image and no error display

Hi,
I'm using laravel-filemanager version 1.7 and laravel version 5.4.I upload my image (size 25KB) successful in my local Apache webserver but i can not upload it in DirectAdmin host.No error in console.
I deploy project by follow :

Upload all file and folder to public_html folder.
Cut all file and folder in public folder and paste them to public_html.
Edit file index.html :
require DIR.'/../bootstrap/autoload.php'; =>  require DIR.'/bootstrap/autoload.php';
$app = require_once DIR.'/../bootstrap/app.php'; => $app = require_once DIR.'/bootstrap/app.php';

Please help me ! Thank you very much.
http://www.upsieutoc.com/image/YpV94N

apload all folders and files except the public folder, to the root directory. All files contained in the folder folder public move to folder public_html.
here is example

@hungelc did you run commands like chown or chmod?

@g0110280 I set chmod recursively for public_html folder but the issue is not fixed

Will it work if you rename public_html to public?

If you need to upload files to public_html, remember to set base_directory from here.

@g0110280  i always set 'base_directory' => 'public_html'. If i rename public_html to public, my website is error "The requested URL / was not found on this server.".
Do you check my host ? I can send you information about my host via e-mail

Hi @g0110280 sorry for my issues.I add logging to UploadController.php file and get an error "Reading Exif data is not supported by this PHP installation."
The error means my host is not install exif extension.I will contact the administrator to install it tomorrow.
Thank you very much.


gousty, disciplinableness (logical-conflict)

This pull request was generated by the 'mq' tool

/trunk merge


Autositemap Extension

This extension as a replacement for "mwsitemapgen.sh", it really simplifies things and really customizable.
The link for the documentation is https://www.mediawiki.org/wiki/Extension:AutoSitemap

This extension as a replacement for "mwsitemapgen.sh"

I don't think so, this extension can work for extremely small wiki only. It resolves only one thing -  when you have a very small wiki and cannot run mwsitemapgen.sh automatically. In all other cases, it will not work well (at all).

I'd also vote against this, the AutoSitemap extension idea is nice and I think it works well for wiki running in a restricted environments (like shared hosting), however, there are two major issues why it should not be used for Canasta or any other containerised wiki:

containerised wiki is not a restricted environment in a form that we can have parallel processing running inside a container
it's not necessary that wiki being created is an empty wiki, it can have a pre-imported database with existing pages and these pages will be ignored by AutoSitemap completely until edited or moved
the extension performs sitemap updates during page rendering, thus it does this synchronously and so adds to page loading time vs  mwsitemapgen.sh which runs in background and does not interfere with page rendering

Agreed with @vedmaka and @pastakhov

Thanks for the suggestion! Looks like this won't move forward.


All tile entities stop working after one or two actions

Hi Vaga!
UPDATE:
This is true for all tile entities from any mod. I am actively trying to determine the cause.
We have found a rather odd bug. The vanilla furnace will only cook one or two items before freezing (progress bar stops and no items are consumed). A slab furnace cooks items only if you have placed it and not ever unloaded the chunk.
Pack Version: 1.8.1
Disabled Mods: Lanteacraft 2, Roguelike Dungeons, HQM (LC2 and HQM until update)
We are currently using Thermos, a replacement for KCauldron. Please let me know if you need any more information. This may be specific to our setup but I wanted to let you know incase anyone else has this issue. :)

the servers have been tested on a normal forge server with no problem. Rob was the one that tested over night while I was asleep.

What plug-ins are being used?

Well, it seems that the issue may have been resolved. The mod, Tickprofiler, and the KCauldron Replacement we use, Thermos, were both messing with entity and tile entity lists. By disabling Tickprofiler, which is how we monitor the tps and high ticking entities unfortunately, we were able to resolve this issue.


Redux theme switcher

I have written ConnectedThemeProvider:
class ConnectedThemeProvider extends Component { 	render() { 		return ( 			<ThemeProvider  				theme={ themes[this.props.theme] }  				children={ this.props.children}  /> ) 	} }
and it's all good.
I have 3 themes:
`
import theme1 from './theme1';
import theme2 from './theme2';
import theme3 from './theme3';
export const themes = {
theme1,
theme2,
theme3
};
export const availableThemes = Object.keys(themes);
`
And it's all good
Every theme has only a key for the AppBar (RTAppBar) and a style for the background color like this:
.appBar {   background-color: yellow !important; }
(!important because the AppBar loads his main color, but this is not a big problem)
My problem is: The theme for ThemeProvider switches correctly (through redux store), but the style for appbar doesn't change, remains always the same. all the styles appears correctly in bundle.css
this is my index:
<Provider store={store}> 		<ConnectedThemeProvider> 			<ConnectedIntlProvider> 	  		<Router  	  			history={history}  	  			routes={getRoutes(store)} />     	</ConnectedIntlProvider> 		</ConnectedThemeProvider>   </Provider>,
and getRoutes contains the App:
export default function getRoutes() {   return (     	<App>             (Routes with their components)     	</App>   ); }
Could you help me please ?
Thank you !

I think this is not an issue of react-toolbox but more related to react-css-themr. Anyway, re-rendering on context change it's a recurrent issue, you may need to re-render manually.

Thank you @javivelasco ! I solved by inserting in runtime custom css with selectors data-react-toolbox :)

Amazing!


"The truth value of a Series is ambiguous" exception when training with sample_weights.

What happened:
When sample_weight is specified and train() method input's npartitions is not equal to the number of workers the following evaluation:
sample_weight = concat(sample_weight) if np.all(sample_weight) else None
fails :(
What you expected to happen:
Train model without exceptions :)
Minimal Complete Verifiable Example:
The following code raises an exception:
"ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()."
The bug is located in 102nd line of dask_xgboost/core.py file (https://github.com/dask/dask-xgboost/blob/master/dask_xgboost/core.py)
import dask.dataframe as dd
from dask.distributed import Client, LocalCluster
import dask_xgboost as dxgb
import pandas as pd

if __name__ == '__main__':
    lc = LocalCluster(n_workers=2, threads_per_worker=1)
    c = Client(lc)

    npartitions = 4

    X = pd.DataFrame({'a': [1, 2, 3, 4], 'b': [4, 3, 2, 1], 'w': [1, 2, 3, 4]})
    X_dd = dd.from_pandas(X, npartitions=npartitions)
    print(X_dd.columns)

    y = pd.Series([0, 0, 1, 1])
    y_dd = dd.from_pandas(y, npartitions=npartitions)

    w = X_dd['w']

    params = {
        "tree_method": "hist",
        'objective': 'binary:logistic'}

    bst = dxgb.train(
        client=c, params=params, data=X_dd, labels=y_dd, sample_weight=w)

The following chunk proposes a change which should fix this
# This is a change proposal
sample_weight = \
    concat(sample_weight) \
        if ~np.any([np.isnan(w).sum() for w in sample_weight]) \
        else None

# This is the old version and is bugged
# sample_weight = concat(sample_weight) if np.all(sample_weight) else None

One notable thing is that
np.all(pd.Series([0, 1, 2]))

will evaluate to False due to 0 in Series. Is that expected (is a weight for a single observation allowed to be 0) ? If such value for an atomic weight is allowed this condition will make dask-xgboost skip proper weights containing 0s.
Both conditions will fail silently when one of atomic weights is a NaN. I suppose when sample_weight is not None but weight for one of the observations is NaN the code should raise an Exception, e.g.:

if isinstance(sample_weight, tuple):
    if np.any([np.isnan(w).sum() for w in sample_weight if w is not None]):
        raise ValueError('Provided `sample_weights` contain NaNs')
else:
    if sample_weight is not None \
            and np.any([np.isnan(w).sum() for w in sample_weight]):
        raise ValueError('Provided `sample_weights` contain NaNs')

This was a tricky one to find.
Anything else we need to know?:
Environment:

Dask version: 2021.2.0
Python version: 3.7.9
Operating System: Ubuntu 16.04
Install method (conda, pip, source): pip3
dask-xgboost==0.1.11
xgboost==0.90

Would suggest looking at XGBoost's own Dask integration over using this library (if it is an option for you)
https://xgboost.readthedocs.io/en/latest/tutorials/dask.html

Unfortunately I am bound to xgboost==0.90. I tried to find the dask API buried inside xgboost==0.90 both in the docs (https://xgboost.readthedocs.io/en/release_0.90/index.html) and across the web and the only solution that I was able to find was dask-xgboost + xgboost.


Pubs

I'm going to go ahead and merge this, knowing that a lot of it may change. It provides a great base for us to work off of. But I think the way comments / pages are done will be drastically different than what we are thinking. Since we are opting for a realtime framework to build the site, we should embrace a more application based UI / UX, instead of standard flat pages and comment threads.

Yeah, was more of a translation of what we had on LAMP.


Updated rule: at-rule-empty-line-before

Updated rule: at-rule-empty-line-before with option ignore: ["after-comment"],

LGTM :)

Feel free to release a new version.

I've got a couple more changes on the way :smile:

:)


[Event Request] Codeunit 12 "Gen. Jnl.-Post Line" - OnPrepareTempCustLedgEntryOnAfterCheckCustApplicationMethod

Hi team,
In codeunit 12 "Gen. Jnl.-Post Line" procedure PrepareTempCustLedgEntry we would like to add some additional filters on variable OldCustLedgEntry, for that an event before OldCustLedgEntry.FindSet() would be a good solution:

[IntegrationEvent(false, false)]
local procedure OnPrepareTempCustLedgEntryOnAfterCheckCustApplicationMethod(var OldCustLedgEntry: Record "Cust. Ledger Entry"; Customer: Record Customer; GenJnlLine: Record "Gen. Journal Line")

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


trying to implement sub-routing

still not implemented  , will try in future

the sub-routing mechanism has been implemented and check if req.method === reqhandler.method also added ( get === get or errr)


[ISV-3899] Create new operatorcert entry point to wait for github PR labels

@jedinym please add the new entrypoint to project.scripts in the pyproject.yaml file before merging.


Remove code for python2.6 support

Remove unused import

This seem to be related to #990 right? Anyway, this has actual build failures unrelated to the current intermittent failures I think.

Yeah, it's related to #990. There was indeed some issue. I fixed it but I forgot to push. It should be good now.

Greaaaat! :D


Mixins: stack build error "Could not load module Relude.String, member of hidden package"

Hi @kowainik :pray:
Here I've minified a 4-file reproducer: relude-mixins.zip
On unpacking and stack build inside, this error appears:
foo> configure (lib)
Configuring foo-<IP_ADDRESS>...
foo> build (lib)
Preprocessing library for foo-<IP_ADDRESS>..
Building library for foo-<IP_ADDRESS>..
[1 of 2] Compiling Lib

/tmp/foo/src/Lib.hs:5:1: error:
    Could not load module ‘Relude.String’
    It is a member of the hidden package ‘relude-<IP_ADDRESS>’.
    Perhaps you need to add ‘relude’ to the build-depends in your .cabal file.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
  |
5 | import Relude.String
  | ^^^^^^^^^^^^^^^^^^^^

And of course, build-depends in the cabal file contains exactly relude ==<IP_ADDRESS>.
Stack Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f. Not sure if commercialhaskell/stack#5077 is related; perhaps it is. The --cabal-verbose commandline looks sane too; could be even bug in Cabal or further below :man_shrugging: Reporting to Relude for definiteness.
As a workaround, I'm switching to NoImplicitPrelude + import Relude. That way gives me the Text reexport, without further fiddling with dependencies.
HTH

@ulidtko Yes, that mentioned Stack issue is the reason why stack doesn't work when the mixins approach is used. This is already documented in the README as per the relevant issue:

#328
https://github.com/kowainik/relude#mixins


ownership not respected

because docker COPY does not preserve file owners, copying the whole slimmed root folder over, changes the ownership of all the files to root. Software relying on proper ownership will have problems, some apps have inbuilt ownership fixers, some don't.

Yes, this definitely needs to be addressed. Let me know if you have one of those ownership sensitive applications. I'd love to hear about the use cases!

I have such a scenario where I trying to slim down the custom image built on top of CentOS with Pivotol TC server installed. All operations on TC server-specific files are to be performed by the user:group as tcserver:tcserver. However, the slimmed down image does not preserve them and change them to root:0 which is not ideal.
Is there any workaround for this?

I'd also find a solution for this very useful. My use case is that during the build process I set up a user to use for running my app with de-escalated privileges then set all copied in files to be readable by that user.

Same issue here. My image uses ownership 1000:0, which is changed to 0:0 in the slim version. I also noticed that /tmp/ has group write removed, which means my app can't create a dir under /tmp.
I'm just experimenting at the moment, so I changed the slim Dockerfile to run some chmod and chown commands, but that means including those binaries in the image.

@pugnascotia which version of docker-slim are you using?

@callumgare are you using the USER instruction in your Dockerfile?

@callumgare are you using the USER instruction in your Dockerfile?

I’m no longer using docker-slim So I don’t remember exactly what I was doing but I believe so yes. I understand that it is discouraged at the moment but that was an important feature for me.

@callumgare Thanks for the clarification! Using the USER instruction is definitely not discouraged :-) There's a couple of constraints in the current implementation, but those will be addressed to take care of the side effects.

@kcq I downloaded the 1.26.1 just the other day.
You've found the correct Dockerfile - I recently changed it to stop running as root. Elasticsearch will actually refuse to run as root, which makes things interesting :-) But it'd be awesome to get docker-slim working on our image. Let me know if I can help here.

BTW, I've done a tiny bit of Go in the past, so I'm happy to roll my sleeves up.

@pugnascotia that'll be great if you can help out! Any help is appreciated including just reporting stuff like this... No need to be a Go expert :-) I'll be happy to do a code walk through to get you started. I'm pretty sure we'll be able to have a working ElasticSearch container and with the permission you want/need.

@pugnascotia silly question... what's the right way to build your docker image? That Dockerfile looks a bit strange on line 28 where it has ${source_elasticsearch} and it's something docker build is not happy about :-)

Ah yeah, there's some templating going on. You'll need to do e.g.
./gradlew distribution:docker:buildDockerImage

...and then you'll have an elasticsearch:test image to play with. There's more information in the CONTRIBUTING.md file in the repo, but just ping me if you have any issues.

Thanks for the pointers @pugnascotia ! It's a big repo with lots of stuff, so I wanted to ask first :)

Hey, did somebody bypass the problem with "ownership not respected" which @pugnascotia had ?
My app needs the normal settings for /tmp: 1777 - currently after running docker-slim (version: 1.26.1) it is as follows:
sh-4.2$ ls -ld /tmp/                                                                                drwxr-xr-x. 8 root 0 4096 Feb 13 14:26 /tmp/
Thanks!

@arturli 1.26.2 will help with these use cases where you need specific permissions in your new images. It'll be out pretty soon... docker-slim will try to keep the original permissions and there'll be an extra/explicit flag to overwrite the permissions if/when you need to...

@pugnascotia The new release is out (1.27.0) and it does a better job with the ElasticSearch container image :) The scripts I used for the repro are here: https://github.com/docker-slim/examples/tree/master/3rdparty/elasticsearch
Note that I had to explicitly include the mmdb files used by the ingest-geoip plugin.
By the way, with the latest version you have an ability to overwrite the file permissions too.

@arturli Take a look at the new release (1.27.0)... The /tmp directory permissions are 177, by default, and you can change them to something else if you want using the --include-path and the --path-perms/--path-perms-file parameters.

@kcq the latest release seems to be working well. I'll let you know if I run into any problems, but so far so good. Thank you 👍

@pugnascotia good to hear :) by the way, the next release will also add an extra flag to filter data in the included directories if necessary (using the --exclude-pattern parameter).


🚨 [BUG] - variadic params aren't correctly parsed

What happened?
Steps to reproduce:

Run variadicParameterExample.yaml

Expected behavior:

ttpforge should parse variadic params

Actual behavior:

ttpforge throws an exception

Any suggestions for fixing this bug?
No response
Relevant log output
bash-3.2$ ttpforge run forgearmory//examples/variadic-params/variadicParameterExample.yaml -a name='foo' -a password='bar'
2023-08-18T19:33:00.736-0400	INFO	cmd/root.go:101	Using config file: /Users/vvx7/.ttpforge/config.yaml
Error: could not load TTP at /Users/vvx7/.ttpforge/repos/forgearmory/ttps/examples/variadic-params/variadicParameterExample.yaml: template: ttp:12: function "args" not defined

### Details about your environment

System Version: macOS 13.5 (22G74)
System Arch: m1
Go: go version go1.21.0 darwin/amd64 (via asdf)

Hey! Thanks very much for the report - looks like I should remove that example as it has become outdated, apologies for the confusion.  This is an updated example of how to define TTP arguments, which should work correctly:
ttps/examples/args/define-args.yaml

I created the below PR to remove the deprecated example, will close this issue when it lands:
https://github.com/facebookincubator/ForgeArmory/pull/26
Thanks again for the report, happy to answer any questions!

Ah, ForgeArmory TTPs appear to be using the old format still. For example, backdoor-ssh-authorized-keys.

Oh my, that's embarrassing - appears there was a miscommunication on our end, those were supposed to go out with the updates to the native golang template format - sincere apologies!
Addressing in https://github.com/facebookincubator/ForgeArmory/pull/26  once I can wrangle someone to approve the PR, might be Monday since we're heading into the weekend.
Thanks SO much for bringing that to my attention!

The fix should be merged in, thank you so much @VVX7 for sending this in! Once you've confirmed all is well and working on your end, let us know and we'll close this issue out.

Confirming it works, ty!

Confirming it works, ty!

Awesome possum, closing!


allow select without table to support cross apply

This PR is addressing some of the issues reported earlier #123 #104
where people want to select some static values or native database functions or to support column reusability of cross/outer apply. The majority of the database provider supports this.
Let me know your thoughts on this one.

@ahmad-moussawi would you consider reviewing this and let me know what's your thoughts on this?

@mnsrulz I agree with you regarding omitting the no-table exception.
But I don't want to add an explicit CrossApply since it's the same as LATERAL JOIN in MySql for example,
So I prefer keeping it as an optional parameter where the developer can pass the join type there.

Gotcha! I can remove those explicit cross apply and outer apply methods.

@mnsrulz I agree with you regarding omitting the no-table exception. But I don't want to add an explicit CrossApply since it's the same as LATERAL JOIN in MySql for example, So I prefer keeping it as an optional parameter where the developer can pass the join type there.

@ahmad-moussawi  the pr has been updated. sorry for the late fix.

@mnsrulz the PR is merged now, thanks


IN in CASE

Hi Vitus,
Am using 0.6.0 (not 0.9.0) and was trying to implement the following today.
   @Query("update table set column = case id when in (:ids) then 1 else 0 end")
   Future<void> setColumnTrue(List<int> ids)

where id is the primary key and column is a boolean column in table.
Also tried
   @Query("update table set column = case when id in (:ids) then 1 else 0 end")
   Future<void> setColumnTrue(List<int> ids)

Kept getting a SQL compilation error when ids.isEmpty.
Hence, was wondering if this is even valid SQL. I couldn't find any documentation that said this wasn't. And if it is indeed valid, then is it / can be supported in floor?
Thanks
Abhinav

Hi @abhinavc. The second query seems to be the correct one. Are the names you've supplied in the examples above the actual ones? If so, you need to escape them by using backticks. See the SQL query at the bottom.
What is the error message you're getting?
UPDATE `table`
SET `column` = CASE
    WHEN `id` IN (:ids) THEN 1 ELSE 0
    END

Hi Vitus,
The names are representative - not actual. But let me try with back ticks - though that is
something I haven't had to do till now.

Hi Vitus,
Sorry, got side-tracked with some other work. But coming back, the update query is doing nothing at all. Using actual names, I have the following defined in my DAO
 @Query('select * from sports where has_target = 1 order by name asc')
  Future<List<Sport>> targeted() ;

  @Query("update `sports` set `has_target` = case when `id` in (:ids) then 1 else 0 end")
  Future<void> setTargeted(List<int> ids);

And to test, I did the following in my code. No change (after) providing an id
void func() async {
    List<Sport> targeted = await dao.targeted() ;

    print("--- submit_target: (before)") ;
    targeted.forEach((s) => print(s.name)) ;

    await dao.setTargeted(List<int>(id));

    targeted = await dao.targeted() ;
    print("--- submit_target: (after)") ;
    targeted.forEach((s) => print(s.name)) ;
}

I can work around this issue by breaking the update query into 2 steps - unsetting all rows and then setting has_target =  1 where id in (:ids) (no case though). However, if it's valid SQL, then you may want to support it.
Thanks for your help
Abhinav

Noticed the following run-time error though upon fresh re-build (flutter clean + run).
has_target is a boolean column. Not sure if it has any bearing
Unhandled Exception: DatabaseException(near "then": syntax error (code 1): ,
while compiling: update sports set has_target = case id in (2) then 1 else 0 end)
sql 'update sports set has_target = case id in (2) then 1 else 0 end' args []}

Sorry for keeping quiet so long about this one, do you still have this issue or can this be closed?

Closing due to inaction. Please reopen if you disagree :)


Requires both .env and .env.development/.env.production?

I'm having an issue when I use a .env file and run either a development build, or production build. If I run a development build, it also wants me to have the .env.development, and when running a production build, it wants a .env.production file.
Is this supposed to be happening, or should I only need the .env file regardless of built type?
Cheers.

The misleading warning is actually a bug which you can ignore. In development mode, we look for .env.development first and fallback to .env. So if don't want to separate different environment, having only .env is ok.
Will fix that in recent release, thanks for bringing this up 👍

@zetachang Thanks for the quick reply. Just to add, If I only have a .env.development or a .env.production file, I get errors to say it can't find the .env file also. Good to know I can just ignore these errors for now though.

Somewhat related and more of a question than an issue @zetachang: curious to your thoughts on using one .env file and simply adding all my dev and prod variables in it (differentiated by a suffix: i.e. CONF1_DEV and CONF1_PROD).
Since the DEV variable changes with deployment already I could simply use that conditional to load the different variables. Is there anything im overlooking in this? This comes up because as I reading over the module this is based on and looking into the 12-factor principles they mentioned not using additional .env files if possible. thanks for your thoughts


Added github actions for studio curators

I added a github action which gets the data from the scratch api about the studio curators. The output is stored in curators.json. The script runs at UTC 12:00. Can someone make a js script to parse /curators.json? Also should I move the python script to /.github/workflows/?

I'm sorry, but why is this needed? I can change the members page to show more data if you want.
Plus, I don't understand GitHub actions lol.

I think this will update the curators list every time someone makes a commit. That way we don't have to do the work of updating the curator list a bunch

You don't understand, it already automatically updates. Check the script.js script.

That makes requests to the Github API not the Scratch curators list; besides it only seems to show you, me, and dhuls public members of the organization as members.

But I thought this site was for the organization, as there is already an advanced topics site for the studio.

But I thought this site was for the organization, as there is already an advanced topics site for the studio.

ask ninjamar about their motives. I'm not the one with the idea to have the list of curators, I'm just discussing the idea.

This looks cool, however this site is for the GitHub organization, not the studio. (There is already a site for the studio.)
Another thing is that this could easily be done with JavaScript on the site itself without having to rely on the list created by the action.
All in all, I'm going to disapprove these changes as it would add an extra layer of complexity without making the site significantly better.
Of course this is just my opinion and I don't really understand GitHub actions very well, so the 'extra layer of complexity' could just from my non-understanding of GH actions.

If js makes requests to the scratch api from github pages, won't cors block the requests? The github action I made isn't that complex. It runs curators.py and then uploads the result to the github repo

Should I move curators.py into /.github/workflows/scripts/?

Should I move curators.py into /.github/workflows/scripts/?

Nah, I already updated the page. It would mean another PR.


Python kombu, billiard & celery updates

Beware, the kombu change causes a significant rebuild including the nova test suite being run. Which takes ages. Not expecting travis to succeed.
Things done:

[ ] Tested using sandboxing (nix-build --option build-use-chroot true or nix.useChroot on NixOS)
Built on platform(s)

[ ] NixOS
[ ] OS X
[x] Linux

[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Travis failure due to exceeding log length

Yup, expected. Builds locally though.


Explorer Jobs add possibility rename and add restriction

Hi ,
Actually  explorer jobs  work with 1 ,2 ,3 ,4  That can be cool too  change  for " First explore this chunck " it would leave the possibility of translating them
It would also be interesting to add exploration restrictions. such as choosing that exploration with a horse  but not with a boat ,would give a real interest and would give customization to this job =)

Possibility to track :
Movement by  riding mob :
-Pig
-horse
-strider
-mule
-donkey
Movement by Elytra :
-Fly
-gliding
Movement by player :
-Boat
-swim
-walk
-Running


0.13dev : shutdown of WSGIRefServer

Since 0.13dev now exposes the server object in self.srv for the WSGIRefServer, we could use it for shutdown like this, which is essentially the same than this answer on StackOverflow:
import bottle
@bottle.route('/')
def index():
    return 'hello'
@bottle.route('/stop')
def stopit():
    print('Stopping')
    server.srv.shutdown()
server = bottle.WSGIRefServer(port=80)
bottle.run(server=server)
print('Bye')

Opening http://localhost/ works, but opening http://localhost/stop does not, why?

I solved it with a new thread:
from bottle import WSGIRefServer, run, route
from threading import Thread

@route('/')
def index():
    return 'Hello world'

@route('/stop')
def stopit():
    Thread(target=shutdown).start()

def shutdown():
    server.srv.shutdown()

server = WSGIRefServer(port=80)
run(server=server)

For anyone else struggling to start the server again after shutting it down: you may need to call server_close as well to free up the port and avoid error: [Errno 98] Address already in use errors.
Extending from the example above:
def shutdown():
    server.srv.shutdown()
    server.srv.server_close()


Looks like the Actions addon is not working properly

It's not automatically picking up on the PropTypes.

This probably comes from lack of docgen information.
Storybook runs react-docgen (babel plugin) or react-docgen-typescript (webpack plugin) to extract ArgTypes. The actions addon enhances the ArgTypes that match some regex, such as ^on[A-Z].*.
If the ArgTypes are not present, this process can fail.

https://github.com/strothj/react-docgen-typescript-loader#performance

There is a significant startup cost due to the initial type parsing. Once the project is running in watch mode, things should be smoother due to Webpack caching.

If it means (1) we have to write a new custom Vite plugin just for it, (2) it significantly affects startup time and performance, which is one of the primary goals of Vite, then I'd rather live with the feature being broken - how badly will Storybook be affected? Will it work with PropTypes instead of/in addition to compile-time types?

This feature is "core" to storybook, but we can potentially address it in some other ways in storybook that don't involve that startup cost. I wouldn't call the vite builder complete until we've figured it out, but I can probably drive that work on the storybook side as part of supporting this and other community builders. I'll open an issue there.

Could we use the react-docgen-typescript as an temporary fix while this is in progress ? It's a lot easier to use storybook with this feature enabled.

Could we use the react-docgen-typescript as an temporary fix while this is in progress ? It's a lot easier to use storybook with this feature enabled.

Sure, but I think Storybook uses a Webpack plugin for it, so it has to be repurposed for Vite.

Well, to be exact - somebody has to repurpose it for Vite.

Is this something that should be in this repo as a package or a separate thing?

There are changes going on in Storybook core, I think, that will solve this differently!

Whilst waiting for this to land in core I played around locally to see how to get it working I've got two examples:
Using<EMAIL_ADDRESS>(It has support for resolving of imported types/proptypes) https://github.com/joshwooding/storybook-builder-vite/tree/explore-doc-gen
Using react-docgen-typescript
https://github.com/joshwooding/storybook-builder-vite/tree/explore-react-docgen-typescript
I haven't fully tested either of them but I had a quick look and everything seemed okay.

I've been diving into this and thought I'd write down my current thoughts (I also read @shilman's gist  ❤)...

react-codegen-typescript is much slower and doesn't support synthetic default React imports

// Broken
import React from 'react';
// Working
import * as React from 'react';

react-codegen doesn't support React.FC declarations

const Component: React.FC<Props> = (props) => ...

And wouldn't y'know our codebase uses a lot of:
import React, {useState} from 'react';

const Component: React.FC<Props> = (props) => ...

So I've settled on attempting to get react-codegen functional. From my testing using the babel plugin with @vitejs/plugin-react only works for JavaScript codebases because TypeScript will have already been transformed.
Instead, I've gotten react-codgen working with 6.0.0-alpha and a simple Vite/Rollup plugin. I also devised a custom handler which handles the React.FC case. I tried typescript-react-function-component-props-handler but found it to break/cause errors in certain cases and miss detecting others. I also have a working Vite plugin for react-codegen-typescript (though it is quite slow and suffers from the known issues above) - it might be possible to optimize it, but I hope react-codegen can reach parity first.
Another issue which I discovered is that Storybook's handling of tsType is not equivalent to flowType or type.

This function is missing union/literal cases
This issue might be a symptom of this missing functionality

So I'm using...
        // Storybook doesn't parse TypeScript literals via react-docgen (yet)
        // TODO: Contribute this bugfix upstream...
        if (
            type.name === 'literal' ||
            (type.name === 'union' && type.elements?.some(element => element.name === 'literal'))
        ) {
            propDescriptor.flowType = type;
        } else {
            propDescriptor.tsType = type;
        }

For certain cases to ensure unions/literals are parsed correctly. It might not be until after the holidays, but I'll see what I can share out 😁

@ewlsh, thanks for looking into this!  @joshwooding has also been making an attempt to get this working in https://github.com/eirslett/storybook-builder-vite/pull/167, it might be worth taking a look at that and collaborating.

@ewlsh, you might consider refactoring your usage of React.FC, Kent C. Dodds gives a few good reasons here: https://kentcdodds.com/blog/how-to-write-a-react-component-in-typescript.

@IanVS We're adding Storybook to a rather large codebase, refactoring all of our component typing patterns is not currently an option (nor is it necessarily desired).
Right now we're using a Vite plugin and it works quite well. This sidesteps the need to change the react-docgen dependency version in the babel plugin (we use react-docgen directly) and allows passing TypeScript sources. From what I've tested the babel integration won't work with custom handlers which depend on types (like React.FC) because the AST received is JavaScript, not TypeScript, because Vite has already transformed the files (though if our results differ here, I'm curious to learn why)
I'm off from work til the 3rd, once back this may either be an MR (internal plugin here) or a package (vite-plugin-react-docgen, perhaps). I'm considering a package because that would be more flexible.
Side note, I am curious about making it easier for users of this builder to configure/assemble the plugins - we don't use the same React configuration so we're currently doing some interesting manual insertion of the builder plugins.
const path = require('node:path');

const { mergeConfig } = require('vite');

// Import the Vite plugins from `storybook-builder-vite`
const { mockCoreJs } = require('storybook-builder-vite/mock-core-js');
const { codeGeneratorPlugin } = require('storybook-builder-vite/code-generator-plugin');
const { injectExportOrderPlugin } = require('storybook-builder-vite/inject-export-order-plugin');
const { mdxPlugin } = require('storybook-builder-vite/mdx-plugin');
const { sourceLoaderPlugin } = require('storybook-builder-vite/source-loader-plugin');

module.exports = {
    framework: '@storybook/react',
    core: { builder: 'storybook-builder-vite' },
    stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
    addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
    /**
     * @param {import('vite').UserConfig} config
     * @param {import('@storybook/core-common').Options} options
     * @returns {Promise<import('vite').InlineConfig>}
     */
    async viteFinal(config, options) {
        const { docgenPlugin } = await import('../docgen/plugin.js');

        // Merge our overrides into the base Storybook vite config from
        // `storybook-builder-vite`
        const overrides = mergeConfig(
            {
                ...config,
                // Don't load the default plugin list from `storybook-builder-vite`,
                // it includes a React that doesn't match ours...
                plugins: [],
            },
            {
                plugins: [
                    // This plugin hooks into react-docgen to provide prop inference...
                    docgenPlugin({
                        babel: {
                            configFile: path.resolve(__dirname, '../babel.config.cjs'),
                            envName: 'storybook',
                        },
                    }),
                    // We're manually adding the Storybook Vite plugins because
                    // we need to configure the React build plugin ourselves.
                    // See: https://github.com/eirslett/storybook-builder-vite/blob/61e5ad8749f141c1c0a8f1c4e095b1759c38964e/packages/storybook-builder-vite/vite-config.js#L7
                    codeGeneratorPlugin(options),
                    mockCoreJs(),
                    sourceLoaderPlugin(),
                    mdxPlugin(),
                    injectExportOrderPlugin,
                ],
            },
        );

        return {
            ...overrides,
            // Extend the base config...
            configFile: path.resolve(__dirname, '../vite.storybook.ts'),
        };
}

// ./docgen.js

// Copyright © 2021 Modern Health
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/**
 * This file defines a Vite plugin for React Codegen
 *
 * {@link docgenPlugin} for more information.
 */

import * as fs from 'node:fs';

import * as Docgen from 'react-docgen';

import { tsxTest } from './util.js';
// Not pasted here
// import { functionComponentHandler } from './functionComponentHandler.js';

const resolver = Docgen.resolver.findAllExportedComponentDefinitions;
const defaultHandlers = Object.values(Docgen.handlers);

/**
 * This function builds the code snippet containing the generated
 * documentation for Storybook...
 *
 * @param {*} _
 * @returns {string}
 */
function buildReactDocgenInfo({ babel, importer, filename, source, debug }) {
    try {
        const handlers = [...defaultHandlers]; // , functionComponentHandler];

        const docgenResults = [
            Docgen.parse(source, resolver, handlers, {
                ...babel,
                filename,
                importer,
            }),
        ].flat();

        return docgenResults
            .map(docgenResult => {
                const { displayName } = docgenResult;

                // Ensure the displayName is defined
                if (typeof displayName !== 'string' || !displayName) {
                    return null;
                }

                // TODO: JSON.stringify is a rough way to convert the generated documentation
                // into code. There should not be any non-JSON data types in the result, but
                // we may wish to explore a more robust conversion strategy down-the-road.
                //
                // react-codegen-typescript uses TypeScript to build the AST for this, while
                // the babel plugin uses babel's AST handling
                //
                // (it is bounded with error handling in case the output or displayName are invalid)
                const docgenInfo = `
                try {
                ${displayName}.__docgenInfo = ${JSON.stringify(docgenResult)};
                } catch (error) { console.error(error); }
                `;

                return docgenInfo;
            })
            .filter(result => result !== null)
            .join('\n');
    } catch (error) {
        if (debug) console.log(error);
        return;
    }
}

/** @typedef {(filename: string) => boolean} FileTestFn */

/**
 * @typedef {object} DocgenOptions
 * @property {FileTestFn} [test]
 * @property {import('@babel/core').TransformOptions} [babel]
 * @property {boolean} [debug]
 */

/**
 * Vite Plugin for [react-codegen], similar to [babel-plugin-react-storybook].
 *
 * [react-codegen]: https://github.com/reactjs/react-docgen/
 * [babel-plugin-react-docgen]: https://github.com/storybookjs/babel-plugin-react-docgen
 *
 * @param {DocgenOptions} _ the plugin options
 * @returns {import('vite').Plugin}
 */
const docgenPlugin = ({ test = tsxTest, babel = {}, debug = false }) => {
    /**
     * Caches the generated documentation using the original
     * source as a key.
     *
     * @type {Map<string, string>}
     */
    const documentedSourceCache = new Map();
    /**
     * Caches the original sources using the filename as
     * the key.
     *
     * @type {Map<string, string>}
     */
    const sourceCache = new Map();

    const importer = Docgen.importers.makeFsImporter();

    return {
        name: 'vite-plugin-react-docgen',
        transform(source, filename) {
            try {
                if (!test(filename)) {
                    return null;
                }

                // Check if the documentation is still cached.
                if (documentedSourceCache.has(source)) {
                    return `${documentedSourceCache.get(source)}`;
                }

                const codeWithDocs = `${source}

            ${buildReactDocgenInfo({
                babel,
                importer,
                source: fs.readFileSync(filename, { encoding: 'utf-8' }),
                filename,
                debug,
            })}`;

                // If the original source has changed, invalidate
                // the cache.
                const cachedSource = sourceCache.get(filename);
                if (source && cachedSource !== source) {
                    documentedSourceCache.delete(cachedSource);
                }

                // Store the cached version.
                documentedSourceCache.set(source, codeWithDocs);
                sourceCache.set(filename, source);

                // TODO: We should update the sourcemap, technically, though all docgen code is appended so
                // in practice nothing should be particularly impacted. Vite will warn because of this for now.
                return codeWithDocs;
            } catch (error) {
                if (debug) console.error(error);

                return null;
            }
        },
    };
};

export { docgenPlugin, buildReactDocgenInfo };

// ./util.js

// Copyright © 2021 Modern Health
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

export const pattern = /\.(t|j)sx$/;
export const nodeModulesPattern = /node_modules/;
export const storiesPattern = /\.stories\.(t|j)sx$/;

export function tsxTest(filename) {
    return (
        // Only transform .tsx documents
        pattern.test(filename) &&
        // Ignore node_modules
        !nodeModulesPattern.test(filename) &&
        // Ignore stories
        !storiesPattern.test(filename)
    );
}

Thanks for the context and for sharing your code.  I'm glad you're digging into this and finding some good solutions, and I'll look forward to what you can come up with in the new year.

Side note, I am curious about making it easier for users of this builder to configure/assemble the plugins

I agree it's clunky, but it does have the benefit of being flexible.  There is some discussion in https://github.com/eirslett/storybook-builder-vite/pull/175 about trying to make it simpler to configure.

Note that https://github.com/eirslett/storybook-builder-vite/releases/tag/v0.1.15 has been released which includes @joshwooding/vite-plugin-react-docgen-typescript and adds support for react typescript docgen.

@ewlsh I had forgotten about the code you shared and opened a PR (https://github.com/storybookjs/builder-vite/pull/299) to add our own react-docgen vite plugin, although now I see it's not as flexible as yours nor does it cache the results.  I'm curious if you ever published your version, and how it has been working out for you.  And I'd love your review on my PR if you've got some time.

@ewlsh I had forgotten about the code you shared and opened a PR (#299) to add our own react-docgen vite plugin, although now I see it's not as flexible as yours nor does it cache the results. I'm curious if you ever published your version, and how it has been working out for you. And I'd love your review on my PR if you've got some time.

We use our version internally and it works quite well (we use it for TypeScript components but the other features such as inferring from default parameters work too), I was exploring publishing a package similar to how the vite-plugin-react-docgen-typescript is set up but that has taken additional time (have to set up the processes for publishing oss in our org 😅). If we can/want to host the implementation within this repository I can put up an MR with our current implementation and we could merge our implementations?
The reason I implemented basic caching was that re-parsing the docgen info for every page on hot reload was quite slow in our component library.
The other main differences (I think) at first glance are...

Our version has handling for React.FC usage
The approach to handlers
Our version doesn't enforce pre, we load the file from the file system directly. (this is true for any imports in both our versions)
Your version includes the default name handling from the babel plugin (I haven't found a case where it is needed internally at least)
I'm using the alpha release, instead of a git commit (nice to see activity in react-docgen though 🥳)

(also happy to review your MR)

Thanks, it's quite late here right now so I'm done for the night (morning 😭), but would you mind terribly if I stole some ideas from your version to try out here?  Happy to give credit where due, in whatever format you'd like.

Your version includes the default name handling from the babel plugin

I think that's needed for cases where a displayName is set manually that's different from the component name.  Do you have situations like that in your code?

Thanks, it's quite late here right now so I'm done for the night (morning 😭), but would you mind terribly if I stole some ideas from your version to try out here? Happy to give credit where due, in whatever format you'd like.

Your version includes the default name handling from the babel plugin

I think that's needed for cases where a displayName is set manually that's different from the component name. Do you have situations like that in your code?

We don't so that makes sense 😄

but would you mind terribly if I stole some ideas from your version to try out here? Happy to give credit where due, in whatever format you'd like.

My main constraint is that our code has to be attributed to Modern Health's copyright (header is fine) and should show up under my email/a MH as the commit author 😅
So I could propose an MR tomorrow and as a committer in this repo you should be able to move your work on top?
If that is too gnarly I could always drop our changes on top of yours after merging 😄
It is getting late here too, so happy to chat tomorrow on best paths - it is even later in central time 😱

I'm Eastern time, even worse.  But yes, if you're willing to submit a PR, that would be ideal!  Thanks!

I'm Eastern time, even worse. But yes, if you're willing to submit a PR after mine is merged, that would be ideal! Thanks!

I forgot Michigan was mostly in Eastern 🙀, and yes sounds good!

@ewlsh

Our version doesn't enforce pre, we load the file from the file system directly. (this is true for any imports in both our versions)

By setting enforce: 'pre', and putting this plugin before @vitejs/plugin-react, it gets the raw typescript code before the react plugin strips it out and transforms it, which avoids the extra trip to the filesystem.  I'd be curious if you tried the same thing whether you'd see any small performance increase.

This has been released in<EMAIL_ADDRESS>


Argument add suggestions

As a Github action I would think the -t argument to only output tags might be valuable as opposed to the verbose default for each of the format types.

Additionally, the exclusion filter argument will be limiting if not added as some teams have indicated the need to add/substract files or paths to scan.

Fixed 1. with documentation on passing simple parameters (specifically this one).  The arguments should be documented somewhere as well.  Is there a link I can point to with all of the Cli arguments?
Fixed 2 with a special parameter for the ignore path.


Domain-to-realm matching vs MIT krb5.conf

Describe the bug
Commit https://github.com/dotnet/Kerberos.NET/commit/85eca6c936312a39078873b6a05bab39915ec01b added support for domain-to-realm mappings.
If I understand correctly, the project seems to try to be compatible with MIT/Heimdal's [domain_realm] section – in this case though the matching ends up being incompatible. Specifically this comment:
                // bar.foo.net matches explicitly
                //      bar.foo.net matches
                //      baz.foo.net does not match
                //      baz.bar.foo.net does not match

But in MIT's krb5.conf, this does match not only the specified domain but also everything under it. As noted in commit https://github.com/krb5/krb5/commit/8f5ce824012f2caab6770df464f096c38dc4cb2e, the documentation indeed used to say otherwise, but wasn't correct.

This fixes a long-standing documentation bug where we claimed that
a domain_realm mapping for a host name would not affect entries
under that domain name.  The code has always had the behavior where
a host name mapping implies the corresponding domain name mapping,
since the 1.0 release.

Expected behavior
A domain-to-realm mapping for bar.foo.net should also match quux.bar.foo.net.

"Try" is about right, though we do diverge from implementation from time to time where we break for compatibility with Windows or what the author (usually me) thinks is really the better mechanism. In this particular case it seems most logical that things that start with a period means inclusive of all values below, and anything beginning with a name is an exact match. It seems really weird that d.c.b.a would match c.b.a.
Is this a common scenario that krb5 users end up relying on?


*: allow index start from 0

This PR removes the modifications of index during initialization, which will allow raft's log index goes from 0 again. This is important as many existing test cases rely on it, especially those related to flow control. Those cases pass on master in an accidental way, checking what are exact broken will be too much work. Besides upstream patches from etcd also rely on the same assumption, only forbid growing from 0 in raft-rs will make it hard to port patches.
Most of the changes are basically revert of index changes introduced from #196 and #214.

Seems some test cases failed.


Feature/outdated

this branch replaces the menu by a message in case the menu on the restaurants website is not for the current week.

Updated "outdated" message so that it is consistent with other info messages


Consider adding a check to ensure that intra-site links are not external

Related #922

Aren't we doing that already now?

Yes done. Closing


Loading nested private repos prevents entering credentials

I am trying to load a private repo that depends upon another private repo. When I try to bower install the second repo, the way the github credential prompt is presented overlaps, preventing me from entering my credentials. If it matters, the top project depends on both project 1 and project 2
An example:
Project 2's bower.json would look like
{
    ...
    "dependencies": {
        "project1": "https://github.com/private/repo1.git"
    }
}

When I try to bower install --save https://github.com/private/repo2.git, the output reads
bower not-cached https://github.com/private/repo2.git
bower resolve       https://github.com/private/repo2.git
bower not-cached https://github.com/private/repo2.git
bower resolve       https://github.com/private/repo2.git
bower cached       https://github.com/private/repo1.git
bower validate      <version> against https://github.com/private/repo1.git#^<version>
Username for 'https://github.com': Username for 'https://github.com':

Where the last line prompts me for credentials twice at the same time.
I have not yet been able to find a combination of username/password entries that will get beyond that nested prompt.
It would be nice if when a prompt was needed, it would wait for entry before the next git repo was accessed.

Correction - if I enter my credentials twice, then my passsword twice, it works. However, the second password entry is typed into the console, not hidden at all.

I had the same problem today and could work around it by replacing https://github.com/ with git@github.com:.

entering credentials this way never was officially supported


Timeout Generating Snapshots of Large Volumes

When attempting to shapshot a large (multi-GB) volume, convoy reports a timeout executing the gzip command.
The convoy command run is:
convoy snapshot create $vol_name --name $snapshot_name
And the resulting error message is:
ERRO[0062] Error response from server, Timeout executing: gzip [/var/lib/convoy/vfs/snapshots/5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp], output , error <nil>

{
        "Error": "Error response from server, Timeout executing: gzip [/var/lib/convoy/vfs/snapshots/5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp], output , error \u003cnil\u003e\n"
}

Manually executing gzip on the file shows that takes about 2.5 minutes to complete:
# ll -h 5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67*
-rw-r--r--. 1 root root 4.2G Apr 11 08:27 5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp
# date ; gzip 5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp ; date
Mon 11 Apr 08:31:26 CEST 2016
Mon 11 Apr 08:33:55 CEST 2016
# ll -h 5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67*
-rw-r--r--. 1 root root 4.0G Apr 11 08:27 5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp.gz

Looking at the contents of the Convoy VFS directory, it seems that Convoy is giving up and terminating the gzip process after about a minute:
# ll -hrt --full-time /var/lib/convoy/vfs/snapshots/5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67*
-rw-r--r--. 1 root root 4.2G 2016-04-11 06:37:46.500756530 +0200 /var/lib/convoy/vfs/snapshots/5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp
-rw-------. 1 root root 1.6G 2016-04-11 06:38:46.501478969 +0200 /var/lib/convoy/vfs/snapshots/5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp.gz

I've rummaged through the code here, but can't find either where this timeout is set or where it can be configured. I'm wondering if the timout is intentional or not and I'd like to find out how to overcome it please.
Observed with Convoy 0.4.3 on CentOS 7.2 and Docker 1.10.3 on a NUC 6I5SYK (Core i5-6260U, 32GB RAM, PCIe SSD).
The multi-GB volume came about as a result of using Convoy to manage volumes for a container running GitLab CE, which uses Git LFS to version control large binary objects (in this case, an ISO).

Just found a note in this issue indicating that there's a non-configurable 60 second timeout for all commands:
https://github.com/rancher/convoy/issues/73
So had a bit of a rethink and tested pigz (parallel gzip) and found that it just bearly manages to compress the 4.1GB volume snapshot in under a minute:
# date; pigz 5204cf2a-5a95-4362-b853-7a11b7f07b33_724390fb-2ca6-4590-82b7-50d1a6fbde67.tar.gz.tmp ; date
Mon 11 Apr 11:25:07 CEST 2016
Mon 11 Apr 11:26:06 CEST 2016

So I'd like to propose two things:

Reconsider the hard 60 second design limit to account for larger volumes; make it a configurable timeout instead
Consider using pigz or some other parallel gzip to accelerate performance for larger volumes. Potentially this could be a switch in the convoy daemon command so that it can be enabled on systems with pigz installed

Hi @binghamchris
You should able to use --cmd-timeout parameter for latest release at: https://github.com/rancher/convoy/releases/tag/v0.5.0-rc1

Hi @yasker
Thanks to you and @jinuxstyle for the update :)
However I'm afraid there's appears to be a bug in v0.5.0-rc1. While attempting to test the update I ran into this:
# convoy snapshot create gitlab-prod-data --name snap-gitlab-prod-data-1463237239 --cmd-timeout 10m
Incorrect Usage.

NAME:
   convoy snapshot create - create a snapshot for certain volume: snapshot create <volume>

USAGE:
   convoy snapshot create [command options] [arguments...]

OPTIONS:
   --name       name of snapshot

ERRO[0000] Error when executing command: flag provided but not defined: -cmd-timeout
{
        "Error": "Error when executing command: flag provided but not defined: -cmd-timeout"
}

The position of the --cmd-timeout argument doesn't affect the outcome; the same error message is displayed regardless.
I found that a "CmdTimeout":"" was present in /var/lib/rancher/convoy/convoy.cfg, so I set that as follows:
{"Root":"/var/lib/rancher/convoy","DriverList":["vfs"],"DefaultDriver":"vfs","MountNamespaceFD":"","IgnoreDockerDelete":false,"CreateOnDockerMount":false,"CmdTimeout":"10m"}

However this doesn't appear to have had any impact. Running a snapshot command against a large volume (the same one that prompted me to file this issue orginally actually) still timed out after 60 seconds:
# date; convoy snapshot create gitlab-prod-data --name snap-gitlab-prod-data-1463237239; date
Sat 14 May 17:04:21 CEST 2016
ERRO[0062] Error response from server, Timeout executing: gzip [/var/lib/rancher/convoy/vfs/snapshots/gitlab-prod-data_snap-gitlab-prod-data-1463237239.tar.gz.tmp], output , error <nil>

{
        "Error": "Error response from server, Timeout executing: gzip [/var/lib/rancher/convoy/vfs/snapshots/gitlab-prod-data_snap-gitlab-prod-data-1463237239.tar.gz.tmp], output , error \u003cnil\u003e\n"
}
Sat 14 May 17:05:23 CEST 2016

I've tried to figure out where the issue may be in the code, however I'm afraid it's too sophisticated for my limited coding abilities.
I'm happy to provide any other testing or information I can help though :)

The position of the --cmd-timeout argument doesn't affect the outcome; the same error message is displayed regardless.

The --cmd-timeout option should be specified when starting the convoy daemon. And it's not an valid option for the command line for convoy client as the way you used.

I found that a "CmdTimeout":"" was present in /var/lib/rancher/convoy/convoy.cfg, so I set that as follows:

Did you edit the convoy.cfg manually? If yes, you should restart the convoy daemon to make it effective.

Apologies @jinuxstyle, I misunderstood where this was supposed to be used.
It's now working as intended when the --cmd-timeoutoption is used as you directed... I can backup my GitLab volumes again thanks! 😄


feat(curriculum): The Odin Project Block and Inline

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[ ] I have tested these changes either locally on my machine, or GitPod.

Closes #XXXXX

Hey @moT01,
Thank you for giving these suggestions. I have been struggling to come up with a good way to divide the challenges present on The Odin Projects' into smaller bits and pieces.
The problem is mainly that the text provided on the website is relatively short. Thus not finding a good way to split them in to smaller pieces without making them too easy.  Displaying multiple questions on the same page would mean that the blocks on our side would become extremely short as well.
One possibility I could think of would be that we split the descriptions in smaller pieces but make the questions harder to answer, a question that is not directly answerable from the provided text. But encourages the user to search for the answer instead. Like: "find the answer in one of our articles" as an assignment.
Let me know what you think, I am fine with not merging this until we come to a good solution. This pull-request would be a great candidate for trying new concepts.

One possibility I could think of would be that we split the descriptions in smaller pieces but make the questions harder to answer, a question that is not directly answerable from the provided text. But encourages the user to search for the answer instead. Like: "find the answer in one of our articles" as an assignment.

I like this, and I think it aligns with what The Odin Project already does like with questions:

Is an h1 block or inline?

The answer appears nowhere on the page. I would, however, not link to w3schools (at most, I would link to MDN)

@ShaunSHamilton What about not linking to anywhere and give the user some freedom on where they get the information from?

@Sembauke 💯 Not linking sounds like the best bet.

I am having a bit of trouble making new questions. Let me know if you have any suggestions.

I am having a bit of trouble making new questions. Let me know if you have any suggestions.

@Sembauke
Did you still need help creating new questions? Or where you good with that?

@jdwilkin4

Did you still need help creating new questions? Or were you good with that?

Yes please, the information that we are incorporating from The Odin Project can be viewed here:
https://www.theodinproject.com/lessons/foundations-block-and-inline

Hey @Sembauke !
Sorry for the delay
Here are my suggestions for new questions
The first thing I noticed in the TOP link you mentioned, is that they talk about the "normal flow" and even link to an MDN doc for it.
I think we should do the same thing here. It seems like it has been implied so far but it would be nice to explicitly talk about it in the beginning.
This could be one of the first few questions and selection of answers.
What is the "Normal flow" in CSS layouts?

Normal flow refers to the process of animating elements in a CSS layout.
Normal flow is a CSS property used to control the visibility of elements in a layout.
Normal flow is a CSS rule that defines the order of media queries for responsive design.
Normal flow in CSS layouts refers to the default positioning of elements on a webpage

I think it would also be helpful to have some questions like these
Which of the following is NOT a block level element?

paragraph element
img element
unordered list element
footer element

Which of the following is NOT an inline element?

form element
anchor element
img element
span element

Lastly, I think it would be helpful to have some more questions about how margin and padding affects block and inline elements
Here are a few options
How does padding affect inline elements?

Padding has no effect on inline elements.
Padding increases the width and height of inline elements.
Padding adds space around the content of inline elements.
Padding only affects the vertical spacing of inline elements.

How does margin-top affect inline elements?

Margin-top has no impact on the layout of inline elements.
Margin-top increases the height of inline elements.
Margin-top adds space above the inline element.
Margin-top only affects the horizontal spacing of inline elements.

What happens when you add padding-top: 10px; to a span element?

The span element's content will shift downward by 10 pixels.
The span element will gain additional space above its content.
The span element's width will increase by 10 pixels.
Padding has no effect on the layout of a span element.

What happens when you add padding-bottom: 15px; to a span element that was set to display: inline-block;?

The span element's content will shift upward by 15 pixels.
The span element will gain additional space below its content.
The span element's width will increase by 15 pixels.
Padding has no effect on the layout of an inline-block span element.

Hope that helps!

Thank you for all the suggestions @jdwilkin4 , I probably missed some backticks.


Quick fix to add missing 'this.' for property accesses

LGTM :)

@mhegazy yes, it's been on my computer for a few months now. 😄
Thanks guys!


How to debug triton kernels?

Hi, I wonder is there any possible ways to debug triton kernels like we can do in cuda kernels by printing some intermediate results?

:sweat_smile:  I really wish so. Right now, printing is a bit challenging because it would require storing the data to shared memoring and calling the external print function. What I do typically is I pass a debug torch.Tensor as a kernel argument and store the data that I want to inspect there. It's been very helpful

OK, thanks, I'll try it.


Why debugger is not working in the pomelo ?

I am executing the debugger with the command "node --inspect app.js" but the debugger break points are not working at all . Please help in this situation as I am only able to debugg in the pomelo with writing console.log manually at every step.

please use WebStorm for debug pomelo,just need  right-click app.js and click debug 'app.js'.


[NFC] Minimize uses of 'fileprivate' after SE-0169

It was declared in SE-0025 that our goal was for fileprivate to be used rarely. A number of rules were adopted to help promote this goal:

At the top level of a file, private is equivalent to fileprivate.
Inside any type, the nominal default access level is internal, and the compiler does not warn when private types have internal members. But, the effective visibility of any member is bounded by the visibility of the containing type. Therefore, a private type has members with default effective visibility equal to itself.
SE-0169 merges all same-file extensions for a type into the same scope.

Although it is said that first-party code is not intended to model ideal usage of the language, users nonetheless study this code and take stylistic cues from it. Therefore, all else being equal, it is useful to demonstrate the intended usage of private and fileprivate even if we don't call out this code as a model for others.
A manual audit of the standard library and the Foundation overlay reveals just under 200 uses of fileprivate that can be eliminated without any functional change.

@swift-ci Please test macOS platform

Build failed
Swift Test OS X Platform
Git Sha - a66f2de941b634d1d99f9aba12662fd903a87a82

@swift-ci Please test macOS platform

Build failed
Swift Test OS X Platform
Git Sha - a66f2de941b634d1d99f9aba12662fd903a87a82

@swift-ci Please smoke test Linux platform


Port of ChainCommitState to Rust

I updated the signatures of the 2 validation functions that operate on ids to Vec<String>. I think this or &[String] would be correct.


CLI implementation for sharded Migration using DMS

Implements the following -

Configuration interface for accepting sharded configurations for DMS.
API call implementation for all required DMS APIs
CLI implementation for data migration. Creates and launches DMS jobs for each Datashard in the given sharded configuration

DMS Migration -
./harbourbridge schema-and-data -source=mysql --target-profile="project=<project>,instance=<instance>,dbName=<dbName>" --source-profile="config=shardConfigNew.cfg" --log-level=DEBUG

DMS changes are checked into this branch https://github.com/GoogleCloudPlatform/spanner-migration-tool/tree/darshan/dms


update to use Guard::Compat

fixes broken test (due to Guard internals changing)
Guard::Compat should from future incompatibility issues
updated spec for RSpec 3
minor project updates here and there
no dependency on guard (not necessary anymore)

@cpjolicoeur - could you release this as v2.1.0?
(There's no rush - this is mostly to fix the tests and prevent the project from needing changes for future versions of Guard).

:+1:

v2.1 released.


Read wavefunction files to get initial orbitals

Use external program to generate initial orbitals.
To do this definitions of wavefunction files is needed. DGrid is a good starting point for searching wavafunction file definitions.

Hi


Update issue and PR templates

Linked Issue

#62
Acceptance criteria:
¯\_(ツ)_/¯
Comments

¯\_(ツ)_/¯
Checklist

[x] I've kept this PR simple, on-the-spot, free of cosmethic changes.
[x] I have reviewed my commit messages and history.
[x] I've assigned a reviewer.
[x] I acknowledge my changes may require an update in the wiki.
[x] I have added a reference to this PR to the corresponding issue.

[x] I've checked the checklist

Pull Request Test Coverage Report for Build 67

0 of 0   changed or added relevant lines in 0 files are covered.
271 unchanged lines in 9 files lost coverage.
Overall coverage increased (+0.09%) to 50.081%

Files with Coverage Reduction
New Missed Lines
%

src/Cardano/Wallet/API/V1/Types.hs
1
32.86%

src/Cardano/Wallet/Kernel/DB/Spec/Update.hs
3
46.34%

src/Cardano/Wallet/Kernel/DB/Read.hs
4
84.62%

src/Cardano/Wallet/Kernel/DB/Spec/Pending.hs
5
88.1%

src/Cardano/Wallet/Kernel/DB/HdWallet/Read.hs
11
69.05%

src/Cardano/Wallet/Kernel/PrefilterTx.hs
28
81.82%

src/Cardano/Wallet/Kernel/BListener.hs
49
25.5%

src/Cardano/Wallet/WalletLayer/Kernel/Wallets.hs
62
38.89%

src/Cardano/Wallet/Kernel/Restore.hs
108
0.0%

Totals

Change from base Build 62:
0.09%

Covered Lines:
4026

Relevant Lines:
8039

💛  - Coveralls


Switch camouflage system from replacing entities to use GenericVisualizer instead

About the PR

Switching the camouflage system to use GenericVisualizer instead of deleting and replacing entities
Why / Balance

it'd fix a lot of bugs that could be caused by deleting and replacing, and it'd also reduce the amount of prototypes that'd need to be made.
Technical details

N/A for now (draft pr)
Media

Requirements

[x] I have read and am following the Pull Request and Changelog Guidelines.
[x] I have added media to this PR or it does not require an ingame showcase.

Breaking changes

Changelog

i cannot for the life of me figure out how to change a damn sprite. it is genuinely easier to just spawn a new entity and delete the old one.


Documentation: rating schemes/items and default schemes

Article covering setting up and using rating schemes (rating_scheme, rating_scheme_item, measurable_category.rating_scheme_id) and documenting some of the built-in defaults that have yet to be externalized (e.g. application.overall_rating -> Investment scheme)


The resolution specified was not found.

C:\Users\Administrador\AppData\Roaming\npm>crunchyroll-dl -i https://www.crunchyroll.com/my-hero-academia/episode-1-izuku-midoriya-origin-730707 -u xxxxxxxx -p xxxxxxx -q 1080p --unblocked -o ":epname [:resolution] i Attempting to login... i Successfully logged in! i Logged in with a premium account. i Successfully initiated USA Crunchyroll session i Attempting to fetch episode... i Downloading episode as "Izuku Midoriya Origin [1080p].mp4" ! The resolution specified was not found. i Done! i Logging out...

Even specifying the quality, I get this error
Thank you for developing the tool.

Can you tell me which country you are in? I'll be pushing an update to include some debug logging later, but I'd like to get this fixed before pushing it out!

Can you tell me which country you are in? I'll be pushing an update to include some debug logging later, but I'd like to get this fixed before pushing it out!

I'm from Brazil (ptBR)

Fixed in 1.1.1


[#131289833] Parameterised roles

What
Story: Implement IAM roles for instances in the release build VPC
paas-bootstrap is generic but we want to be able to build specific concourse with specific permissions. We now allow to pass instance profiles as environment variables. They should be defined in aws-account-wide-terraform.
Other improvements:

restrict permissions of the compilation VM
remove unused terraform outputs
improve naming of compiled package cache bucket

This depends on a PR in aws-account-wide-terraform.
How to review

Apply PR in aws-account-wide-terraform
Build:

BOSH_INSTANCE_PROFILE=bosh-director-build CONCOURSE_INSTANCE_PROFILE=concourse-build DEPLOY_ENV=test-123 make dev bootstrap

Concourse should run at: https://concourse.build-123.dev.cloudpipeline.digital
Concourse and BOSH should have specific instance profiles
Destroy:

BOSH_INSTANCE_PROFILE=bosh-director-build CONCOURSE_INSTANCE_PROFILE=concourse-build DEPLOY_ENV=build-123 make dev bootstrap-destroy

Who can review
Not @benhyland or me

BOSH_INSTANCE_PROFILE CONCOURSE_INSTANCE_PROFILE are required by this PR. The user MUST pass then as they pass DEPLOY_ENV.
Can we add logic in the Makefile target check-env-vars or similar to check if the variables are passed?

Done

There is a potential leakage of credentials here: https://github.com/alphagov/paas-bootstrap/blob/4118963feaa50e3665123dc23b6686cdcf0839df/concourse/pipelines/destroy.yml#L176-L178

Can we also upgrade to stemcell 3262.22? as per https://github.com/alphagov/paas-cf/pull/560

This stemcell is for CF. Should I update concourse and bosh stemcells?

ok

LGTM


Improve performance of JS function  [moved]

This is Issue 1096 moved from a Google Code project.
Added by 2012-10-09T17:44:43.000Z by<EMAIL_ADDRESS>Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-Low, 1.3.0
Original description
Since 1.2.0 OrientDB supports functions. Well, there huge improvements in performance to act.

- caching function library
- pre-compile scripting and reuse them
- try the invokeDynamic of the new Rhino...

Implemented in 2.0


Fixes issue when opening the ViewController for leaving and returning to the CalendarView

Solved being able to select multiple days.
As mentioned in issue #12

Thanks. I'll get this merged and deployed asap.


add JupyterLab extension documentation

add JupyterLab documentation to user guide. Copied from here

Codecov Report

Merging #109 into user-guide will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           user-guide     #109   +/-   ##
===========================================
  Coverage       99.76%   99.76%
===========================================
  Files              12       12
  Lines            1709     1709
===========================================
  Hits             1705     1705
  Misses              4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 503d48e...a04ca9c. Read the comment docs.

Looks good

Add some links to related issues and PRs (in other repos)
Maybe don't put it at the end (we can discuss where to put it)

Do you want me to add a link to this issue?

yes


Refactor upgrade tests.

@hklai: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/daily-upgrade-tests.sh
67e00a331635d2f9f1ca68ebe9cf9b72b92a2e61
link
/test daily-upgrade-tests

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

@hklai: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/daily-upgrade-tests.sh
67e00a331635d2f9f1ca68ebe9cf9b72b92a2e61
link
/test daily-upgrade-tests

prow/daily-perf-tests.sh
67e00a331635d2f9f1ca68ebe9cf9b72b92a2e61
link
/test daily-perf-tests

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

/test daily-upgrade-tests

@hklai: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/daily-perf-tests.sh
67e00a331635d2f9f1ca68ebe9cf9b72b92a2e61
link
/test daily-perf-tests

prow/daily-upgrade-tests.sh
67e00a331635d2f9f1ca68ebe9cf9b72b92a2e61
link
/test daily-upgrade-tests

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

/hold

/test daily-perf-tests


Add timer to hyper server for http2_keepalive_interval

Motivation
As described in this issue: https://github.com/hyperium/tonic/issues/1725 the recent upgrade to hyper 1 has broken services that use http2_keepalive_interval. This was due to a missing timer, resulting in panics with the message You must supply a timer. See here: https://github.com/hyperium/hyper/blob/master/src/common/time.rs#L36
Solution
This solution adds in a timer to the server via this method: https://docs.rs/hyper-util/0.1.5/hyper_util/server/conn/auto/struct.Http2Builder.html#method.timer
The timer is a standard tokio timer: https://docs.rs/hyper-util/0.1.5/hyper_util/rt/tokio/struct.TokioTimer.html
Fixes https://github.com/hyperium/tonic/issues/1725

@AmeliasCode Thanks to your work. Unfortunately, my test still fails with the fix.
   Compiling tonic v0.11.0 (https://github.com/hyperium/tonic#98478acc)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 56.86s
     Running `target/debug/tonic-hyper10-debug 1`
test 1 (fail)
thread 'main' panicked at /Users/akira/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-1.3.1/src/common/time.rs:37:17:
You must supply a timer.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Apparently, your test adds http2_keepalive_interval at the server-side but my test add it on client side. I guess this is the reason my test isn't fixed.
            let endpoint = Endpoint::from_static("http://localhost:50000")
                // commenting out this line turn it into pass.
                .http2_keep_alive_interval(std::time::Duration::from_secs(1))
                .keep_alive_while_idle(true)
                .timeout(std::time::Duration::from_secs(5))
                .connect_timeout(std::time::Duration::from_secs(5));

Is enabling keepalive at client-side invalid? If so, it should be removed from the API.
nit: The commit ordering is very strange. The integration test should have been added at first.

@akiradeveloper Sorry for missing that you were experiencing the error on the client side. I was seeing it on the server side so that's what I was focusing on. I have a fix for the client side as well that I'll raise in a moment.


Update compilerplugin, scalapb-runtime to 0.11.9

Updates

com.thesamet.scalapb:compilerplugin
com.thesamet.scalapb:scalapb-runtime

from 0.11.8 to 0.11.9.
GitHub Release Notes - Changelog - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.thesamet.scalapb" } ]

labels: library-update, early-semver-minor, semver-spec-patch, commit-count:1

Superseded by #106.


EOS_Auth_ScopeConsentRequired

hi , please help me how to solve this problem(EOS_Auth_ScopeConsentRequired)

I don't work with EOS and this is unrelated to AS, you be better off asking the EOS discord channel


Deprecate/discontinue google/dart and dart-lang/dart_docker

With the official images, we should start telling people to migrate from the old images so that we can eventually sunset our use of google/dart and archive the dart-lang/docker_dart (especially because it's easily confused with dart-lang/dart-docker)
Checklist:

[x] Update readme: https://github.com/dart-lang/dart-docker/pulls
[x] Update readme on https://registry.hub.docker.com/r/google/dart/
[x] Update release scripts to no longer publish to this registry when releasing: cl/420720564
[x] Anything else on https://registry.hub.docker.com/r/google/dart/ to mark discontinued?
[x] Mark https://github.com/dart-lang/dart-docker as Archived
[x] Move https://github.com/dart-lang/dart-docker to https://github.com/dart-archive
[ ] Shutdown infra that is used to publish the docker old images.

I think we should fix https://github.com/dart-lang/dart-docker/issues/11 first.

@mit-mit We don't have arm images on google/dart either.

Oh, I see. I hadn't internalized that.

Accidentally archived this repo instead of dart_docker, undid that.