[Question] How to set k8s-api-server address

Hi,
when running longhorn-manager I need to set the k8s api address which should manager use.
Manager uses the the env variables KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT .
But I need to point the manager to different endpoint, otherwise for internal api address I will get following error:
E1125  leaderelection.go:306] error retrieving resource lock longhorn-system/longhorn-manager-upgrade-lock:
Get "https://<IP_ADDRESS>:443/apis/coordination.k8s.io/v1/namespaces/longhorn-system/leases/longhorn-manager-upgrade-lock":
x509: cannot validate certificate for <IP_ADDRESS> because it doesn't contain any IP SANs

Is there a possibility to set the k8s api address ??
thanks in advance

How do you do it for other Kubernetes controllers? I thought updating KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT is the way to change the API server endpoint.

@casek14
Is it correct the you are using the in cluster config so it uses KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to get the API Server endpoint. https://github.com/longhorn/longhorn-manager/blob/c97e0d81791884cc12ca6b09ba48d7e75706c503/vendor/k8s.io/client-go/rest/config.go#L410
I haven't tried yet but I am thinking whether we set the --kube-config=<KUBE_CONFIG_PATH>at here so that Longhorn uses the provide config file to get the api server endpoint at here

Thank you for replies.
The k8s provider I am using use api endpoint in format https://{cluster-id}.{zone}.exo.io:6443 , and as you can see when I use in cluster config, the api ip is not included in the cert so the manager cannot validate it.
For example cilium has option in config k8s-api-server to change the api endpoint, so I wanted to know, if longhorn has something similar.
I will try the --kube-config option and let you know.

Thanks! Looking forward to the result from you. If there is problem with the approach, I will dig deeper into the issue.

I was able to figure it out, at least for manager and driver deployer.
I just overwritten the KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT
env:
  - name: KUBERNETES_SERVICE_HOST
    value: "{cluster-id}.{zone}.exo.io"
  - name: KUBERNETES_SERVICE_PORT
    value: "6443"

Pods are running except csi-provisioner:
NAME                                       READY   STATUS             RESTARTS   AGE
csi-attacher-5b4745c5f7-6v7dz              1/1     Running            0          4m28s
csi-attacher-5b4745c5f7-cdvmw              1/1     Running            0          4m28s
csi-attacher-5b4745c5f7-xp97r              1/1     Running            0          4m28s
csi-provisioner-57d6dbf5f4-85qpf           0/1     CrashLoopBackOff   5          4m28s
csi-provisioner-57d6dbf5f4-9nxvl           0/1     CrashLoopBackOff   5          4m27s
csi-provisioner-57d6dbf5f4-j2fmd           0/1     CrashLoopBackOff   5          4m27s
csi-resizer-75ff56bc48-cx7lf               1/1     Running            0          4m26s
csi-resizer-75ff56bc48-q8db6               1/1     Running            0          4m26s
csi-resizer-75ff56bc48-z5r6q               1/1     Running            0          4m26s
engine-image-ei-3bd16bdf-6nbdx             1/1     Running            0          4m48s
engine-image-ei-3bd16bdf-c7pzn             1/1     Running            0          4m48s
engine-image-ei-3bd16bdf-dpvlz             1/1     Running            0          4m48s
instance-manager-e-2afe77cf                1/1     Running            0          4m34s
instance-manager-e-a8d8f6a8                1/1     Running            0          4m48s
instance-manager-e-e3fc8973                1/1     Running            0          4m10s
instance-manager-r-268c22dc                1/1     Running            0          4m8s
instance-manager-r-8490a0b5                1/1     Running            0          4m47s
instance-manager-r-f7b205d4                1/1     Running            0          4m34s
longhorn-csi-plugin-jqzrj                  2/2     Running            0          4m26s
longhorn-csi-plugin-sb266                  2/2     Running            0          4m26s
longhorn-csi-plugin-sjhlh                  2/2     Running            0          4m27s
longhorn-driver-deployer-bbf8bd457-xn8j2   1/1     Running            0          5m
longhorn-manager-2ltbl                     1/1     Running            0          5m1s
longhorn-manager-cqq86                     1/1     Running            0          5m1s
longhorn-manager-zfbb5                     1/1     Running            0          5m1s
longhorn-ui-787bd98565-cgfbs               1/1     Running            0          5m1s

The csi-provisioner log:
❯ kubectl --kubeconfig kubeconfig -n longhorn-system logs csi-provisioner-57d6dbf5f4-85qpf
I1126 11:36:52.824771       1 feature_gate.go:216] feature gates: &{map[]}
I1126 11:36:52.824837       1 csi-provisioner.go:98] Version: v1.4.0-0-g1d9bad3
I1126 11:36:52.824864       1 csi-provisioner.go:112] Building kube configs for running in cluster...
F1126 11:36:52.836633       1 csi-provisioner.go:132] Error getting server version: Get https://<IP_ADDRESS>:443/version?timeout=32s: x509: cannot validate certificate for <IP_ADDRESS> because it doesn't contain any IP SANs

I find out that csi-provisioner deployment is created by the manager here: https://github.com/longhorn/longhorn-manager/blob/master/csi/deployment.go#L122
And in this deployment is not configurable to set the env variable: https://github.com/longhorn/longhorn-manager/blob/c97e0d81791884cc12ca6b09ba48d7e75706c503/csi/deployment_util.go#L57
So when the csi-provisioner container starts it gets the info from in cluster config which is from api address in my case.
Do you have any ideas how to fix this ?
I will test with kubeconfig.
Thanks for reply

Update test with kubeconfig mounted into manager and driver deployer.
Result is same as with use of env variables overwrite.
csi-provisioner is still failing.

Thanks for the update! Yeah, I think you found the root cause of the issue. Since this fix require modification to Longhorn manager source code, there is no workaround at the moment. We will fix this in the v1.1.0 release which is scheduled to release on Dec 15th.

Thx thats fine. @PhanLe1010 @yasker can you please point me to some document how to build longhorn docker images ? I would like to try workaround it in code and build images and test before, its merged.

Hi @casek14
Sure! Here is the document Getting started with Longhorn Development .
There are a few Longhorn components. However, you only need to build Longhorn manager for this fix.
After you built the new Longhorn manager image. You can replace the longhornio/longhorn-manager:master by your new manager image in this folder. deploy Longhorn by kubectl apply -f those components
Please let me know if you have any questions. Also, please don't use this Longhorn installation on production.

Thank you, this works

@casek14 due to the time constraint, we are unable to get this in v1.1.0. We will revisit it in v1.1.1.

Ok thank you, and when is the v1.1.1 version planned to be released ?

@casek14 It will be a few weeks after v1.1.0 release, likely in Jan 2021.

@casek14
In the meantime, you can manually edit the csi-provisioner yaml file to set KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT.


Remove fake service registry and replace with memroy

For https://github.com/istio/istio/issues/24812

/retest

/retest

@howardjohn: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
088b32182a56de41eda3bbc30cd0043fb4aa4ff5
link
/test lint_istio

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.

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

Test name
Commit
Details
Rerun command

lint_istio
088b32182a56de41eda3bbc30cd0043fb4aa4ff5
link
/test lint_istio

gencheck_istio
088b32182a56de41eda3bbc30cd0043fb4aa4ff5
link
/test gencheck_istio

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.

@howardjohn: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-distroless-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-distroless-k8s-tests_istio

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.

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

Test name
Commit
Details
Rerun command

integ-distroless-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-distroless-k8s-tests_istio

integ-ipv6-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-ipv6-k8s-tests_istio

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.

@howardjohn: PR needs rebase.

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.

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

Test name
Commit
Details
Rerun command

integ-distroless-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-distroless-k8s-tests_istio

integ-ipv6-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-ipv6-k8s-tests_istio

lint_istio
a46b8a41f2b5118b6893010897ded4b3386c4aa9
link
/test lint_istio

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.

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

Test name
Commit
Details
Rerun command

integ-distroless-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-distroless-k8s-tests_istio

integ-ipv6-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-ipv6-k8s-tests_istio

lint_istio
a46b8a41f2b5118b6893010897ded4b3386c4aa9
link
/test lint_istio

gencheck_istio
a46b8a41f2b5118b6893010897ded4b3386c4aa9
link
/test gencheck_istio

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.

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

Test name
Commit
Details
Rerun command

integ-distroless-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-distroless-k8s-tests_istio

integ-ipv6-k8s-tests_istio
3fc17c34dce7f02a3c9140f31a6f26039ca01100
link
/test integ-ipv6-k8s-tests_istio

lint_istio
a46b8a41f2b5118b6893010897ded4b3386c4aa9
link
/test lint_istio

gencheck_istio
a46b8a41f2b5118b6893010897ded4b3386c4aa9
link
/test gencheck_istio

unit-tests_istio
a46b8a41f2b5118b6893010897ded4b3386c4aa9
link
/test unit-tests_istio

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.


Use subTest() to avoid duplicate code

looks good, merging.

@facebook-github-bot shipit

@facebook-github-bot shipit


[js_interop] Sample code to import a JS module (transformer.js)

I try to integrate the HuggingFace transformer.js library
https://huggingface.co/docs/transformers.js/en/installation
Integration should be done that way:
<script type="module">
    import { pipeline } from 'https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>    let pipe = await pipeline('sentiment-analysis');
    let out = await pipe("I like wine");
</script>

I would like to call the "pipe" method from my flutter project ?
Can you please advice or provide a sample code ?

You can dynamically import the module use importModule in combination with callAsFunction. For example (I'm assuming pipeline and pipe are JS functions):
import 'dart:js_interop';

const transformers = 'https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>
void main() async {
  final pipeline = (await importModule(transformers).toDart) as JSFunction;
  final pipe = await (pipeline.callAsFunction(null, 'sentiment-analysis'.toJS) as JSPromise<JSFunction>).toDart;
  final out = await (pipe.callAsFunction(null, 'I like wine'.toJS) as JSPromise<JSAny?>).toDart;
}

I get this error: TypeError: Instance of 'LegacyJavaScriptObject': type 'LegacyJavaScriptObject' is not a subtype of type 'JavaScriptFunction'
From sourceCode: https://github.com/xenova/transformers.js/blob/main/src/pipelines.js
Pipeline extends a Callable
const transformers = 'https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>void main() async {
  try {
    final pipeline = (await importModule(transformers).toDart) as JSFunction;
    print("Pipeline: $pipeline");
    final pipe = await (pipeline.callAsFunction(null, 'sentiment-analysis'.toJS) as JSPromise<JSFunction>).toDart;
    final out = await (pipe.callAsFunction(null, 'I like wine'.toJS) as JSPromise<JSAny?>).toDart;
    print(out);
  } catch (e) {
    print(e);
  }
}

Callable:
export const Callable = /** @type {any} */ (class {
    /**
    * Creates a new instance of the Callable class.
    */
    constructor() {
        /**
         * Creates a closure that delegates to a private method '_call' with the given arguments.
         * @type {any}
         * @param {...any} args Zero or more arguments to pass to the '_call' method.
         * @returns {*} The result of calling the '_call' method.
         */
        let closure = function (...args) {
            return closure._call(...args)
        }
        return Object.setPrototypeOf(closure, new.target.prototype)
    }

    /**
     * This method should be implemented in subclasses to provide the
     * functionality of the callable object.
     *
     * @param {any[]} args
     * @throws {Error} If the subclass does not implement the `_call` method.
     */
    _call(...args) {
        throw Error('Must implement _call method in subclass')
    }
});

Hmm, it looks like it isn't a JS function (hence the type error) and they use their own custom callable type instead, so we'd need JSObject. If _call is going to be called in the subclass eventually, we could just use that and avoid the () since we don't have an interop way yet to call arbitrary objects.
import 'dart:js_interop';

const transformers = 'https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>
extension type Callable._(JSObject _) implements JSObject {
  @JS('_call')
  external JSAny? customCall(JSAny? a, JSAny? b);
}

void main() async {
    final pipeline = (await importModule(transformers).toDart) as Callable;
    final pipe = await (pipeline.customCall('sentiment-analysis'.toJS) as JSPromise<Callable>).toDart;
    final out = await (pipe.customCall('I like wine'.toJS) as JSPromise<JSAny?>).toDart;
}

Tx for your support !
It seems we are missing something...
I have continued to understand the source code and the pipeline is an (export) async function who is returning the right Pipeline regarding the task parameter (sentiment-analysis in our case).
I have updated the code to get a async function but I do not know how to call the method
Quick question: how do we know the import function with are importing with the importModule ? (the js file as multiple exports and we want to import the pipeline function)
try {
    final pipeline = ((await importModule(transformers).toDart) as JSPromise<JSFunction>).toDart;
    final pipe =  await <how to call pipeline function>('sentiment-analysis'.toJS) as Callable;
    print("OK2");
    final out = await (pipe.customCall('I like wine'.toJS) as JSPromise<JSAny?>).toDart;
    print(out);
  } catch (e) {
    print(e);
  }

export async function pipeline(
    task,
    model = null,
    {
        quantized = true,
        progress_callback = null,
        config = null,
        cache_dir = null,
        local_files_only = false,
        revision = 'main',
    } = {}
) {
    // Helper method to construct pipeline

    // Apply aliases
    // @ts-ignore
    task = TASK_ALIASES[task] ?? task;

    // Get pipeline info
    const pipelineInfo = SUPPORTED_TASKS[task.split('_', 1)[0]];
    if (!pipelineInfo) {
        throw Error(`Unsupported pipeline: ${task}. Must be one of [${Object.keys(SUPPORTED_TASKS)}]`)
    }

    // Use model if specified, otherwise, use default
    if (!model) {
        model = pipelineInfo.default.model
        console.log(`No model specified. Using default model: "${model}".`);
    }

    const pretrainedOptions = {
        quantized,
        progress_callback,
        config,
        cache_dir,
        local_files_only,
        revision,
    }

    const classes = new Map([
        ['tokenizer', pipelineInfo.tokenizer],
        ['model', pipelineInfo.model],
        ['processor', pipelineInfo.processor],
    ]);

    // Load model, tokenizer, and processor (if they exist)
    const results = await loadItems(classes, model, pretrainedOptions);
    results.task = task;

    dispatchCallback(progress_callback, {
        'status': 'ready',
        'task': task,
        'model': model,
    });

    const pipelineClass = pipelineInfo.pipeline;
    return new pipelineClass(results);
}

I have updated the code to get a async function but I do not know how to call the method

If pipeline is indeed a JS function (which it looks like it is), then you can just use callAsFunction like in the example above. callAsFunction lowers to something like <function>.call(...). I'm confused on what the Callable class is for then if pipeline is a function. Maybe pipe as a Callable? That would be consistent with your latest Dart code.

Quick question: how do we know the import function with are importing with the importModule ? (the js file as multiple exports and we want to import the pipeline function)

Can you elaborate what you mean here? importModule calls the dynamic import function with the given module name.

I have made some progress with this code:

pipeline is called successfully  (No model specified. is a log message from the module) !

Next Pb to be fixed:

I think I need to call the pipeline.callMethod with an await (it seems to run async)
check that pipe.customCall is working fine

try {
    final pipeline = await importModule(transformers).toDart; <--- import the JS module
    final pipe = (pipeline.callMethod('pipeline'.toJS, 'sentiment-analysis'.toJS)) as Callable; <--- call the pipeline method to ge
    print("Pipe ok");
    final out = pipe.customCall('I like wine'.toJS);
    print(out);
  } catch (e) {
    print(e);
  }

Result:
No model specified. Using default model: "Xenova/distilbert-base-uncased-finetuned-sst-2-english".
Pipe ok
TypeError: Cannot read properties of undefined (reading 'apply')
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>100:6827  h
https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>82:1553   async c
https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>82:45996  from_pretrained
https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>76:23223  V

Cool! Looks like the result of pipeline was indeed a Callable. I'll go ahead and mark this as resolved.


Make Error handling helper methods public

The A0APIError category on NSError contains some very useful methods for dealing with the errors returned by API calls. Would it be possible to make these methods part of the public headers?

@bradfol I wanted to improve a little how errors are returned but I can try to make some of its method public. What methods would you like to have? (I think you are interested mostly in the getters right?)

@hzalaz Yeah, it would be great to have the getters be part of the public headers.
- (NSDictionary *)a0_payload;
- (NSString *)a0_error;
- (NSString *)a0_errorDescription;
- (NSString *)a0_code;

- (BOOL)a0_auth0ErrorWithCode:(A0ErrorCode)code;
- (BOOL)a0_cancelledSocialAuthenticationError;

I would also encourage any improvements to the error handling :smiley:. It would be really cool to switch over the A0ErrorCode enum cases.


@Autowired @RequestScope bean identity changed randomly in the middle of a loop within an @Async method

Versions: Spring Boot 2.2.2, Spring Cloud Hoxton.RELEASE
Runnable demo: https://drive.google.com/open?id=1ThjcCoJToHKAhWYhpOIyGzi9xIoYtxRY
In my application, I have the following @Configuration to add support for @RequestScope bean within @Async methods.
@Configuration
@EnableAsync
public class AsyncExecutionConfiguration extends AsyncConfigurerSupport {`
    public static final String ASYNC_THREAD_NAME_PREFIX = "async-worker-";

    @Override
    @Primary
    @Bean("taskExecutorWithClonedRequestContext")
    public Executor getAsyncExecutor() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        // Copy the current RequestContext to each and every new @Async task
        executor.setTaskDecorator(new RequestContextCloningDecorator());
        executor.setCorePoolSize(5);
        executor.setMaxPoolSize(10);
        executor.setQueueCapacity(20);
        executor.setThreadNamePrefix(ASYNC_THREAD_NAME_PREFIX);
        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        executor.initialize();

        return executor;
    }
}

I'm using the following RequestContextCloningDecorator to clone the request context on every @Async call.
public class RequestContextCloningDecorator implements TaskDecorator {
    @Nonnull
    @Override
    public Runnable decorate(@Nonnull Runnable runnable) {
        RequestAttributes requestContext = this.cloneRequestAttributes(RequestContextHolder.currentRequestAttributes());

        return () -> {
            try {
                RequestContextHolder.setRequestAttributes(requestContext);
                runnable.run();

            } finally {
                RequestContextHolder.resetRequestAttributes();

            }
        };
    }

    private RequestAttributes cloneRequestAttributes(RequestAttributes requestAttributes) {
        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) requestAttributes;

        try {
            RequestAttributes clonedRequestAttribute = new ServletRequestAttributes(servletRequestAttributes.getRequest(), servletRequestAttributes.getResponse());

            // Since we're not using session scope, we only need to copy request scope attributes
            String[] scopeAttributes = requestAttributes.getAttributeNames(RequestAttributes.SCOPE_REQUEST);
            if (scopeAttributes.length > 0) {
                for (String attrName : scopeAttributes)
                    clonedRequestAttribute.setAttribute(attrName,
                                                        requestAttributes.getAttribute(attrName, RequestAttributes.SCOPE_REQUEST),
                                                        RequestAttributes.SCOPE_REQUEST);
            }

            return clonedRequestAttribute;

        } catch (Exception e) {
            return requestAttributes;

        }
    }
}

Everything has worked fine so far until I have a new feature which involves an @Async method with a loop inside of it. I can reproduce the bug consistently with 3 simple beans.
First, this is the RequestScopeBean which does nothing but holding an int value, default to 99.
@RequestScope
@Component
public class RequestScopeBean {
    private int value = 99;

    public void updateValue(int newValue) {
        value = newValue;
    }

    public int getCurrentValue() {
        return value;
    }
}

This is the @Service which contains an @Async method with a loop inside.
@Service
public class AsyncService {
    @Autowired
    private RequestScopeBean mrBean;

    @Async
    public void loopAsync() {
        for (int i = 0 ; i < 1000 ; i++) {
            if  (mrBean.getCurrentValue() != 1234) {
                System.out.println("=================");
                System.out.println("SERVICE BEAN: " + mrBean);
                System.out.println("INDEX: " + i + " - CUR VALUE: " + mrBean.getCurrentValue());
            }
        }
    }
}

Finally, this is our entry point.
@RestController
@RequestMapping("/async")
public class AsyncController {
    @Autowired
    private AsyncService asyncService;

    @Autowired
    private RequestScopeBean mrBean;

    @GetMapping("/test")
    public void test() {
        mrBean.updateValue(1234);

        System.out.println("=================");
        System.out.println("CONTROLLER BEAN: " + mrBean);
        System.out.println("CUR VALUE: " + mrBean.getCurrentValue());

        asyncService.loopAsync();
    }
}

When I call this endpoint, I'll see something like this.
=================
CONTROLLER BEAN: com.ft.demo.helper.RequestScopeBean@2278b137
CUR VALUE: 1234
=================
SERVICE BEAN: com.ft.demo.helper.RequestScopeBean@1f1b5a8c
INDEX: 865 - CUR VALUE: 99
=================
SERVICE BEAN: com.ft.demo.helper.RequestScopeBean@1f1b5a8c
INDEX: 866 - CUR VALUE: 99
=================
SERVICE BEAN: com.ft.demo.helper.RequestScopeBean@1f1b5a8c
INDEX: 867 - CUR VALUE: 99
......
=================
SERVICE BEAN: com.ft.demo.helper.RequestScopeBean@1f1b5a8c
INDEX: 999 - CUR VALUE: 99

Within the loop, at any random point of time, the @RequestScope bean will suddenly be swapped with a brand new instance, which carries the default value instead of the updated value.
When I wrote my code, I mainly referred to the solutions suggested in this StackOverflow question. If there's a better way to do this, please let me know. Otherwise, I think we should have a fix for this buggy behaviour? :)

Request scope beans are proxies that get recreated on the next access after the request scope cache is cleared.

@spencergibb. From your comment, I have the following understanding.

There's a request scope cache that is getting cleared when the synchronous processing of the incoming request completes.
The above can happen while an @Async task, which was spawned by the synchronous processing, is still ongoing.
If the above behaviour is a feature instead of a bug, it means all solutions provided in this StackOverflow question is wrong as they only try to clone the proxies. The program will appear to work initially but the request scope cache may get cleared at any given point of time resulting in bugs.

Please correct me if my understanding is wrong somewhere. In addition, if you have time, please point me in the direction of the classes where I can see how the request scope cache you mentioned was implemented. I'd like to understand the actual behaviour to come up with a proper solution.
If you have a better approach for dealing with @RequestScope in @Async tasks, I'd love to hear your opinions as well :).

The cache is not randomly cleared. It happens on a refresh event.

Interesting, I've been reading @RequestScope as @RefreshScope. All my advice is wrong and this has nothing to do with spring cloud commons (your demo doesn't include spring cloud). Stack overflow or https://gitter.im/spring-projects/spring-boot are going to be your best bets.

@spencergibb ahhh. Thanks for clarification. A developer in spring-boot also read it as @RefreshScope and ask me to post here. After I did that, he also realized the mistake and asked me to post in spring-framework :).

It didn't even click until I downloaded the demo app and was confused because spring cloud wasn't there, how could it be refresh scope, ah, request scope.


Extract program-error crate

Problem
solana_program::program_error needs to be made available outside solana-program
This branches off #2405 so that needs to be merged first.
Summary of Changes

move program_error.rs to its own crate and re-export its contents for backwards compatibility
make serde optional in the new crate
remove thiserror from the new crate

crate-check passed!


Duplicate Block

It would be a great piece of functionality if it was possible to duplicate an existing and already built block when adding content... with all of the sub fields in tact (although they don't necessarily have to be filled out, for my use case at least)

I've got the basics down under the feature/duplicate-block branch. So far it seems to work fine with some of the native Craft fields. Yet to see what happens when duplicating blocks with Matrix and other third-party fields, but it's looking promising.

I am testing it out! Where is the UI for duplicating a block? Or is there some other way to test it? I am happy to give it a whirl

Yeah it's a development branch so the Javascript needs building. I've attached the compiled versions here (just replace the main.js and main.js.map files in the neo/resources/ directory), or if you run an npm install then webpack on the repository's root directory you can build it yourself.
I should point out the feature/duplicate-block branch also contains all the changes for the upcoming 1.2.2 release. This release dramatically improves performance, but it's still in a trial period just in case some bugs passed testing.

I've reworked my solution for duplicate blocks, and now it's essentially guaranteed to work with any field type. So look forward to this in 1.3.0 :+1:

Accidentally closed it... my bad.

Cool! Want any testing? I tested the last version and definitely ran into some bugs... but figured you would find them too : )

I'd be happy for you to test :) Here's a copy of the latest changes. I hadn't had a chance to really test the older version you were testing, but I could imagine it would've had quite a few bugs. The newer version renders the duplicated block server-side, instead of trying to rebuild one on the client (which no doubt would be problematic for certain fields). I'm happy for you to report any bugs you find here. Thanks for helping out!

Nice it works much better and actually preserves data which it wasn't before!
The only bug I am noticing off the bat is that if I duplicate a top level block it is then moved into a child of the parent instead of creating another parent block - as a side effect of that behavior the sub blocks aren't being duplicated either.

Ah yeah, that was a silly mistake. I've fixed it now. Here are the updated JS files.

Child blocks now duplicate with blocks. Here's the updated compiled JS if you want to test it.

Testing it now

Great! Works much better than it had been. Still not duplicating in a specific circumstance - attached image because it gets confusing trying to verbally describe what is and isn't happening with all the child blocks... haha. Sorry if I am being annoying!

Ah I see, so it's not working with Matrix fields. Seems a little strange... I'm looking into it. Thanks!


Modify Existing Triton Kernels to Support Newer Triton Versions

Description:
Newer versions of torch (>= 2.4.0) requires installation of Triton version (>=3.0.0), this will cause an error in the JIT compile
of triton kernels that currently access global variables inside new checks here
Example:
NameError("Cannot access global variable ROPE_GROUP_SIZE from within @jit'ed function. Triton kernels can only access global variables that are annotated as constexpr (x: triton.language.constexpr = 42 or x = triton.language.constexpr(42)).  Alternatively, set the envvar TRITON_ALLOW_NON_CONSTEXPR_GLOBALS=1, but we do not promise to support this forever.")

This is currently mitigated using a TRITON_ALLOW_NON_CONSTEXPR_GLOBALS variable that temporarily allows for access to globals.
A fix to the triton kernels to access global variables by annotating as constexpr (x: triton.language.constexpr = 42 or x = triton.language.constexpr(42)) would be more permanent.

Closing with the resolution of #58


Fix fat32.go test image generator

The change to refactor CreateFilesystem broke the  testdata/fat32.go helper. This change fixes it.

@deitch can you review?

This all looks good, but why the reformatting? Didn't gofmt already have this correct?

Apparently it did not, as I am checking locally right now.


How to specify Cloud Role name for "codeless" app insights integration

https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-map#set-cloud-role-name
It's clear how to specify  cloud role in .net code, but it's unclear how to do it in a case of "codeless" integration.

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

ID: bfc7b703-b823-5719-36de-0eeaf096b3ca
Version Independent ID: d85431d2-7253-80e9-9036-b62e2e230cca
Content: Application Map in Azure Application Insights - Azure Monitor
Content Source: articles/azure-monitor/app/app-map.md
Service: azure-monitor
Sub-service: application-insights
GitHub Login: @mrbullwinkle
Microsoft Alias: mbullwin

@SychevIgor Thanks for the feedback! We are currently investigating and will update you shortly.

@SychevIgor For our codeless supported platforms and frameworks, it appears that we currently do not allow codeless-attach applications to customize CloudRoleName:
[Open for Discussion] Cloud Role Name (Knowledge Gap & How to customize) - Mar 8, 2019
https://github.com/microsoft/ApplicationInsights-Home/issues/326
@cijothomas Are you able to confirm if this is still the case?

For codeless attach, customizations are very limited. CloudRolename is not supported yet.

When Microsoft in official documentation recommend "codeless" approach- I would suggest that it's really first class feature.

@SychevIgor I would agree, and as you can see above there is a lot of interest in this subject.  The best way to add features is to submit and vote on feedback here:
https://feedback.azure.com/forums/357324-azure-monitor-application-insights
I can submit this idea on your behalf, or if you want updates and notifications you can submit it on your own.  Let us know which you would prefer.

@SychevIgor We've posted your feedback here:
https://feedback.azure.com/forums/357324-azure-monitor-application-insights/suggestions/39773818-ability-to-set-cloud-role-name-with-codeless-solut
Please feel free to upvote this in order to get more visibility.

@SychevIgor We are going to close this thread as resolved but if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.

Why does MS provide cloud_RoleName support for code-less app monitoring for Java:
https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config
But does not provide the same for Window's based applications?

@CyberPunkie Thank you for your question!  If you would like us to look into the difference between the Java and Windows support for cloud_RoleName, please open a new issue with your question.  This helps us track questions and makes it easier for other members of the community to find answers.

Issue already open -  very intrigued on the rationale behind dissimilar support for application using app inisghts.

Related issue: https://github.com/MicrosoftDocs/azure-docs/issues/67943

When Microsoft in official documentation recommend "codeless" approach- I would suggest that it's really first class feature.

Is there a Microsoft doc which recommends "codeless" approach?

When Microsoft in official documentation recommend "codeless" approach- I would suggest that it's really first class feature.

Is there a Microsoft doc which recommends "codeless" approach?


Migrating from beta 1.0.6 to 1.0.7 with problems

So I was using the beta version of TumblTwo 1.0.6 and now when I tried to use the newest version it doesn't work well. Open last version and blog names and dates and practically all of the info is gone, check out:

Beta version it's working fine but I want to control the number of blogs to simultaneous crawl, any way to solve this?
Thanks, cheers, great app

Well, this version -- as also written on the page -- should do the trick, I think.

Oh, I didn't read all, I though it was for TumlbOne only, thanks, it worked fine.
Also, are you planning on addin support for videos?


ch2: Implement rust version

ISSUE: #3

[x] Implement browser rendering based on druid
[x] Update project structure
[x] Mousewheel based scrolling

@sanxiyn PTAL


I generate 100 thumbnails that time code is stuck

I generate 100 thumbnails that time code is stuck,
Please Provide Validation in
Enter number of thumbnails to generate input filed,

@mayur-edx Thanks. Its a good first issue. Please create a PR of bugfix I will merge It, or I will fix it soon in next releases.

Fixed in #4


Installer Version <IP_ADDRESS> not recognized

I found an installer for a fairly old game (last update was around 2009) that seems to be made with CIC version <IP_ADDRESS>, though cicdec isn't able to recognize the version number. Manually extracting some of the compressed data files seemed to work.
The direct download link is http://www.synthetic-reality.us/WellOfSouls.exe
The download page is http://synthetic-reality.com/wosDownload.htm

Thanks for reporting the problem. Fixed :)


missing CONTRIBUTING.md

Description
This pull request addresses the issue of the missing CONTRIBUTING.md file, which is essential to help new contributors understand how to contribute to the project effectively. It outlines contribution guidelines, community communication, and additional resources to ensure a smooth contribution process.
Key Changes

Added a CONTRIBUTING.md file to the project.
The file includes:

Clear contribution guidelines to help new contributors.
Best practices for submitting issues and pull requests.
Community communication channels.
Additional resources for contributors to learn more about the project.

Screenshot

Thanks @biswajit-sarkar-007 for bringing up the issue, but unfortunately someone is already working on the same. see #28


pypy support and testing

Will require that we work around this psycopg2 bug

If we can't use psycopg2, I don't think we can realistically expect to support this.


Node editor

@liamhuber, I really like the latest changes and developments in the look and feel of ironflow. It is fun working with it. Also, the possibility to start my binder sessions also for subbranches is super useful and highly appreciated. A feature I am missing quite a bit to productively working with ironflow is a node editor, i.e. to quickly create and store user specific nodes.  It would be great if we could add to the gui a basic node editor that allows to program and add nodes without having to leave ironflow.

Glad to hear it!
I've been thinking a bit about the node editor too. I actual refactored out the entire sub-widget for looking at the graph (#72) in anticipation of putting the whole thing in a tab and having other tabs for, e.g., node editing.
Looking towards ironflow being a sort of self-contained gui via Voila (or similar), I think for power users we will effectively want to embed and entire jupyter notebook inside the gui, sharing the same scope, and having all of jupyter's nice bells and whistles like tab completion. I haven't looked into this at all yet though, so it might be trivially easy to do this sort of embedding, or it might be hell.
I can also imagine a gui node editor that holds your hand a lot more, with buttons for adding input and output, e.g. guiding you through possible datatypes for the IO with dropdown menus, etc. I can imagine a sort of "hardocore editor" tab for the embedded notebook, and a "friendly editor" tab for such a gui style.
Both of these are pretty low priority for me, since for now we still just use a single cell inside a notebook for the gui and have access to other cells. Then you can use tools from the ironflow library like this:
from ironflow.ironflow import GUI, Node, NodeInputBP, NodeOutputBP, dtypes

class My_Node(Node):
    title = "MyUserNode"
    init_inputs = [
        NodeInputBP(dtype=dtypes.Integer(default=1), label="foo")
    ]
    init_outputs = [
       NodeOutputBP(label="bar")
    ]
    color = 'cyan'

    def update_event(self, inp=-1):
        self.set_output_val(0, self.input(0) + 42)

gui.register_user_node(My_Node)

The new node shows up immediately in the nodes dropdown menu under user.
The other thing I wanted to do was make it so you could register multiple nodes at once directly from a .py file, e.g. by calling gui.register_user_node on every class in the file that is named *_Node.
At the end I would look at it like this...
High priority

[ ] Advertise node registration better, e.g. by including the above snippet right in the repository's example notebook
[ ] Adjust imports so everything you need for making custom nodes is available right from ironflow (instead of ironflow.ironflow) and can be imported alongside GUI
[ ] Add tools for importing hole .py files so power users can boot up their own set of custom nodes easily, maybe like from ironflow import GUI; gui = GUI('my_session', node_files=['fenics.py', '../../tools/matdig.py'])

Low priority

[ ] Embed a notebook inside the gui
[ ] Make a hand-holding gui for constructing new nodes

Thanks @liamhuber for your thoughts and the new version which I like very much. A few thoughts and issues:

gui.register_user_node works for me only for a single node. If I try to add a second node I does not work (the second node is not shown in the list of available nodes in the gui). The second option you provide in the notebook
gui2 = GUI("example_with_custom_node", extra_nodes_packages=[[My_Node, My_Node2]]

works nicely with two nodes.

To create new nodes it would be nice to show the code of existing nodes in the gui. For example, the box where the input and Global_ID are shown could also show a button which on a click shows the code of the corresponding node in the output window (right). This could be achieved e.g. by the following code snippet:
node =gui.nodes_dictionary['built_in']['val']
import inspect
print (inspect.getsource(node))

A few suggestions for existing and future nodes:

The bulkstructure node does not need a project input. We could simply set internally
pr = Project('.')

It would be nice to have a calc_MD node. For this we probably need an additional input for the Lammps node (calculator). Since the calc_MD node should be generic it would be also a good best practice example of how to implement generic nodes.


Method Seurat

Seurat method implemented with 1 config per method setting.
I couldn't find a way to use a custom neighborhood graph, so I chose to use Seurat::FindNeighbors (igraph SNN).
Closes #34

I think Seurat shouldn't use the neighborhood graph anyway because it serves as "non-spatial" control.

Seeing your stLearn comment, I will also tune k instead of providing resolution in the config.

Oh, good. Must have missed it here

Resolution tuning implemented


Lock App to Vertical Orientation

User Requirement: N/A
Description: This is just a nice-to-have so we don't run into the issues of weird scrolling things happening messing up our UI.
Just an optional thing to consider if we have time later in the future I guess.
Story Points: 1
Related Issues: N/A
References:
https://stackoverflow.com/questions/40332951/how-to-set-app-to-be-portrait-only

it has been done

This needs to be reviewed first before closing lol


Add more bench

Add some bench for testing so I propose to add them.

Codecov Report

Merging #3161 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3161      +/-   ##
==========================================
+ Coverage   34.73%   34.77%   +0.03%
==========================================
  Files         276      276
  Lines       39945    39945
==========================================
+ Hits        13875    13890      +15
+ Misses      24074    24061      -13
+ Partials     1996     1994       -2

Impacted Files
Coverage Δ

models/unit_tests.go
85% <100%> (ø)
:arrow_up:

models/repo.go
41.47% <0%> (+0.18%)
:arrow_up:

models/repo_indexer.go
51.94% <0%> (+0.97%)
:arrow_up:

modules/log/log.go
52.97% <0%> (+3.78%)
:arrow_up:

models/admin.go
87.75% <0%> (+6.12%)
:arrow_up:

Continue to review full report at Codecov.

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

LGTM

LGTM


fio: Minor refactor

Use postPatch for patching, so don't need to manually override
configurePhase and installPhase.
Add python to buildInputs, so fio2gnuplot gets patchShebangs'd.
Add platforms, so it gets built by Hydra.

Travis passed thanks


Action failing to find the command line tool

Error: Unable to locate the Visual Studio installation directory / location of VsixSignTool.exe
C:\Program Files\Microsoft Visual Studio\2022\Enterprise
Error: Error: Parameter 'commandLine' cannot be null or empty.```

Well that kinda sucks, I'll look into it.

It's not there, but where the nuget is installed. I suggest to download it explicitly and put it in some known place and then use it

Download the nuget and unzip it maybe?

I'm not sure if that tool ever changes, I'd still have to make sure and get the exact version you're using. Maybe I just need to figure out how to get to the SDK nuget package since that will already be downloaded as part of the restore operation

Maybe ask for GitHub actions team to include it in the image?

Okay, definitely got some work to do here. Thanks for the report!


Wrapped Volume named "config", in if .Values.config condition.

What this PR does / why we need it:
Fixes #5363
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #5363
Special notes for your reviewer:
@rk295 FYI.

Signed the CLA.


[Constructor] Don't sleep with lock

#160 refactored process to defer db transaction discarding (and lock release), however, it introduced a regression where we would sleep while holding the lock (this can prevent block syncing). This PR moves sleep to processLoop so that the lock is released before sleeping. Props to @metajack for finding this issue!
Changes

[x] Return sleep time from process so that we release the db lock before sleeping

Pull Request Test Coverage Report for Build 7995

15 of 23 (65.22%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.006%) to 77.982%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

constructor/coordinator/coordinator.go
15
23
65.22%

Totals

Change from base Build 7980:
0.006%

Covered Lines:
6166

Relevant Lines:
7907

💛  - Coveralls


docs(website): add v0.0.3 release blogpost

📑 Description

✅ Checks

[ ] My code requires changes to the documentation
[ ] I have updated the documentation as required

ℹ Additional Information

I quickly added some drop shadow


Make the diagnostic pushes and pops not have to ifdef-GCC everywhere

Instead of sequences of lines like this:
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

we could just have:
DISABLE_WARNING_POP

and make that support multiple compilers if/when you want to. See how this is done, for example, in this file of mine. The relevant code starts at line 97.

That looks much cleaner, I'll do something like that.

Recommend defining CXXOPTS_DIAGNOSTIC_PUSH & POP as empty , when GNUC is not defined .

Actually, one should make the relevant MSVC definitions:
#if defined(_MSC_VER)
    #define DISABLE_WARNING_PUSH           __pragma(warning( push ))
    #define DISABLE_WARNING_POP            __pragma(warning( pop ))
    #define DISABLE_WARNING(warningNumber) __pragma(warning( disable : warningNumber ))
#endif

Note that for specific warnings, one then has to make definitions translating a warning macro to a number of name which is different for GCC and MSVC. But for disabling all warnings just the first two lines within the ifdef here are enough.

Oops. There aren't any pragmas for MSVC, so I might as well just define it to nothing for now.


Adding missing checks in paginated results

also, bumping version

@GtheSheep Let me know if should not have touched that VERSION file :)
... or if there is anything else I should add.  The paginated code you wrote so nicely was just not checking each page for the matched object.  I saw you had some TODO code about consolidating the pagination but I took the easy way out and just added the missing code to the respective places.

@eanrollings - yep, that's my bad for not doing my TODOs! 😅 thanks for adding!


Switch PCL profiles to 328

Hi Florian,
I just noticed that you were using PCL profile 136 in the Portable projects. There is an even wider-reaching profile, namely 328, which includes all the targets of 136 plus Windows Phone 8.1 (non-Silverlight).
I have successfully updated the PCL profile locally, so I thought I'd share the change with you. It is a minimal change, I know, but I hope you'll find it satisfactory nevertheless.
Best regards,
Anders

Yes - this is indeed a very good profile and the update is highly appreciated!


chore: release master

:robot: I have created a release beep boop
0.2.0
0.2.0 (2024-08-02)
Features

adoc: allow list_continuation appears before block (a0106a6)

Bug Fixes

adoc: fix inline anchor (47c9e54)
adoc: fix paragraph ending (0963584)
adoc: reversion 827b58c214fdd14c92fe7ecb44990a01c5dcfcf3 (bd128cc)

0.3.0
0.3.0 (2024-08-02)
Features

bump version to 0.0.2 (409c578)
bump version to 0.0.4 (368e59a)
bump version to v0.0.3 (e36a4d7)
cargo: fix cargo tags (0541f2b)
inline: add id assignment (0735383)
inline: add index term (e285557)
inline: allow escape ++ (8baa82d)
inline: auto link add www extension (6e153e2)
inline: complete autolink (41346e6)
inline: split stem macro from inline_macro (061dc94)
queries: inline add asciimath (11c78c3)
rename to loongdoc (3da8c65)

Bug Fixes

inline: fix #9 (9ace57b)
inline: fix passthrough (35e3201)
inline: remove anchor (3d24983)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v0.2.0
:sunflower:


Cant move, only jump and look down

Web version works

nvm i had a driver issue

Even then, what was the issue, to help the next person with the same issue who may find this bug? Were you using a gamepad - if so, which?
I am normally trying to keep gamepad mappings up to date, but if there was a support issue with your concrete one, I'd be happy to assist.


Render all feature geometries and style them separately

A feature may have several geometries. The most common case is a combination of a shape geometry  with a label point. It would be nice to have a possibility to render all of them at a time and style each one separately.

You can. Let's say your feature has a default geometry (attribute name 'geometry'), and a second geometry (attribute name 'geometry2'). Then you can configure your layer with a style like this:
style: [
  new ol.style.Style({
    // style for the default geometry
  }),
  new ol.style.Style({
    geometry: 'geometry2'
  })
]

See http://openlayers.org/en/latest/apidoc/ol.style.Style.html#setGeometry for more details.

Fantastic! Thank you, @ahocevar

@ahocevar, one question please. Is it possible to identify geometry type in a geometry collection to style them differently? E.g. I have a geometry collection with a polygon and a point geometries and would like to render feature name for the point geometry only.

Yes it's possible. Try geometry.getType().

Ok. I have managed to achieve it by looping through geometries in a collection, checking their type and setting a specific geometry in an array of styles for a feature.
But it seems to be a pretty heavy piece of code for such a simple need. Aren't there some easier way to archive it? Probably some kind of geometry_type property in ol.style.Style would make the life easier.
Here is the fiddle I played with https://jsfiddle.net/yaugenka/3qakq4mn/5/

Define a style function! It gives you all the flexibility you need.

It's easier if you create styles by type, and just set the geometry for the respective style in the style function. See https://jsfiddle.net/3qakq4mn/7/:
var text = new ol.style.Text({
  text: '',
  font: '30px sans-serif',
  fill: new ol.style.Fill({
    color: 'red'
  })
})
var styles = {
  'Polygon': new ol.style.Style({
    stroke: new ol.style.Stroke({
      color: 'red',
      width: 2
    })
  }),
  'Point': new ol.style.Style({
    image: new ol.style.Circle({
      radius: 5,
      fill: new ol.style.Fill({
        color: 'blue'
      })
    }),
    text: text
  })
};
var stylesArray = [];
function stylefunction(feature, resolution) {
  text.setText(feature.get('name'));
  var geoms = feature.getGeometry().getGeometries();
  var length = geoms.length;
  for (var i = 0; i < length; ++i) {
    var geom = geoms[i];
    var type = geom.getType();
    var style = styles[type];
    style.setGeometry(geom);
    stylesArray[i] = style;
  }
  stylesArray.length = length;
  return stylesArray;
};

Your solution looks neater than mine. Thank!

@ahocevar
I have a similar case but i have the following problem.
for "Point" or "MultiPoint" i want to use two or three different style in order to render a marker, shadow etc.
that is different from your example where you are returning a single ol.Style.Style and not an array for each geom in the geom collection.
Should I use StyleGeometryFunction? But i don't know how.


Update ndarray to 0.15

Used the PR from #5 instead (more up-to-date), thank you though for submitting the PR.


Fix bug in comment parsing: only words starting with "#" should be comments

Currently, a hashtag occurring in any non-quoted string is treated as the start of a comment.
However this should only apply to the start of a word; e.g. echo foo#bar prints foo#bar.
See also: http://pubs.opengroup.org/onlinepubs/007904875/utilities/xcu_chap02.html

@substack: Bump - does this change seem reasonable? It's quite painful to try and work around this without trying to replicate all the quote parsing :(


Allowing host to be more configurable

Thank you for the pull request! Published as version 0.17.0.


calendarFunctions doesnot work if value passed as parameter

I have a value '2019, 9, 17' as ad date, I want to convert this to bs date. The problem is:
if i run console.log(calendarFunctions.getBsDateByAdDate(2019, 9, 17));
It shows correct value but if i write
var cp = '2019, 9, 17 ';
console.log(calendarFunctions.getBsDateByAdDate(cp));
then it says invalid format. What is the issue with this ??

I have a value '2019, 9, 17' as ad date, I want to convert this to bs date. The problem is:
if i run console.log(calendarFunctions.getBsDateByAdDate(2019, 9, 17));
It shows correct value but if i write
var cp = '2019, 9, 17 ';
console.log(calendarFunctions.getBsDateByAdDate(cp));
then it says invalid format. What is the issue with this ??

@hackerz12on getBsDateByAdDate function does not accept date as string. You need to pass three parameters year, month & month-date as:
var year = 2019;
var month = 9;
var date = 17;
console.log(calendarFunctions.getBsDateByAdDate(year, month, date));


HIP 105: Modification of MOBILE subDAO Hex Limits

This Helium Improvement Proposal (HIP) suggests modifying how Modeled Coverage Points (MCP) are calculated for Wi-Fi Access Points (APs) and CBRS Radios that provide overlapping coverage.

Hi all .. can i have an indoor wifi hotspot and outdoor one in the same place ? .


fixed major bug in all the pages

hi i noticed the new bug which was there in the contributor was there in all the pages where we were not able to see the content of the different pages  in the footer , we were not able to scroll down to see any of the content in the page
I have added the overflow elements in all the pages should not cause any problem now

Fixes #1184
@Its-Aman-Yadav please review my pull request and merge it


Fix broken headings in Markdown files

GitHub changed the way Markdown headings are parsed, so this change fixes it.
See bryant1410/readmesfix for more information.
Tackles bryant1410/readmesfix#1

Many thanks @bryant1410 for this. I haven't noticed the issue.


Update java workspace tags

Changes

Update workspace tagging rules for Java, add new tags for azure-cosmos, azure-storage-account, azure-service-bus, azure-event-hub, openai, quarkus, microprofile, micronaut, GraalVM
Refactor logic for java workspace tagging, using string operations instead of Regex to improve perf

This looks reasonable to me and Java is an important language to us.
However we want to limit this file from growing infinitely. @Flanker32 are all the packages you added really needed for data insights for your team? Can we trim down this list?
fyi @akaroml

This looks reasonable to me and Java is an important language to us. However we want to limit this file from growing infinitely. @Flanker32 are all the packages you added really needed for data insights for your team? Can we trim down this list?
fyi @akaroml

@isidorn Thanks a lot for your help and sorry for the late response. I'm syncing with our PM to discuss whether some properties could be removed and simplify the logic here.

This looks good to me. Thank you for cleaning up the PR. We will merge it in soon-ish.


Updated the accepted forms that a files.add method can take

Updated the acceptable content forms the file.add method can take. Reflecting changes made to the IPFS core in pull request #245.

Hi @anthony-mills, https://github.com/ipfs/interface-ipfs-core/pull/245 removed those options because they aren't possible, could you clarify why you've added them back?

Hi @alanshaw My apologies just disregard the pull request then. I was trying to code against the docs found #245 noticed the pull request wasn't reflected in the docs, so I just wanted to add them in for the next person that came looking for them. I was unaware the parameters had been taken out again :-(


Update observations after modifications

Since we look at observations in reverse order of step execution, we may see the following things:

Step N costs 100 energy.
Step N-1 costs 100 energy.
At step N-2, we do an action that refills our energy.
At step N-3, we do something that costs 50 energy.

The observations we should have are:

Immediately prior to step N, we have at least 100 energy.
Immediately prior to step N-1, we have at least 200 energy.
Immediately prior to step N-2, we don't have any need of energy.
Immediately prior to step N-3, we have at least 50 energy.

This means that within actions and prices, modifications must apply to observations:

Set must clear the value's observation and then observe the value it's set to.
Alter must alter the value's observation.

What we have right now:

we observe that we can afford the cost of the step.
between steps we update the observations based on the actual differences that occurred.
Set and Alter have no effect on observations themselves.

I believe this may mean we have this:
0. At step N+1, we have no observation on energy.

At step N, we update our observations based on the difference between the states before and after step N, which spent 100 energy. We still have no observation. Then we observe the requirements to perform step N, and observe that we have to have at least 100 energy.
At step N-1, we update our observations... step N-1 spent 100 energy, so we observe we need at least 200 energy. Then we observe our requirements of having at least 100 energy, which is already fulfilled by our observation of at least 200 energy.
At step N-2, we update our observations... step N-2 set our energy to 300, which adds energy based on our previous usage. If we were at 250 energy, then this would appear the same as picking up a 50-energy refill. Our observation says we need at least 150 energy. Then we observe the Set which does nothing.
At step N-3, we update our observations... step N-3 spent 50 energy, so we observe we need at least 200 energy. Then we observe our requirements...

We may need to add a observation debug output to see for sure. Even if we modify in Set, it's still kind of convoluted that affordability observation is calculated one way for the first observation only (step N) and another way for every other one (step N-1 etc state diff updates).

That last change fixed another issue we hadn't noticed at all: with an Option, insert replaces the stored value with the one provided, so every observation bitflag was actually only one flag ever.

This fix actually has a large negative impact on performance... sometimes... which I take to mean there's more contention on updating the trie or the solution collector. The program is still quite good otherwise: I had a peak of 28k/s throughput for<PHONE_NUMBER>00, but when it has solutions to process it gets much slower, down into the hundreds per 100k step.
I imagine we should treat collecting singleton items like Set, to reduce the number of flags in earlier steps.

Actually, it may be that we're running out of states to process... I see threads blocked in rayon waiting for work and not for a lock in axiom_verge2. That probably means we haven't put enough in the queue and what's actually there is being held by threads who grab several at a time to work on. So this is technically okay although I would like to speed up part of the initial solution processing (the mutations for example could be immediately put in instead of waiting for all of them... if it were easier to write a generator function).

I believe this is working, although there are still not-quite-ideal quirks showing up in the best solution that will be investigated in another issue.


Error: Token "Components" Does Not Exist

Although we didn't make any code changes, sometime around November 22nd 2021, we started getting an error when compiling our API documentation: Token "components" does not exist. However, the components file is still visible, accessible, and hasn't been changed in almost a year.
Is there anything you'd suggest to help troubleshoot this issue? Thanks for your help.

Bump.

$ tree -C -L 1 ./
./
├── endpoints
├── schemas
└── apispec.yml

$ swagger-cli --version
4.0.4

$ swagger-cli bundle --type yaml apispec.yml
Token "components" does not exist.

The endpoints and schemas directory contains path and schema definitions. We successfully preview the documentation with both Swagger UI and Redoc, so I presume our specification is valid. Still, I can't figure out the reason for that error.
Any assistance would be appreciated.

Same issue here.

I was able to solve the issue. The problem was that we had some:
$ref: '#/components/schemas/MyCookie'

But #/ will try to find components in the current file. As soon as changed to things like this, it worked:
$ref: '../cookies.yml#/components/schemas/MyCookie'

or
$ref: '../params.yml#/components/schemas/MyParam'

This way, we are referencing components in a specific file and not in "the current file".

It would be nice if the behaviour in swagger-cli would match the preview behaviour, as in.
That requires deciding on whether to interpret $ref: #/ as a reference inside the current file or whether to interpret it as a reference inside the current document (which is the merged result).
The latter is apparently the behaviour used by Swagger UI  and IMHO makes a lot more sense as it makes the component files more file-path agnostic.


Initial Release Cleanup

[x] Remove neo4j_arrow.py
[ ] Rename connector
[x] Add about info to github
[ ] Release notes/changelog
[ ] Modify project setup.cg to reflect initial version.
[ ] Add copyright headers to all files.

Renaming of the code bits here (requires a repo rename as well):
release-rename-connector

Copyright handled here: https://github.com/trovares/xgt_neo4j_connector/pull/3

All complete.


debugStack is reversed

Problem Description
The debugStack function provided by XMonad.Hooks.DebugStack lists the windows on the stack in reverse order. Is this a bug or the intended behavior?
The cause appears to be:
https://github.com/xmonad/xmonad-contrib/blob/58feba91d96fee8339d7cf56fb33537be819eb4b/XMonad/Hooks/DebugStack.hs#L110
where elements are cons'd onto accumulated results (a) in a left fold.
Configuration File
import XMonad
import XMonad.Hooks.DebugStack (debugStack)
import qualified Data.Map as M

main :: IO ()
main = xmonad def
  { keys = const . M.fromList $
      [ ((mod4Mask, xK_o), spawn (terminal def)),
        ((mod4Mask, xK_equal), debugStack)
      ]
  }

Checklist

[x] I've read CONTRIBUTING.md

[x] I tested my configuration with xmonad-testing (see commit)

It's basically whether you want the focused window at the top or the
bottom; I found it somewhat more convenient at the bottom where it was
closer to the behavior I wanted to debug via ManageDebug, which I split it
from while I was developing the debug hooks.
On Thu, Sep 10, 2020, 08:06 Ivan<EMAIL_ADDRESS>wrote:

Problem Description
The debugStack function provided by XMonad.Hooks.DebugStack lists the
windows on the stack in reverse order. Is this a bug or the intended
behavior?
The cause appears to be:
https://github.com/xmonad/xmonad-contrib/blob/58feba91d96fee8339d7cf56fb33537be819eb4b/XMonad/Hooks/DebugStack.hs#L110
where elements are cons'd onto accumulated results (a) in a left fold.
Configuration File
import XMonadimport XMonad.Hooks.DebugStack (debugStack)import qualified Data.Map as M
main :: IO ()
main = xmonad def
{ keys = const . M.fromList $
[ ((mod4Mask, xK_o), spawn (terminal def)),
((mod4Mask, xK_equal), debugStack)
]
}
Checklist

I've read CONTRIBUTING.md
https://github.com/xmonad/xmonad/blob/master/CONTRIBUTING.md
I tested my configuration with xmonad-testing
https://github.com/xmonad/xmonad-testing (see commit
https://github.com/ivanbrennan/xmonad-testing/commit/f51ab2f9110d15dd128db3967f9d2ae823171a66
)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/xmonad/xmonad-contrib/issues/379, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPRFIC6TXXCD6ILFXVXYA3SFC6LZANCNFSM4RE4ZZCA
.

@geekosaur Thanks for clearing that up. Borrowing an idea from this comment, I've added this to my local config, so I can get the stack in order I wanted:
debugStackString
  >>= trace . unlines . uncurry (++) . second reverse . splitAt 1 . lines

This works around the issue for my needs. Since the order was intended, I'll close out this issue.


Read version from git tag

close #376

@clav1d, please update the CHANGELOG. Thanks.

@bingzhang, FYI, I have updated the milestone. Thanks.


Support defaultValue

There are cases that users just want struct with let declaration. Previously, we have to declare var for <- to work. This just uses simple assignment with default value

Add DefaultType for type that has default value
Add <? operator to fall back to default value

struct Book: Mappable {
  let name: String
  let pageCount: Int
  let website: NSURL?

  init(_ map: JSONDictionary) {
    name = <?map.property("name")
    pageCount = <?map.property("page_count")
    website = map.transform("website_url", transformer: NSURL.init(string: ))
  }
}

@onmyway133


The behaviour of component$ is different for different syntax

Qwik Version
v0.9.0
Operating System (or Browser)
Chrome: Version 105.0.5195.125 (Official Build) (arm64)
macOS Monterey: v12.6
Node Version (if applicable)
v16.5.0
Which component is affected?
Qwik Runtime
Expected Behaviour
The following two code snippets are virtually the same wrt. JavaScript.
Snippet 1: Works as expected and renders "Hello World"
import { component$ } from<EMAIL_ADDRESS>
const HelloWorld = component$(() => {
  return
Hello World
;
});

export default HelloWorld;

Snippet 2: Throws the error shown in the below screenshot. Expected to have the same behaviour as above.
import { component$ } from<EMAIL_ADDRESS>
const HelloWorld = () => {
  return
Hello World
;
};

export default component$(HelloWorld);

Actual Behaviour

Additional Information
No response

Not a bug, this applies to the rules of the $, this docs explain it:
https://qwik.builder.io/docs/advanced/optimizer/#the-meaning-of-


Azure DevOps Pipeline Task?

Is there a pipeline task that we can add to our Azure DevOps release pipeline to execute these new commands from Az.Storage?  The "Azure PowerShell" task loads AzureRM into the session and therefore will not let you use Az.Storage cmdlets.  I've searched but can't find one, and using a plain PowerShell task won't work for us as security is locked down so tight we wouldn't be able to authenticate to Azure to execute the commands against a storage account.

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

ID: 9a558a9e-10d0-ea34-8780-d9084f87f952
Version Independent ID: 60dda4e0-7630-f358-aa3a-6a992eae61e2
Content: Managing the Azure Storage Lifecycle
Content Source: articles/storage/blobs/storage-lifecycle-management-concepts.md
Service: storage
Sub-service: common
GitHub Login: @yzheng-msft
Microsoft Alias: yzheng

Using the Azure PowerShell v4 Preview Release works.  It throws the same warning as on earlier versions, but it does allow me to use the Az.Storage commands which is what I care about.
The warning:
Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook.

@tpeiffer , Thanks for the Comment. We are actively investigating and will get back to you soon.

@tpeiffer,  You can check this video tutorial here to create custom Azure DevOps Pipeline Task to Use latest Az PowerShell Module. I would recommend you to refer the similar query here. See if that helps you!

@tpeiffer Was the above answer helpful for you ?
Thanks,
Adam

I have yet to research @YASWANTHM-MSFT 's post completely.  The first was a link to a youtube video that starts off with fairly inappropriate images for my corporate workplace, and the stackoverflow post he refers to wants me to fork the task and customize it.  I find that to be a fairly horrible idea as that creates technical debt that I would then have to go remove once the "official" task loads only the Az modules, not AzureRM.
I was able to get past this issue by first installing Az.Storage 1.1.0 in a PS task, then using an Azure PowerShell (v4) task to run the commands I need.  The errors are still there, but it must be configured OK because it does load Az.Storage and allow me to run those commands.
If it were up to me, I'd create a completely new "Az PowerShell" task that does the same thing as the "Azure PowerShell" task but just loads up your new module.  I'm surprised that isn't already there, actually, since every site I have went to recently on docs.microsoft.com have been updated to only show the new cmdlets.

@tpeiffer , any update on this issue?

@YASWANTHM-MSFT - The workaround I shared is acceptable for me until there is an official task. You may close this if you want.

@tpeiffer, Thanks for the update.we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly reopen the issue and continue the discussion


Bump dependency versions and cross-compile for Scala 2.12.0

I bumped version of cats to 8.1 as well and fixed build errors. I use your custom scala-xml artifacts for both 2.11.8 and 2.12.0, so you will probably want to cross-build it as well.

I would like to wait for scala-xml to be officially published for 2.12 (and Scala.js) before using 2.12... If you isolate the cats version bump I'm happy to merge it!

LGTM :+1:, many thanks :-)


[Proposal] Support synchronizing MySQL binlog in real time

As we know, Binlog is the basic infrastructure in the Mysql Replication Architecture. The synchronization between replcations is carried out by reading and writing the binary log file (binlog) which stored on the mysql master server.
We know that in mysql cluster mode, only one replication is responsible for writing and the other replications are responsible for reading. Therefore, the repliactions' architecture is usually composed of one master (responsible for writing) and one or more slaves (responsible for reading).
All data changes on the master node will be firstly write into local binlog, then copied to the slave nodes.

On the master node, the binlog file are named like mysql-bin.000001, mysql-bin.000002... MySQL will automatically segment binlog logs.

On the slave node, the binlog file name and position (offset) will be saved as a file or table to locate the latest consumption location.

---------------------                                ---------------------
|       Slave       |                                |      Master       |
|                   |              read              |                   |
| FileName/Position | <<<--------------------------- |    Binlog Files   |
---------------------                                ---------------------

In order to get binlogs, the slave node sends the “MySQL binlog dump command” to the master node, and the dump thread of the master server will start to pushing binlog to the slave server continuously.
-----------                                             ------------
|  Slave  |                                             |  Master  |
-----------                                             ------------
     |                      1、连接                            |
     | --------------------------------------------------->>> |
     |                      2、握手                            |
     | <<<--------------------------------------------------- |
     |                      3、验证身份                         |
     | --------------------------------------------------->>> |
     |                      4、注册成功                         |
     | <<<----------------------------------------------------|
     |                      5、Mysql dump                     |
     | --------------------------------------------------->>> |

That is to say, we can get binlogs on the master node by forging this dump command. We can use Alibaba's Canal to achieve this goal.
Canal forge the dump protocol to disguise itself as a slave node to get and parse the master server's binlog log. Then it will store the parsed data in a ring queue in memory, waiting for other clients to subscribe and get it.
Therefore, with canal as the intermediary, Fe can get and synchronize the binlog logs on the master node. The blueprint for the first stage is below:
                                               ------------------------------------------------------          --------------      ------
                                               | ---------- ---------> channel 1 ---------> table1  |          |            | ---> | BE |
             Binlog                    Get     | | client | ---------> channel 2 ---------> table2  |          | Cordinator |      ------
---------- ---------> ----------- ------------>| ---------- ---------> channel 3 ---------> table3  | -------> |            |      ------
|  Mysql |            |  canal  |      Ack     |                                                    |          |     BE     | ---> | BE |
|        |            |         | <------------|  FE                                                |          |            |      ------
----------            -----------              ------------------------------------------------------          --------------

The work we need to do will be divided into two stages:
stage 1:
1、Support creating consumption job and data channel in Fe to get parsed data in canal.
2、Support increasingly synchronizing the data changed in MYSQL, and ensure that the data isn't lost and repeateded.
stage 2:
1、Support synchronizing and executing MySQL DDL statements.
2、Embedding the canal into Fe, reduce one serialization, and no longer to independently deploy canal server.

We already finish stage 1 in pr
https://github.com/apache/incubator-doris/pull/6289
The proformance we test is below:
Environment

Cores
Memory

96
360G

Test Scenarios
1、Use mysqlslap as tool of MySQL for pressure testing.
Three source tables with the same structure in MySQL database (t1, t2, t3):
(avg row size 35 bytes)
+-------+---------+------+-----+---------+-------+
| Field | Type    | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| a     | int(11) | NO   | PRI | NULL    |       |
| b     | int(11) | YES  |     | NULL    |       |
+-------+---------+------+-----+---------+-------+

Three target tables of Doris database (test1, test2, test3)
+-------+------+------+-------+---------+---------+
| Field | Type | Null | Key   | Default | Extra   |
+-------+------+------+-------+---------+---------+
| a     | INT  | No   | true  | NULL    |         |
| b     | INT  | No   | false | NULL    | REPLACE |
+-------+------+------+-------+---------+---------+

Test Resule
scene 1

start-up canal
create sync job and start synchronizing
Perform insert operations in three source tables in Mysql

stage
statement
data size
cost(s)
tps avg
speed

mysql insert
1000w
120M
74
135135
1.6M/s

doris synchronization
1000w
120M
81
123457
1.5M/s

scene 2

start-up canal
Perform insert operations in three source tables in Mysql
create sync job and start synchronizing

stage
statement
data size
cost(s)
tps avg
speed

mysql insert
1000w
120M
76
131578
0.6M/s

doris synchronization
1000w
120M
72
138889
1.7M/s

Scene 3

create sync job and start synchronizing
Delete data from three source tables

stage
op
row
data size
cost(s)
tps avg
speed

mysql delete
delete
10000000
120M
30
33w
4M/s

doris synchronization
delete
10000000
120M
35
30w
3.4M/s

This feature is great！ Do you still working on stage 2？ @xy720


BloomEffect with selective objects

Hi @vanruesc, great library!
I'm trying to achieve Bloom Effect on some selective objects on the scene only.
Tried to combine this example with your library but haven't succeeded so far.
Can we have something like setSelection &selectObject function with Bloom Effect just like the OutlineEffect? 😄
Thanks,

Hi!

Can we have something like setSelection & selectObject function with Bloom Effect just like the OutlineEffect?

Yes, that feature should be easy to add.
I'm currently working on upgrading postprocessing to the latest version of three. You can expect selective bloom in the release after the next one.

Great to hear that! Thanks, mate.

FYI: I haven't forgotton about this feature request. Just been a bit busy lately.

that feature should be easy to add.

The implementation will require more time than anticipated. I'm planning on moving the selective render feature to the RenderPass to avoid code duplication in the OutlinePass.  Not sure when I'll get a chance to work on this, but it shouldn't be too long.

Added SelectiveBloomEffect in<EMAIL_ADDRESS>The selection feature could have been added to the existing BloomEffect, but I decided to create a new effect instead which extends BloomEffect. The selection logic requires additional rendering which has an impact on performance, so I kept it out of the standard bloom solution.
The disadvantage in performance comes from the fact that all objects in the scene need to be rendered again: non-selected objects are rendered solid black to properly occlude selected objects and the scene background.
The OutlineEffect has the same fundamental problem. A while ago, I managed to remove the additional rendering step from the GodRaysEffect by relying on depth, but that was only possible because the light source could be treated as a special object and the same method can't be applied to either the OutlineEffect or the SelectiveBloomEffect.
If you have any questions or ideas, lmk.

Awesome! Will give it a try. Thank you @vanruesc


fix html5-deployer build issue

Fixes #16

LGTM, thank you very much for your contribution Gregor!


Error while training and testing

Hi, thanks for this open source repo. I am trying to execute the commands given in the README. I am receiving the following error. Any help would be appricated.
(py36torch) E:\transformer-slt>python  train.py -data data/dgs -save_model model -keep_checkpoint 1 -layers 2 -rnn_size 512 -word_vec_size 512 -transformer_ff 2048 -heads 8  -encoder_type transformer -decoder_type transformer -position_encoding -max_generator_batches 2 -dropout 0.1 -early_stopping 3 -early_stopping_criteria accuracy ppl -batch_size 2048 -accum_count 3 -batch_type tokens -normalization tokens -optim adam -adam_beta2 0.998 -decay_method noam -warmup_steps 3000 -learning_rate 0.5 -max_grad_norm 0 -param_init 0  -param_init_glorot -label_smoothing 0.1 -valid_steps 100 -save_checkpoint_steps 100 -world_size 1 -gpu_ranks 0
Traceback (most recent call last):
  File "train.py", line 6, in <module>
    main()
  File "E:\transformer-slt\onmt\bin\train.py", line 204, in main
    train(opt)
  File "E:\transformer-slt\onmt\bin\train.py", line 35, in train
    vocab = torch.load(opt.data + '.vocab.pt')
  File "E:\Envs\py36torch\lib\site-packages\torch\serialization.py", line 584, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "E:\Envs\py36torch\lib\site-packages\torch\serialization.py", line 234, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "E:\Envs\py36torch\lib\site-packages\torch\serialization.py", line 215, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'data/dgs.vocab.pt'

When i execute the testing command i am getting the following error:
(py36torch) E:\transformer-slt>python translate.py -model model [model2 model3 ...] -src data/phoenix2014T.test.gloss -output pred.txt -gpu 0 -replace_unk -beam_size 4
Traceback (most recent call last):
  File "translate.py", line 6, in <module>
    main()
  File "E:\transformer-slt\onmt\bin\translate.py", line 48, in main
    translate(opt)
  File "E:\transformer-slt\onmt\bin\translate.py", line 18, in translate
    translator = build_translator(opt, report_score=True)
  File "E:\transformer-slt\onmt\translate\translator.py", line 28, in build_translator
    fields, model, model_opt = load_test_model(opt)
  File "E:\transformer-slt\onmt\decoders\ensemble.py", line 130, in load_test_model
    onmt.model_builder.load_test_model(opt, model_path=model_path)
  File "E:\transformer-slt\onmt\model_builder.py", line 96, in load_test_model
    map_location=lambda storage, loc: storage)
  File "E:\Envs\py36torch\lib\site-packages\torch\serialization.py", line 584, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "E:\Envs\py36torch\lib\site-packages\torch\serialization.py", line 234, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "E:\Envs\py36torch\lib\site-packages\torch\serialization.py", line 215, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'model'

Please suggest the solution

I missed the pre-processing step.


Sample to handle user interruptions missing ?

I see it in the documentation , has it been removed ? if yes will it be added again ?
edit ; clicking the link in the documentation takes us to the core bot sample .

@vyomanaut That is the correct sample for handling user interruptions. Specifically, the CancelAndHelpDialog:

C#
Node
TypeScript


common-* files lack ordering

The common-pamd.erb template doesn't provide a good way to intentionally order statements.  I'm thinking of either trying to swap the current method for an array, or some sort of manual ordering with written weights.  Wanted to reach out and see what others thought before embarking.

The auth recipe has been removed from this cookbook. Closing this out now.


[Monitor Query] Add batch metrics query integration

This introduces a new client for querying resources in batches. Based on archboard feedback, this will currently be a separate client since this uses a separate data-plane API as opposed to the ARM API that the MetricsQueryClient uses.
Modifications

Introduce MetricsBatchQueryClient for sync/async.
Add new swagger file section for client generation.
Regenerate code with latest autorest
Update README and add samples
Add tests and re-record

Fixes https://github.com/Azure/azure-sdk-for-python/issues/29092

API change check
API changes are not detected in this pull request.

/azp run python - monitor - tests


Compiling to the root directory instead of public

I am running a Laravel instance in an environment where OpenBaseDir is enabled such that PHP execution cannot traverse up from the index.php script. As such, the Laravel installation has been modified to move the public directory into the root and operate from there, with some additional server-level permissions to prevent web-access outside the index.php file and a dist directory.
Yes, it's better to use the public directory as intended; yes, there are security concerns in not doing it that way; no, I can't do it that way due to environment restrictions.
Previously using laravel-elixir, I was able to specify the output directories to dist/js and dist/css; however, when I try the same thing with laravel-mix, it creates the public directory and puts a new dist directory under that with the js and css directories.
Is there a way in laravel-mix to have the output in a folder off the root, rather than being forced to use public? Below are samples of what used to work correctly in elixr vs what does not work in mix.
elixr
elixir(mix => {
    mix.sass(['app.scss'], 'dist/css/app.css')
       .webpack(['app.js'], 'dist/js/app.js');
});

Output:
dist/js/app.js
dist/css/app.css
index.php

mix
mix.js('resources/assets/js/app.js', 'dist/js')
    .sass('resources/assets/sass/app.scss', 'dist/css');

Output:
public/dist/js/app.js
public/dist/css/app.css
public/mix-manifest.json
index.php

Nevermind, found this: mix.setPublicPath('dist/');


Datepicker Adapter not working as expected.

Bug, feature request, or proposal:
Bug
What is the expected behavior?
Datepicker should use the LOCALE_ID or the NativeDateAdapter.
What is the current behavior?
Datepicker input has the correct date format though Calendar doesn't display and it works only if the user writes manually a US formatted date. Same with validators, if the user type a different than US format it returns error.
What are the steps to reproduce?
I have this MaterialModule in my app:
const APP_DATE_FORMATS = {
  parse: {
      dateInput: {month: 'short', year: 'numeric', day: 'numeric'}
  },
  display: {
      dateInput: 'input',
      monthYearLabel: {year: 'numeric', month: 'short'},
      dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},
      monthYearA11yLabel: {year: 'numeric', month: 'long'},
  }
};

export class AppDateAdapter extends NativeDateAdapter {

  parse(value: any): Date | null {
    if ((typeof value === 'string') && (value.indexOf('-') > -1)) {
      const str = value.split('-');
      const dayArray = str[2].split('T');

      const year = Number(str[0]);
      const month = Number(str[1]) - 1;
      const day = Number(dayArray[0]);

      return new Date(year, month, day);
    }
    const timestamp = typeof value === 'number' ? value : Date.parse(value);
    return isNaN(timestamp) ? null : new Date(timestamp);
  }

  format(date: Date, displayFormat: Object): string {

    if (displayFormat === 'input') {
      const day = date.getDate();
      const month = date.getMonth() + 1;
      const year = date.getFullYear();
      return `${day}-${month}-${year}`;
    } else {
      return date.toDateString();
    }
  }
}

@NgModule({
  exports: [
    MdModules,
  ],
  declarations: [],
  entryComponents: [
    PersonalDataDialogComponent
  ],
  providers: [
    { provide: DateAdapter, useClass: AppDateAdapter },
    { provide: MD_DATE_FORMATS, useValue: APP_DATE_FORMATS }

  ]
})
export class MaterialModule {
  constructor(private dateAdapter: DateAdapter<Date>) {
    dateAdapter.setLocale('nl-NL');
  }
}

I'm getting this on the input:

As you see above correct input but calendar doesn't work.
If the user try manually field is getting an error:

But if I enter US format:

Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.3.3
Material beta.8

I implemented a similar approach for non American style dates and have similar behavior with an added quirk:
The user enters 12-2-2017 being the 12th of Feb, the value returns correctly from the picker, however the visual acts odd, when clicking on the picker shows the month instead of the day, in my case December instead of Feb.
A simple format selector built into it would be GREAT.

Here you can find a working example (DateAdapter) from @julianobrasil and the info about the planned solution  https://github.com/angular/material2/issues/6263#issuecomment-320211085

@ghd8 it doesn't work on plnkr and if I add it in my project (I saw it already) it has exactly the same behavior. :/

@vapits, have you called this.dateAdapter.setLocale('pt-br'); as I did in the plunk? It needs to be called once anywhere in the project (since the date adapter is a singleton). Or, even better, setup your LOCALE_ID. I've changed the plunk a little bit to show this possibility (look in the main.ts): https://plnkr.co/edit/jc4Ywu?p=preview

Yes @julianobrasil and I have exactly the same behavior.

@vapits, in the example you've posted above, you're not showing the parser function... it's the main part of all the process... do you have one in your real code?

@julianobrasil just edited my code.
I'm getting a value like: 2017-07-28T06:33:45.206Z which I want just to format like dd-MM-yyyy. It seems that it works only for the first display on the input only but actually manually the inputs waits for US style and same on Calendar.

Modify my plunk and post it here with your date adapter. It's easier to see what's happening.

The plnkr doesn't work for me on plnkr website it fails to load the packages :S

ok... try to add this code to your date adapter:
parse(value: any): Date | null {
    if ((typeof value === 'string') && (value.indexOf('/') > -1)) {
      const str = value.split('-');

      const year = Number(str[2]);
      const month = Number(str[1]) - 1;
      const date = Number(str[0]);

      return new Date(year, month, date);
    }
    const timestamp = typeof value === 'number' ? value : Date.parse(value);
    return isNaN(timestamp) ? null : new Date(timestamp);
  }

I did. I'm getting the calendar work but the parsed date is in wrong format:

It doesn't respect it when I change it to dd-MM-yyyy

oh, my bad... the right function is:
parse(value: any): Date | null {
    if ((typeof value === 'string') && (value.indexOf('-') > -1)) {
      const str = value.split('-');

      const year = Number(str[2]);
      const month = Number(str[1]) - 1;
      const date = Number(str[0]);

      return new Date(year, month, date);
    }
    const timestamp = typeof value === 'number' ? value : Date.parse(value);
    return isNaN(timestamp) ? null : new Date(timestamp);
  }

@julianobrasil  there are not changes on this function and mine.

Yes, there ara changes: I've changed value.indexOf('\') to value.indexOf('-') in the if statement.

@julianobrasil Yes I already had fixed this :P :) Still I'm getting the screen shot above :/

Ah sorry. The function is the same. But I have the APP_DATE__FORMATS.
So if I have in them:
display: {
      dateInput: 'input',
      monthYearLabel: {year: 'numeric', month: 'short'},
      dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},
      monthYearA11yLabel: {year: 'numeric', month: 'long'},
  }

Then I have the same issue. Correct initial value but calendar and input (manual) waits for US input.

No matter what I do, it always works in the plunk :smiley: . I try using your code as it is (with de MD_DATE_FORMATS). At least how I imagine it is... Is in this plunk: https://plnkr.co/edit/rxzhhl?p=preview

Can you try dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'},

@ghd8 I tried that already no change :/
@julianobrasil where do you set the providers in your plnkr? And where are the APP_DATE_FORMATS.
I'm copying the code exactly as yours and it doesn't work. Also try to use a date like the one I mention above as source: 2017-07-28T06:33:45.206Z and convert it to dd-MM-yyyy. It doesn't respect it. Only on the initial show.

@vapits, I'm not messing with the APP_DATE_FORMATS. I've just did it in this plunk to leave it similar to your code.
But I think, from your last post, didn't get it. If you want to enter 2017-07-28T06:33:45.206Z (typing in the input, right?) you have to do almost nothing, but change the parse function to do something like new Date('2017-07-28T06:33:45.206Z'), or whatever date comes in from the args. Man, try to make the plunker to work.
And lets move this discussion to stackoverflow.com. There's way too many messages than recommended  by the moderators and it really seems to be a misconfiguration of something instead of a bug.
Create a post in stackoverflow.com and post the link here.

@julianobrasil Here it is, I managed to replicate it to a new plnkr:
https://plnkr.co/edit/blxY8zEbScGPLVCTLMNw?p=preview

The problem is that your format function is sometimes generating the date in dd-mm-yyyy and sometimes in 'yyyy-MM-ddThh:mm:ss.mmmZ' (when building the calendar). You have to improve the parse function to test in which format the date is (if there's no '-', it's probably in the latter format).

Correcting: if there's no ':', it's probably in dd-MM-yyyy format.

@julianobrasil I guess yes for the parse as you type, sure.
Though the calendar issue is still there and the selected date as well :/

Take a look: https://plnkr.co/edit/CZi6mI?p=preview

@julianobrasil Oh..... thx. Seems only that there is still an issue with the selected date:
This is on input (by calendar or when I add it manually):

And this is in my scope:

Also it seems that now that this:
15-

Is considered a valid date and the validator doesn't fireup an error. So someone can save this for a date...

@vapits, sorry for the wrong code on my last plunk. I had to leave our work (becouse I'm in a rush in the last days releasing a new project), but I've corrected the code now (not the part of the validation): https://plnkr.co/edit/CZi6mI?p=preview
Concerning the validation part, I'm almost sure (didn't have time to test it), that you have to override the isValid(date:Date) => boolean function, which is currently:
  isValid(date: Date) {
    return !isNaN(date.getTime());
  }

I did something in that direction in the plunk, but it needs improvments. You can check that and work upon it to enforce the date format typed in in correct.

Or... I bet you can do something using the parse function like setting a wrong date object when the typed date is in wrong format (like returning null instead of a Date object). It would force the validation function to return false.
I did something in that direction  in the plunk, but it needs improvments. You can check that and work upon it to enforce the date format typed in in correct.

@julianobrasil Yes you are on the right track. So Date.parse considers those to be valid dates and returns valid Date objects for them. In order to make it consider those invalid you would need to check for those cases and then return something that isValid will classify as an invalid date. I recommend doing this by just changing the parse function and leaving isValid alone, like this:
parse(value: any) {
  if (/* Check for strings I consider invalid */) {
    return new Date(NaN);
  }
  // continue constructing Date
}

Also I just wanted to say thank you for all of your help responding to datepicker issues :) I really appreciate it

Can I load year view format. I do not want to load day. Please help me out in Angular 4.Thanks in advance.


Incorrect export of escaped quotation marks

When changing contents of a cell by "Edit cell" --> "Transform" with a string including quotation mark it needs to be escaped, i.e. """. This looks ok inside OpenRefine. But when exporting TSV all the " are replaced not by " but by "". Expected behavior is " to be replaced by ".
Operating system is Windows. OpenRefine Version 3.7.4 [05e9de9]

Thanks for reporting! This seems to be a duplicate of https://github.com/OpenRefine/OpenRefine/issues/2071. Have you tried 3.8-beta1? This issue should be fixed in that version.

Closing as duplicate of #2071 per the above, let me know if it actually isn't.


add missed argument for call stage pipeline job

fix issue like below
 2023-10-09T21:35:59Z: INFO: job id is not set, will trigger stage testing
2023-10-09T21:36:00Z: ERROR: trigger stage testing failed
Traceback (most recent call last):
  File "/home/cloud-user/release-tests/oar/cli/cmd_stage_testing.py", line 44, in stage_testing
    build_url = jh.call_stage_job()
                ^^^^^^^^^^^^^^^^^^^
  File "/home/cloud-user/release-tests/oar/core/jenkins_helper.py", line 31, in call_stage_job
    build_url = self.call_build_job(JENKINS_JOB_STAGE_PIPELINE)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: JenkinsHelper.call_build_job() missing 1 required positional argument: 'pull_spec'

with the fix
 $ oar -r 4.13.15 stage-testing
^@^@^@^@^@^@^@^@^@^@2023-10-10T10:09:46Z: INFO: job id is not set, will trigger stage testing
2023-10-10T10:09:52Z: INFO: triggered stage pipeline job: <https://mastern-jenkins-csb-openshift-qe.apps.ocp-c1.prod.psi.redhat.com/job/zstreams/job/Stage-Pipeline/850/>
2023-10-10T10:09:54Z: INFO: sent slack message to <#team-qe-release>
2023-10-10T10:09:55Z: INFO: task [Stage testing] status is changed to [In Progress]

/assign @wewang58 @ming1013

/lgtm

/approve

/test images

/test images

/test images

/test images

/retitle OCPQE-17473 add missed argument for call stage pipeline job


Created landing page

 (0) PR Created landing page

 (0) PR Created landing page

 [E1.4] As a user I want to be shown an informational landing page when I visit the site so that I can see if I like the hospital. [1]

 [E1.4] As a user I want to be shown an informational landing page when I visit the site so that I can see if I like the hospital. [1]

 PR Created landing page

 PR Created landing page


[Serialization] Use effective language version for "module too old".

People were getting confused when it said "module compiled with Swift 3.1 cannot be imported into Swift 4.0" when they were passing "-swift-version 3".
rdar://problem/32187112

cc @kubamracek
@swift-ci Please smoke test and merge


07/26/2018 01:58 : Create Pull Request for branch master -> prTesting1_2018072601

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestRef1.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.