Add add-tag-to-commits feature

Note: For some reason, the API returns empty data on some tags
Closes #807

Note: For some reason, the API returns empty data on some tags

The API only returns the Tag type on annotated tags and not lightweight ones for example: https://github.com/sindresorhus/refined-github/commit/123425df7037f6453122930f7e6146b0ae70a4dc, and from what I've can tell you can't retrieve the tag name for the Github API.

The API only returns the Tag type on annotated tags and not lightweight ones

This works: https://stackoverflow.com/a/53923870/288906

Compared to the query in this PR:

I hate the concept of pages because there is no way to guarantee you get the same response in each request. Therefore caching based on pages would also be problematic, they would have to be very short-lived because the first page will always change anytime a new tag is created, otherwise the feature will become unreliable. Heres what I think:

Keep all the commits and their tags in a single object for each repo, being kept in the cache for a longer amount of time.

commitsOnPage = select.all()
let tags = cache.get()
while (not all commitsOnPage in tags) {
	tags = tags + getMoreTags()
}
cache.set(tags)
for (commit of commitsOnPage) {
	// add tags[commit] to page
}

Cons:

If another tag is added to commit, it may not show for a while

Keep a different cache item for each commit, and only fetch the remaining commits:

commitsOnPage = select.all()
for (commit of commitsOnPage) {
	tag = cache.get(commit) // if the commit was found while fetching the previous commit it will be in the cache now
	if (!tag) {
      tag = getTagForCommit(commit)
    }
    // add tag to page
}
function getTagForCommit(commit) {
	const tags = {};
	while (!commitFound) {
		tags = {...tags, apiCall()}
        for (tag of tags) {
        	cache.set(tag)
		}
        if (tags[commit]) {
        	return tags[commit]
        }
	}
	return []
}

The cache would not be per page, but per commit. That doesn’t change. For every fetched page, you can extend the cache.
However… I just realized that neither of our solutions actually limits the pages fetched because both keep fetching pages until all commits on the page are tagged… which is wrong. Not all commits will have a tag so the code will always fetch all pages looking for a match.
I guess this search would have to be even smarter and complicated because the search has to stop when it finds a tag that is on a commit older than what’s on the page.
🤷♂

Unless you have a better idea, let’s keep it easy for now:

Fetch pages until the fetched page has some overlap with the cache.

The cache should already have all the tags, except the very latest. When you fetch a page with tag already in the cache (i.e. overlap), it can stop fetching more pages.

We can get the timestamp from tag/commit and also ask for the time of the last commit on the page:
{
  repository(owner: "sindresorhus", name: "refined-github") {
    refs(first: 100, refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {
      pageInfo {
        hasNextPage
        endCursor
      }
      nodes {
        name
        target {
          commitResourcePath
          ... on Tag {
            tagger {
              date
            }
          }
          ... on Commit {
            committedDate
          }
        }
      }
    }
    object(expression: "9b2acbbc0023c5df62c55b2595febd8277d652eb") {
      ... on Commit {
        committedDate
      }
    }
  }
}

If the date of the last commit is younger than the last tag then stop looking for tags?

I didn’t think about the date, that works too. However I’m trying to find the least complex solution and maybe having to keep track of dates as well might be more complicated than the last solution I proposed.
Thoughts?

I'll try both and see which one works better.

@bfred-it Since we are keeping each commit as a separate cache entry, it would be nice to have a cache function to get/set multiple at the same time:
cache.getAll([...commits])

Maybe convert our current API to mimic the native one while still adding expiration

Found a possible problem in your solution, using nodejs/node as a test page, using the cache overlap solution you still will fetch all the pages. Comparing dates you will only fetch the first one.

Good point, my solution will fetch all the pages at first to fill the cache, dates can allow us to be more selective.

Both of them also share a problem but I don't know how major they will be: If we stumble upon a commit not in the cache, no matter what "page" the commit appears on, we will still have to fetch all pages leading up to that page. This should be minor unless you go back a few pages in the UI (I don't know why you would do this though.)

Hmmm no, because as I suggested here we stop as soon as there's any overlap, we don't look for every commit.

Also, if there are two tags on the same commit separated by a page, there is a chance that only one of these tags will appear.

My later solution fetches all the tags at first, it doesn't have this problem.
A date-based solution would not suffer this problem either, unless this commit is the last on the current page (github.com) as well as the last tag on the current tag page (api). It's a rare occurrence, I'd say, especially considering how rarely a commit has multiple tags.

@bfred-it Since we are keeping each commit as a separate cache entry, it would be nice to have a cache function to get/set multiple at the same time:

The cache should be grouped by repo:
cache.set('tags:sindresorhus/refined-github', {
	'eb9feb9': ['v1'],
	'a0ce6e6': ['v2', v2-beta]
});

Okay so we're back to the two different solutions

[ ] fetch all the tags on the first run

large upfront cost

[ ] fetch based on the dates

large cost down the road if you wander too far back into the past

Dates sound good, if the resulting code isn't too complex. Do you think you'll also have to store the commit date in the cache for this to work?
cache.set('tags:sindresorhus/refined-github', {
	'eb9feb9': {tags: ['v1'], date},
	'a0ce6e6': {tags: ['v2', 'v2-beta'], date}
});

I have it working without storing the dates, but I also store when a commit has no tags:
cache.set('tags:sindresorhus/refined-github', {
	'eb9feb9': ['v1'],
	'a0ce6e6': ['v2', 'v2-beta'],
    'cc2c967': []
});

I also store when a commit has no tags:

I thought about that, but wouldn't that get too heavy? Some repos have maaany commits.

I also store when a commit has no tags

I did this to avoid an API call if every commit is cached, the same effect can be achieved other ways I believe.

I thought about that, but wouldn't that get too heavy? Some repos have maaany commits.

Yeah storing it in a single key would make it a little heavy, since when you add a key to it, it will basically never get expired.
That's why I assumed we would keep a different key for each commit that way you can expire the commits that you no longer see.

Let's see it, if you already wrote it

I did 😃, cleaning up lint things

@dotconnor Can you fix the merge conflict?

Thanks for working on this, @dotconnor 👌

This is pretty useful even to Refined GitHub, when looking at the commit log:


Delegate hasStableIds to wrapped adapter

What does this change?
RecyclerView behavior can change based on hasStableIds, it's better to delegate hasStableIds to the wrapped adapter.
Noticed that hasStableIds is final, so we cannot completely delegate the behavior to the wrapped adapter.
What is the value of this and can you measure success?
hasStableIds works properply
Screenshots
No

@lcdsmao Goog job.

Shipped https://bintray.com/wasabeef/maven/recyclerview-animators/4.0.1


fixed typescript checker output errors live update

fixed overlay and terminal show error count not same as tsc message display errors count of typescript checker until all ts errors resovled.

Sorry for the late response, could you provide a description of how to reproduce the issue the PR fixes?

Sorry for the late response, could you provide a description of how to reproduce the issue the PR fixes?

Its been a long time.
The problem of repair occurs in my project, and the probably manifested as:
I created two errors in the TypeScript code. I fixed one of them. Now there is only one left (as the terminals in the screenshot are displayed), but in the error prompt Dialog, I will not delete the error I have solved. Essence
After submitting PR before, I have been using NPM Patch to make my code take effect. It has been used for 5 months, and it works well.

Yeah, could you describe how to reproduce the duplicated error shown with minimal reproduction? If so, maybe we could check the root cause of this issue instead of prevent it from showing to userland.

Yeah, could you describe how to reproduce the duplicated error shown with minimal reproduction? If so, maybe we could check the root cause of this issue instead of prevent it from showing to userland.

It's not prevent it from showing to userland, but when the multiple errors has been resolved, dialog will keep the resolved errors in dialog,until all the errors have been fixed.
I can't reproduce the mistakes on my new machIt may be related to computer performance.maybe ignore this PR.
The previous reproduction code:
step.1
const a = "";
a = 1; // first error
b = ""; // second error

dialog show two errors.
step.2
then dialog will show two errors.we fix first error:
const a = "";
b = ""; // second error still keep

then dialog will keep step 1 error in dialog,until all errors been resolved


Can't see plugin in ArgoCD after sidecar installation

Describe the bug
After installation plugin with sidecar method I can't use it in ArgoCD.
To Reproduce
ArgoCD installed from helm chart:
repoServer:
  volumes:
    - name: custom-tools
      emptyDir: {}
    - configMap:
        name: cmp-plugin
      name: cmp-plugin
  initContainers:
    - name: download-tools
      image: registry.access.redhat.com/ubi8
      env:
        - name: AVP_VERSION
          value: 1.13.0
      command: [sh, -c]
      args:
        - >-
          curl -s -L https://github.com/argoproj-labs/argocd-vault-plugin/releases/download/v$(AVP_VERSION)/argocd-vault-plugin_$(AVP_VERSION)_linux_amd64 -o argocd-vault-plugin &&
          chmod +x argocd-vault-plugin &&
          mkdir -p /custom-tools/ &&
          mv argocd-vault-plugin /custom-tools/ &&
          ls -lha /custom-tools/ && echo OK
      volumeMounts:
        - mountPath: /custom-tools
          name: custom-tools
  extraContainers:
  - name: avp
    command: [/var/run/argocd/argocd-cmp-server]
    image: registry.access.redhat.com/ubi8
    env:
    - name: AVP_TYPE
      value: awssecretsmanager
    - name: AWS_REGION
      value: us-east-2
    securityContext:
      runAsNonRoot: true
      runAsUser: 999
    volumeMounts:
      - mountPath: /var/run/argocd
        name: var-files
      - mountPath: /home/argocd/cmp-server/plugins
        name: plugins
      # Register plugins into sidecar
      - mountPath: /home/argocd/cmp-server/config/plugin.yaml
        subPath: avp.yaml
        name: cmp-plugin
      # Important: Mount tools into $PATH
      - name: custom-tools
        subPath: argocd-vault-plugin
        mountPath: /usr/local/bin/argocd-vault-plugin

extraObjects:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: cmp-plugin
    data:
      avp.yaml: |
        apiVersion: argoproj.io/v1alpha1
        kind: ConfigManagementPlugin
        metadata:
          name: argocd-vault-plugin
        spec:
          allowConcurrency: true
          discover:
            find:
              command:
                - find
                - "."
                - -name
                - Chart.yaml
          generate:
            command:
              - sh
              - "-c"
              - |
                helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE ${ARGOCD_ENV_helm_args} . | argocd-vault-plugin generate -
          lockRepo: false
        ---

Expected behavior
I expect to see the plugin working correctly
Screenshots/Verbose output

This is expected behavior
https://github.com/argoproj-labs/argocd-vault-plugin/issues/378#issuecomment-1226927862
https://github.com/argoproj-labs/argocd-vault-plugin/issues/385#issuecomment-1226115441


docs: ability to override object mapper used for logging event

Issue #, if available:
Description of changes:
Doc updates for https://github.com/awslabs/aws-lambda-powertools-java/pull/302
Checklist

[x] Meet tenets criteria
[ ] Update tests
[x] Update docs
[x] PR title follows conventional commit semantics

Breaking change checklist

RFC issue #:

[ ] Migration process documented
[ ] Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This needs to wait until docs build issue is fixed or docs ecosystem is migrated

Getting all the docs changes inn before starting to migrate docs


You can't control a mob you just ghosted out of

Description

Ghost
Try to right click > debug > control mob > confirm the mob that you just ghosted out of
You cannot

You can return to body though
Applies to setmind as well

Fixed after https://github.com/space-wizards/space-station-14/pull/20614


Fix frame injection in the dispatcher tracing path.

As title.

The segfault coming from CPython is from here https://github.com/python/cpython/blob/ede0b6fae20290bf22b6ee1b9a1e1179d750f360/Objects/frameobject.c#L845, values[j] is NULL. It in turn is called here: https://github.com/python/cpython/blob/ede0b6fae20290bf22b6ee1b9a1e1179d750f360/Objects/frameobject.c#L963-L965, switching off the CO_OPTIMIZED temporarily avoids that branch. This patch basically avoids the problem as this branch is not taken, but is probably invalid as an approach.
The twiddling of the CO_OPTIMIZED flag can actually be done either size of the call to PyFrame_LocalsToFast with the same effect. More investigation needed.

Needed to profile a program (w/o jit'ed code on the critical path). cProfiler was still crashing with the patch above applied. The following worked for me. However, i must admit I don't really know what I am doing here and cannot say if the timings for the jit'ed functions still make sense.
@@ -325,17 +326,17 @@ call_cfunc(DispatcherObject *self, PyObject *cfunc, PyObject *args, PyObject *kw
         if (PyDict_SetItemString(globals, "__builtins__", builtins)) {
             goto error;
         }
-        frame = PyFrame_New(tstate, code, globals, NULL);
+
+        frame = PyFrame_New(tstate, code, globals, locals);
         if (frame == NULL) {
             goto error;
         }
         /* Populate the 'fast locals' in `frame` */
-        Py_XDECREF(frame->f_locals);
-        frame->f_locals = locals;
-        Py_XINCREF(frame->f_locals);
         PyFrame_LocalsToFast(frame, 0);
         tstate->frame = frame;
         C_TRACE(result, fn(PyCFunction_GET_SELF(cfunc), args, kws));
+        /* write changes back to locals? */
+        PyFrame_FastToLocals(frame);
         tstate->frame = frame->f_back;

     error:
@@ -504,8 +505,12 @@ Dispatcher_call(DispatcherObject *self, PyObject *args, PyObject *kws)
     PyObject *cfunc;
     PyThreadState *ts = PyThreadState_Get();
     PyObject *locals = NULL;
-    if (ts->use_tracing && ts->c_profilefunc)
+    if (ts->use_tracing && ts->c_profilefunc) {
         locals = PyEval_GetLocals();
+        if (locals == NULL) {
+            goto CLEANUP;
+        }
+    }
     if (self->fold_args) {
         if (find_named_args(self, &args, &kws))
             return NULL;

Closing #4476 fixed.


Add imports to terraform plan result

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #4401
Does this PR introduce a user-facing change?:
Support Terraform v1.5.0 and later which introduces import feature

@kentakozuka PTAL when you have time 🙏


Is this available for Ubuntu?

Is this available for Ubuntu?

We do not support running of the Navi agent on Ubuntu. We support instead running of the Windows KVM on the Docker from a Ubuntu host.

ok then . if possible please support Ubuntu because here in our company we have 1000 computers running Ubuntu 22.04


add support for opa configure with tls authentication

Fixes Issue
Closes #456

Changes proposed
Add environment variables:

POLICY_STORE_TLS_CLIENT_CERT: the certificate of the client
POLICY_STORE_TLS_CLIENT_KEY: the private key of the client
POLICY_STORE_TLS_CA: the ca (and any intermediate) to verify the certificates

Use new mtls context if all above environment variables been configured to communicate with opa.
Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] My change requires changes to the documentation.
[ ] I have updated the documentation accordingly.
[x] All new and existing tests passed.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers
~Draft PR for now; will add unit test coverage and method to test before finalizing PR~
Testing:
Generate certificates following OPA documentation:
https://www.openpolicyagent.org/docs/latest/security/#tls-based-authentication-example

mkdir certs && cd certs

# CA
openssl ecparam -out ca-key.pem -name prime256v1 -genkey
openssl req -x509 -new -nodes -key ca-key.pem -days 30 -out ca.pem -subj "/CN=my-ca"

# Client (opal-client)
cat <<EOF >req.cnf
[req]
req_extensions = v3_req
distinguished_name = req_distinguished_name

[req_distinguished_name]

[v3_req]
basicConstraints = CA:FALSE
subjectAltName = @alt_names

[alt_names]
URI.1 = spiffe://example.com/client-1
EOF

openssl ecparam -out client-key-1.pem -name prime256v1 -genkey
openssl req -new -key client-key-1.pem -out csr.pem -subj "/CN=client-1" -config req.cnf
openssl x509 -req -in csr.pem -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out client-cert-1.pem -days 10 -extensions v3_req -extfile req.cnf -sha256

# Client (external not-in-acl)
cat <<EOF >req.cnf
[req]
req_extensions = v3_req
distinguished_name = req_distinguished_name

[req_distinguished_name]

[v3_req]
basicConstraints = CA:FALSE
subjectAltName = @alt_names

[alt_names]
URI.1 = spiffe://example.com/client-2
EOF

openssl ecparam -out client-key-2.pem -name prime256v1 -genkey
openssl req -new -key client-key-2.pem -out csr.pem -subj "/CN=client-2" -config req.cnf
openssl x509 -req -in csr.pem -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out client-cert-2.pem -days 10 -extensions v3_req -extfile req.cnf -sha256

# Server (opa)
cat <<EOF >req.cnf
[req]
req_extensions = v3_req
distinguished_name = req_distinguished_name

[req_distinguished_name]

[v3_req]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names

[alt_names]
DNS.1 = opa.example.com
IP.1 = <IP_ADDRESS>
URI.1 = spiffe://example.com/server
EOF

openssl ecparam -out server-key.pem -name prime256v1 -genkey
openssl req -new -key server-key.pem -out csr.pem -subj "/CN=server" -config req.cnf
openssl x509 -req -in csr.pem -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem -days 10 -extensions v3_req -extfile req.cnf -sha256

cd .. && mkdir startup-data && cd startup-data
cat <<EOF >auth.rego
package system.authz

import future.keywords.if
import future.keywords.in

id_uri := input.client_certificates[0].URIs[0]
id_string := sprintf("%s://%s%s", [id_uri.Scheme, id_uri.Host, id_uri.Path])

clients := [
  "spiffe://example.com/client-1"
]

default allow := {"allowed": false, "reason": "Access denied"}

allow := { "allowed": true } if {
  id_string in clients
} else := {
  "allowed": false,
  "reason": "Access denied"
}
EOF

Start opal-server
docker run -d -e "OPAL_LOG_LEVEL=DEBUG" -e "OPAL_POLICY_REPO_URL=https://github.com/permitio/opal-example-policy-repo.git"  -p 7002:7002 permitio/opal-server

Build opal from branch source and start opal-client:
docker run -it -e "OPAL_SERVER_URL=http://<opal-server-ip>:7002" -e 'OPAL_INLINE_OPA_CONFIG={"authorization":"basic","authentication":"tls","files":["/opt/opa/startup-data/auth.rego"],"tls_ca_cert_file":"/opt/opa/certs/ca.pem","tls_cert_file":"/opt/opa/certs/server-cert.pem","tls_private_key_file":"/opt/opa/certs/server-key.pem"}' -e "OPAL_POLICY_STORE_TLS_CA=/opt/opa/certs/ca.pem" -e "OPAL_POLICY_STORE_TLS_CLIENT_CERT=/opt/opa/certs/client-cert-1.pem" -e "OPAL_POLICY_STORE_TLS_CLIENT_KEY=/opt/opa/certs/client-key-1.pem" -e "OPAL_POLICY_STORE_AUTH_TYPE=tls" -e "OPAL_POLICY_STORE_URL=https://<IP_ADDRESS>:8181" -p 7000:7000 -p 8181:8181 -v $(pwd)/certs:/opt/opa/certs -v $(pwd)/startup-data/:/opt/opa/startup-data permitio/opal-client

Verify mutual tls requirement
# Verify https requirement
curl http://<IP_ADDRESS>:8181/v1/policies

# Verify client certificate requirement
curl --ca certs/ca.pem http://<IP_ADDRESS>:8181/v1/policies

# Verify not working with client certificate not in acl (should return Access Denied message from rego)
curl --cert client-cert-2.pem --key client-key-2.pem  --cacert ca.pem -vvvvv https://<IP_ADDRESS>:8181/v1/policies

# Verify working communication using client cert and key (fetches policies put there by opal-client)
curl --cert client-cert-1.pem --key client-key-1.pem  --cacert ca.pem -vvvvv https://<IP_ADDRESS>:8181/v1/policies

# Verify logs in pod opal-client

Thanks @oskar-christensson - I'll have the team review this early next week
CC: @roekatz

@orweis That pr is marked as a draft.
I took a quick view - overall looks good.
My only comment would be that there's no reason not to enable TLS even if mtls isn't configured as auth_type (we can always initialize the ssl context with the CA, even if client key isn't supplied (assuming some other auth type is configured)).
@oskar-christensson - Undraft it if it's ready, and I'll take another closer look. No reason not to merge it soon.

@roekatz cheers for the quick look! Too much stuff going on last week to finalize this but will mark it for review today.

@roekatz
I have enabled policy store tls by default if provided even without PolicyAuthType.TLS.
Added a process to follow for testing.

@oskar-christensson Sorry for the delay I was OOO indeed :)
Looks great! Thanks.
I've approved but I see that pre-commit fails. Can you please fix it before we merge?

@oskar-christensson Also not sure why tests are failing

@roekatz cheers I've adapted to the pre-commit changes now.

@oskar-christensson,  congrats on your contribution and brining it to the finish line!
Please DM @danielbass37<EMAIL_ADDRESS> here or on Slack) to get some thank you swag shipped to you.


Configure eslint rules

The ESLint Rules should define and enforce a code style during the build.
Plugins to use:

Node
Typescript
Jest

Closed at #15


Added support for WindowsAzure.Storage 7.0+ to HDInsight Jobs NuGet

Can HDInsight handle that latest storage?

Can one of the admins verify this patch?

Hi @mikeblakeuk, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

@mikeblakeuk Thanks for the contribution but there is no need to upgrade the reference to version 8.0. It is not publicly available on nuget.org yet.

Attempting to gather dependency information for package 'WindowsAzure.Storage.7.0.0' with respect to project 'MyHdiProject', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'WindowsAzure.Storage.7.0.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'WindowsAzure.Storage.7.0.0'
Resolved actions to install package 'WindowsAzure.Storage.7.0.0'
Attempting to resolve dependencies for package 'WindowsAzure.Storage.7.0.0' with DependencyBehavior 'Lowest'
Unable to resolve dependencies. 'WindowsAzure.Storage 7.0.0' is not compatible with 'Microsoft.Azure.Management.HDInsight.Job 2.0.2 constraint: WindowsAzure.Storage (>= 6.0.0 && < 7.0.0)'.
========== Finished ==========
Sorry, I added less than 8 to the nuget because 7.0.0 is GA
https://www.nuget.org/packages/WindowsAzure.Storage/
https://www.nuget.org/packages/Microsoft.Azure.Management.HDInsight.Job/


Avoid highlighting in certain situations

Hey there,
I often use print statement debugging/logging which I comment out, for example something like
# print('method ARN: {}'.format(methodArn))

This highlights ARN: unintentionally and distracts me a bit haha. It would be awesome if there was some way to avoid this, but I am not sure the best way as I'm sure many people have their own style of using these comments. Here are some thoughts on a couple ways this could be achieved.

It only matches if the first word after the comment ends with a colon.
It doesn't match words nested inside quotes.
Have an optional file to define a words whitelist and only highlight those words.

Thoughts?

Hi, I encountered a similar case myself p:
I think we could make the default highlight queries more strict, and by default just match the specified keywords, instead of everything (this is from the nvim-treesitter side).
The first option could also be interesting to apply in the grammar itself too, but that will depend on the other language grammars how they capture the comment, for example, some grammars mix the "comment character" with the comment itself.
Not sure about the third option, we will need an option at compile time, making it a little harder to add a new keyword, but maybe isn't that bad to have just a subset of keywords supported by the grammar itself, and not many users have the need for custom keywords.

https://github.com/nvim-treesitter/nvim-treesitter/pull/4298

I think we could make the default highlight queries more strict, and by default just match the specified keywords, instead of everything (this is from the nvim-treesitter side).

I think this option makes sense, that change was already merged in nvim-treesitter https://github.com/nvim-treesitter/nvim-treesitter/pull/4298.


Add support for fmsub and fnmsub instructions on x86

Issue #8602
Allows generating fmsub and fnmsub instructions as mentioned in the issue.

Sure, I'll add the runtime tests later, when I have time.

We already have some run tests that run on all arch's here (1, 2, 3). None of them test load sinking, so that would be a nice addition.

To add runtime tests for load sinking, I would just duplicate some existing testcases and add loads to them. This doesn't test that the load is actually sunk, but rather that the results are still correct with load sinking. Is that the intention? Or am I missing some different type of testcase I could write?

That is a good thing to test, but generally I was just asking for runtests that check that the new lowerings that turn multiple clif instructions into a single machine instruction produce the same values that interpreting the individual clif instructions would.
See for example
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/filetests/filetests/runtests/iabs.clif#L1-L18
although we only care about the interpreter and x86-64 here.

I added some tests, but also identified an optimization I missed. This only affects the case where the negation happens before the load. I think the order of the two shouldn't matter. I still need to look into how to write rules to handle that case.

I added some tests, but also identified an optimization I missed. This only affects the case where the negation happens before the load. I think the order of the two shouldn't matter. I still need to look into how to write rules to handle that case.

This PR is already a nice improvement even if it doesn't optimize every case, so: If you want to dig into that you're welcome to, but I'd also be happy to merge this as-is. If you decide not to fix it right now, then it would be great to open a new issue describing what's not working, and include a link to that issue in the comments on the test that illustrates the problem.
That said, this is failing in CI right now. The error looks weird to me and I'm not sure whether you just need to re-run CRANELIFT_TEST_BLESS=1 cargo test -p cranelift-tools --test filetests or if there's something stranger going on, so please let us know if you have any trouble.

CI failing was due to me annotating a copy of the expected output. I moved my comment before the testcase, which fixed that. I tried adding some rules to improve code generation for this case yesterday, but that didn't work. So I'd have to take a closer look at ISLE to see why it doesn't generate the right code. Not sure when I'll get around to that so I opened an issue describing the missed optimization like you suggested.


Have you considered to import Math(TEX, MathML...) support ?

Since markdown is widely used by developers, it's useful to support code block. While, for those who have math background, math support can be equally helpful.
I ever extended from chjj/marked to buddys/marktex, which add math block. It's troublesome to maintain a repo by myself, shall I join you ?
Here is one of my blog containing many math blocks (once a time it's powered by buddys/marktex):
http://harttle.github.io/reading/introduction-to-algorithms.html

http://talk.commonmark.org/t/mathematics-extension/457

IMHO math support is very useful feature, but it doesn't yet have final agreement about markup.
I see no technical problem to implement it via plugin. The only problem is, that markup can become incompatible, when math support lands in commonmark spec.

KaTeX - new interesting lib for TeX math rendering.
What kind of help do you need? markdown-it is specially designed for syntax extendability. One of goals was to allow plugin developers to be independent on main repo.

KaTeX is very fast, but the reason is because it implements only a subset of what mathjax can render. So if this feature happens, perhaps provide support for both, but have an option to choose the renderer. Maybe it's possible to use katex, and then fallback to mathjax for anything katex cannot handle but I presume that functionality is out of scope for this project.

I think, 2 different plugins can be better - more easy to bundle for browser. KaTeX for some reasons is almost not updated after release, and has very big tail of pending PRs :(
As far as i understant, @harttle had problem because he had to support full parser clone, but with markdown-it this problem does not exists. Block rule can be cloned from fences, inline rule can be cloned from emphasis. All with very small changes.
Anyway, this will not go to core. I'll keep this issue open for short time, if anyone has questions about implementation.

Sounds good. Definitely agree with not going in core.

Yeah, TEX block markup should be a plugin, I'll consider to implement that.
Since block rule can be cloned from fences , it sounds easy to do that. Thank you!

No problem. I'm closing this ticket, but feel free to create new one if you have some difficulties.
If you need blocks only, without inlines, and you are ok with fenced format like this:
```tex
...
``

Then only renderer patch needed, something like this.

interesting thread. Commenting to keep track of it.

Just for reference, there is a plugin that handles LaTeX math quite well: https://github.com/classeur/markdown-it-mathjax


Makartkar/torch

PyTorchInroduction module

WorkingWithTensors -  7 easy tasks to understand simple torch.Tensor operations
Autograd - working with torch automatic gradient calculation
NeuralNetwork - building simple net
WordWindowDataset - working with torch.utils.data.Dataset and torch.utils.data.DataLoader. Write custom collate_fn function for DataLoader
WordWindowClassifier - building a network for WordWindow task
WordWindowTraining - combining 2 previous tasks build a torch pipeline for WordWindow task. Working with torch.optim.Optimizer and torch.nn.BCELoss

@MakArtKar, thanks a lot, the new assignment is impressive!


Fix iOS buid

Looks like there's an iOS angle to the issue in #6414 as well which I hadn't noticed because I was accidentally building for macOS instead.

@swift-ci please smoke test


Select2 on clear does not change input element value NOR fire change event

On clearing a value (when allowClear) is true... the base select element value is not changed (shows the old value) - NOR is the change event triggered.

Must have missed this ticket, but I can't seem to reproduce the issue.

Can you expand upon the issue you are facing by adding a few more pieces of information to your bug report?

What steps can be used to reproduce the issue?
What is the bug and what is the expected outcome?
What browser(s) and Operating System have you tested with?
Does the bug happen consistently across all tested browsers?
What version of jQuery are you using? And what version of Select2?
Are you using Select2 with other plugins?

The contributing guide contains a useful section with a few questions which can help us track down the bug and speed up the process of finding a fix for it.  The creation of an isolated test case would also be useful.

Actually my mistake in describing - the change event does fire... but it does after the select2:unselect.
This was more related to issue #3320 when the select2 does not close on clearing.
Was trying to trap the value of the input after select2:unselect and not after a normal change. It shows the old value. But i need it similar to what happens after select2:select. Currently I do not have a method to do this... and need to rely on change.

Can confirm the issue, occurs at least when ajax is used. allowClear has only visual effect, form element (select) isn't changed in any way. @kartik-v  Any solution / workaround yet?
What steps can be used to reproduce the issue? allowClear in combination with ajax
What is the bug and what is the expected outcome? allowClear has no effect on form value
What browser(s) and Operating System have you tested with? Windos 8.1, Chrome 45
Does the bug happen consistently across all tested browsers? yes
What version of jQuery are you using? 2.1.4 And what version of Select2? 4.0.0
Are you using Select2 with other plugins? No

@kartik-v Had the same problem (in a complex ajax & pagination scenario) but I've just missed to add the placeholder option like

@andreasbernhard I feel the solution is that on clear the input val must be cleared and the change event must be triggered before select2:unselect.

Please continue discussion in #3320.


Getting started

From @sguptatw on December 13, 2016 6:47

[ ] As a user evaluating the tool, I should be able to try Gauge simple examples in the browser without installing Gauge on my local box.
[ ] As a Gauge user, I should be able to decide whether Gauge is the tool to use by visiting the website.
[ ] Add more Gauge API
[ ] As a Gauge user, I should be able to find content - video, text based on search input.
Copied from original issue: getgauge/documentation#73

Spiked web assembly to run Gauge in the browser. There will be significant changes to get this up and running. Won't be implementing this.


Still unable to bound multiple times the same column name in v3.3.1

References: #784 #819
Description:
I got that issue on v3.2.27 and after quick research found out that it is active from 3.2.13 and it is supposed to be fixed in the latest minor version since the code was rewritten and tested.
I have extended CRUD controller which enables AJAX tables and has two columns that are referencing the same table:
        $this->crud->addColumn([
           'label' => "Location",
           'type' => 'select',
           'name' => 'location_id',
           'entity' => 'location',
           'attribute' => 'title',
           'model' => "App\Models\Location"
        ]);

        $this->crud->addColumn([
           'label' => "Location Type",
           'type' => 'radio_location_type',
           'options' => [
               1 => "Country",
               2 => "Region"
           ],
           'name' => 'location_id',
           'entity' => 'location',
           'attribute' => 'type',
           'model' => "App\Models\Location"
        ]);

I tried version 3.2.12 and the result are the expected two columns. Every version after that (including 3.3.1) results in just one column. (I think always the second one)

I encountered the same problem，I  overwrite search function in *CrudController and  manual generate datatable json data  to solve this problem.
i use package " laravel-datatables-oracle"  to generate datatable json data.
code like this:
`
i suppose main table is user
public function search(){
$query = User::selectRaw('user.name,location.title,location.type')
->join('location','user.location_id','=','location.id');
                 return datatables()->eloquent($result)->toJson();

}
if you do like this you should set your custom list view in setup function.
$this->crud->setListView('custom_list');
`
copy origin list view to custom_list view, just in datatable config option add "columns"

@shamatov , we have a yet undocumented feature you could use. As I understand it, your problem is that you have two columns with the same name. And that name is used in the new AJAX implementation as a key to the $entries property. So only your last column shows up, because it overwrites the first. Right?
If so, you should be able to bypass this by also specifying a different key to one of your columns. Anything you want. It would only be used as a key in the resulted $entries. So for example:
        $this->crud->addColumn([
           'label' => "Location",
           'type' => 'select',
           'name' => 'location_id',
           'entity' => 'location',
           'attribute' => 'title',
           'model' => "App\Models\Location"
        ]);

        $this->crud->addColumn([
           'label' => "Location Type",
           'type' => 'radio_location_type',
           'options' => [
               1 => "Country",
               2 => "Region"
           ],
           'name' => 'location_id',
+          'key' => 'location_type',
           'entity' => 'location',
           'attribute' => 'type',
           'model' => "App\Models\Location"
        ]);

This should fix your problem, right? Can you please confirm?

i was having this same issue.. and tried this key method.. but didnt work.

Hi @tabacitu
It worked for me on v3.3.1
Thanks a lot!

@mpixelz the key method will only work on 3.3, sorry.

@shamatov glad to hear it worked out. I just modified the docs to include this hidden feature aswell.
Cheers!

It worked for me too on 3.3.3 but not with addColumns, just addColumn. In fact, addColumns has some issues when trying to display data from a related table (it treats ever member of the column definition as a column heading). Do you need a proper bug report for this or do you already have it tracked?

@tedsecretsource what do you mean by "it treats ever member of the column definition as a column heading"? Calling addColumns(['smth', 'smth_else']) should be the same as running addColumn('smth') and addColumn('smth_else'), that's what addColumns() does.
Yup, if you think you found a bug with addColumn() let's open another issue please and not polute this one. It sounds like a different bug to me.
Thanks, cheers!


Common pattern for reconnections

In several projects of mines I do something like the following, in order to handle scenario that may happen with connection errors and reconnection attempts:
    async def listen_forever(self):
        while True:
        # outer loop restarted every time the connection fails
            try:
                async with websockets.connect(self.url) as ws:
                    while True:
                    # listener loop
                        try:
                            reply = await asyncio.wait_for(ws.recv(), timeout=***)
                        except (asyncio.TimeoutError, websockets.exceptions.ConnectionClosed):
                            try:
                                pong = await ws.ping()
                                await asyncio.wait_for(pong, timeout=self.ping_timeout)
                                logger.debug('Ping OK, keeping connection alive...')
                                continue
                            except:
                                await asyncio.sleep(self.sleep_time)
                                break  # inner loop
                        # do stuff with reply object
            except socket.gaierror:
                # log something
                continue
            except ConnectionRefusedError:
                # log something else
                continue

and I was wondering whether (1) this makes sense at all, and (2) there is any shortcut already provided in websockets to what seems quite a recurrent behavior (assuming that is correct!)

any progress on this?

no progress

just saw the help wanted tag.
As I mentioned 1.5 years ago (!) I did use that piece of code in a couple of projects. I can help, but would need guidance.

What needs to do to add this feature?

For this feature, I would suggest:

first, a documentation patch describing how the feature would behave exactly;
once we agree on that, an implementation with tests.

@heckad I placed a minimal reproducible example here, to start with: https://gist.github.com/pgrandinetti/964747a9f2464e576b8c6725da12c1eb

I suggest doing like in aio_pika connect_robust method which should return RobustConnection or RobustSomethingAnyThing which will reconnect on any error by default. Another way make like in requests.

Here is my attempt to talk with websocket server
Involved async-generator
import websockets

class WebSocketRetry:

    def __init__(self, uri):
        """
        IF __INIT__ WAS CALLED DIRECTLY
        THEN GENERATOR MUST SETUP MANUALLY
        """
        self.client = self.get_websocket_connection(uri)
        self._flag_closed = False
        self._flag_inited = False

    @property
    def closed(self):
        return self._flag_closed

    @classmethod
    async def create(cls, uri):
        self = cls(uri)
        await self.client.asend(None)
        return self

    async def get_websocket_connection(self, uri):
        while not self.closed:
            try:
                print("Create New Connection...")
                async with websockets.connect(uri) as wb:
                    self._websocket = wb

                    if not self._flag_inited:
                        self._flag_inited = True
                        data = yield

                    while True:
                        await wb.send(data)
                        data = yield await wb.recv()

            except Exception as e:
                # todo
                print(e)
                data = yield

    async def send(self, data):
        if self.closed:
            return await self._websocket.recv()
        return await self.client.asend(data)

    async def close(self):
        if not self.closed:
            self._flag_closed = True
            await self._websocket.close()

Usage
In []: client = await WebSocketRetry.create("ws://localhost/echo")
Create New Connection...

In []: await client.send("hello")
Out[]: 'ECHO: hello'

In []: await client.send("hi")
Out[]: 'ECHO: hi'

In []: await client.close()

In []: await client.send("hi?")
#  ConnectionClosedError will raise

An interesting API would be:
async for ws in websockets.connect(...):
    ...

Now the question is: should it reconnect only on connection errors? on or all exceptions?
This isn't an easy question:

reconnecting on connection errors seems legitimate while swallowing all exceptions is a Gun Pointed At Feet
it seems Quite Hard to tell connection errors apart from other errors with a high degree of certainty

Also, we need exponential backoff to avoid going in a hot loop if the network or the server is down

Could the behaviour of the reconnection be a parameter passed to the connect method?
async for ws in WebSockets.connect(reconnect_policy=websokets.ALWAYS, exponential_backoff=true):
         ...```

or something similar? Just putting it out there.

Just a small remark: re-connecting, and retry connecting are different things

the former assumes a successful initial connection that was dropped (so, the configuration is correct but a connection problem occurred so let's reconnect )
the latter would be when no connection was successful, so let's keep trying to do so
IMHO, i would say that if session state (THIS_WAS_SUCCESSFUL) can be kept, then always (configurable) retry when there was an initial successful connection and always bailout if no initial connection

I think that this would translate to always retry if ConnectionClosedError and bailout in all other cases.. I'm not sure if there are cases where the session is valid but the connection was closed with ConnectionClosedOK

Hello! I have a proposal here: #983. Sorry it took me so long to figure it out.
There's a wide variety of situations where connections can fail and require reconnecting. I don't have a good way to reproduce them all.
If you have a real life use case and you're able to test this pull request, I would be very interested in your feedback.
The idea would be to run the version of websockets from #983, to replace your reconnection system by:
async for ws in websockets.connect(...):
    ...

Then you can check if the reconnection works. Errors that trigger reconnections are logged; if you see errors in the logs and the connection is still alive, you're good.
Looking forwards to your feedback. Thank you!

@adriansev: you have a good point; indeed there's a different reasoning for errors opening the connections and errors after it's open.
Here's what I ended up doing:

Errors opening the connection: retry with exponential backoff and no limit. I don't think depending on an initial successful connection is a good idea. For example, if the network or the server is momentarily down while a script starts, it makes sense to keep trying until the connection eventually works.
Errors after the connection is open: I'm logging ConnectionClosed at the debug level (because you're expecting it, else you wouldn't be reconnecting in the first place) and other exceptions at the error level.

I merged the branch but I'm still interested in feedback if you try it :-)

@aaugustin thank you for your work!! So, just to throw a disclaimer: my view is just from the point of view of the client (and a very dumb client, is a REPL interface to a server, so only one message at a time). So, my comments were from this view, and, as such, i continue to think that retrying the connection when no initial connection was done is pointless (maybe my certificate is wrong, or the wireless is disconnected so, i will wait for an answer from the server when in fact there are re-connecting tryouts in the websocket part). IMHO re-connect would be useful for cases when because of load and network a connection is dropped for very short time. So, for me, my fear is that this would convert to user reports like "i started the client, and nothing happens" as opposed to the often "error was thrown, look in the log" and in the end the problem was of certificate permission, mixed certificate and key (new with old) or other pure ssl problems that will threw errors at connection time.
So, i would say that that my use-case is really specific and unique and  my opinion does not matter on this...
The only thing that would simplify my code would be if an automatic re-connection at pong timeout and for an exception in send .. just FYI at this moment i do this: https://github.com/adriansev/jalien_py/blob/master/alienpy/alien.py#L514
But, in the end, i just thank you so much for your work! :)

Well, all depends on "is it worth it?" (in regard to discrimination of types of error and handle them differently) and the range of needs can be quite wide. but, as you say, it throws an exception so it's ok ...
About starting from scratch, well, there could be a knowledge delta in a week frame, in a year time one can be at the 3rd rewrite of the project :)))
But now that you threw the bait with the "elegant" could you please elaborate what would that mean? :)
Also, i do not re-connect on pong (as i cannot know if an underlying ping failed to receive the pong.. that would need an separate thread, or in the same thread/task as ping/pong mechanism to have an callback for re-connection), i only do a re-connection when getting an exception from send
Thank you!

By "elegant" I meant "can you do everything within a context manager" vs. having a global instance of the websockets client and reinitializing it when it fails.
The benefits are those of context managers -- generally they improve the structure of the code and give more clarity to which resource is used where.

ooh, yeah, that is excluded in my case, as in "technically impossible" : there is not possible to mix async with non-async modules/functions  .. so to solve my conundrum, actually i have a thread with the async main loop and a decorator to "un-syncify" the send/receive function (and a few other function that use directly the websocket)

OK. You need #885, then!

def run():
    try:
        asyncio.get_event_loop().run_until_complete(call_api(json.dumps(msg)))
    except Exception as e:
        print(f'WEBSOCKET CONNECTION CLOSED. RESTARTING..', e)
        time.sleep(2)
        run()

run()

Thanks @aaugustin!
For those stumbling on the broken documentation link, here's a working one:
https://websockets.readthedocs.io/en/stable/reference/asyncio/client.html#opening-a-connection
The solution is to do:
async for websocket in websockets.connect(...):
    try:
        ...
    except websockets.ConnectionClosed:
        continue


Remove intl from notes_api

Codecov Report

Merging #11 (705e96f) into master (b68124a) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            master       #11    +/-   ##
==========================================
  Coverage   100.00%   100.00%
==========================================
  Files           16         3    -13
  Lines          426        29   -397
==========================================
- Hits           426        29   -397

Impacted Files
Coverage Δ

packages/notes_api/lib/src/models/note.dart
100.00% <100.00%> (ø)

lib/app/app.dart

lib/manage_note/view/manage_note_page.dart

lib/note/view/note_page.dart

lib/notes_overview/view/notes_overview_page.dart

lib/note/cubit/note_state.dart

lib/common/widgets/snack_bar_message.dart

lib/notes_overview/cubit/notes_overview_state.dart

lib/manage_note/cubit/manage_note_state.dart

lib/manage_note/cubit/manage_note_cubit.dart

... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


[Bug] Repo offline

Information
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:35 min
[INFO] Finished at: 2019-07-16T20:31:56Z
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal on project quests-main: Could not resolve dependencies for project me.blackvein.quests:quests-main:jar:3.7.6: Failed to collect dependencies at ro.nicuch:CitizensBooks:jar:2.4.8: Failed to read artifact descriptor for ro.nicuch:CitizensBooks:jar:2.4.8: Could not transfer artifact ro.nicuch:CitizensBooks:pom:2.4.8 from/to Pikacraft Repo (http://repo.pikacraft.ro/): repo.pikacraft.ro: Unknown host repo.pikacraft.ro -> [Help 1]

Details
Hope this finds you well. It seems the Maven repository for CitizensBooks is down. Please advise on whether you plan to restore the site.

I changed the host provider, 5 euro / month was too much. Is gonna take 24-48 hours for the nameservers to get updated. One strange thing I get with the new webserver is that non-ssl ip doesn't work; anyway maybe that's why the nameservers needs to be updated. Moreover, I'm gonna PR Quests when everything is ok.


Wappalyzer as a plugin for pupeteer

If we have to scrape a large number of websites (and detecting technologies is one use case), then wappalyzer has to be run separately for all websites and the other scraper separately.
If wappalyzer was available as a pupeteer plugin as well (which would be a much better architecture too), it would allow users to simply add in wappalyzer to their existing web scraping stack. This would be extremely powerful.
Pupeteer has first class support for plugins too so this would fit right in.

That's interesting, I'll look into this when I get the chance.

Please see:
https://github.com/AliasIO/wappalyzer/issues/3081#issuecomment-633806251

Was wondering whether there were any updates on this and saw this was closed 🤔
This issue should be open, it has nothing to do with #3081.
This has more to do with: When one has to scrape a large number of websites via pupeteer, wappalyzer should work as a plug-and-play-and-get-tech-data in your own scraping processes.
I really think this is worth building, it would make wappalyzer way more powerful, allowing devs, who are already doing unrelated scraping, to simply plug in wappalyzer and get tech data as well 🔥

Doesn't even have to be a plugin tbh, it could also support:

Exposing internal pupeteer instance: Let wappalyzer do it's thing first, then it returns the pupeteer page with the website still open for me to do the rest of the scraping (unrelated to tech data)
Perhaps wappalyzer can take a reference to a pupeteer page, provided by me, and then do it's thing.

Either of these, or the plugin approach would accomplish the same thing.

You can use your own Puppeteer instance with Wappalyzer core.
https://www.npmjs.com/package/wappalyzer-core


Race condition for express-session with external store

Using express-session passport is trying to associate value in the session by key instead of using req.session.save(cb). If there is latency on saving the session, the cb is called right after may happen before it is persisted and deserialized.
Any session store/delete should be used with express-session callback.
It mainly happens in this part of the code: https://github.com/jaredhanson/passport/blob/master/lib/sessionmanager.js#L25

Expected behavior

cb function should be called after the session is stored in store (db, redix, etc..)
Actual behavior

Sometimes, if there is latency between the application and the store (db), the redirect happens before the data is persisted in the db.
Steps to reproduce
I tried using multiple stores and dbs, and was able to get the same issue.
it can be reproduced by using express-session + external store (preferably a database)
Environment

Operating System: Ubuntu | Mac OS | Docker Container
Node version: v8.11.2
passport version: 0.4.0

FYI, already tested it, it can be fixed by replacing the cb() line with:
    if (typeof req.session.save == 'function') {
      req.session.save(function (err) {
        cb();
      });
    } else {
      cb();
    }

Let me know if this is ok, I can send a PR. That seems to be a serious issue.

ping @jaredhanson

For instance, express-session only saves the data on res.end. Redirects are not included, and they recommend saving the session for redirect callbacks. https://github.com/expressjs/session/blob/master/index.js#L250

Related: https://github.com/expressjs/session/issues/360

@pragmaticivan This looks like you are making progress, are you planning to turn this into a pull request?
@jaredhanson is there a fix for this issue because right now using express, express-session, and connect-pg-simple as the session store (all latest versions) passport won't let me login from any variation of Chrome while doing local development because of this race condition, but Firefox and Safari are fine, the answer seems to lay in this: https://github.com/expressjs/session#sessionsavecallback
Which basically says you need to save your sessions yourself.

I ended up implementing my own changes for the project. The next one I ended up using Koa2 which has async support out of the box, and it's working like a charm.

Great job! I confirm that the above fix works

I'm a little confused regarding the fix. This is my code. How would I refactor this (near the bottom) to incorporate the fix?
router.post('/login', async (req, res) => {
    try {
        User.findOne({
            where: {
                username: req.body.username
            }
        }).then(user => {
            // console.log(user)
            if (!user) {
                req.status(400).json({ message: 'Username not found!' })
                return
            }
            // check password input in the req.body
            // against password stored in database...user.dataValues.password
            const validPassword = user.checkPassword(req.body.password, user.dataValues.password)
            if (!validPassword) {
                res.status(400).json({ message: 'Incorrect password!' })
                return
            }

            req.session.save(() => {
                req.session.user_id = user.id
                req.session.username = user.username
                req.session.loggedIn = true

                res.json({ user: user, message: 'You are now logged in!' })
                // res.status(200).redirect('dashboard')
            })
        })

    } catch (err) {
        console.error(err)
        res.status(500).json(err)
    }
})

@mrahma04 The issue is only relevant when doing a redirect.
And, you need to save the session only after making the changes to it.
In your current code you are saving it, and only then making changes to it.
Should be instead something like:
req.session.user_id = user.id;
req.session.username = user.username;
req.session.loggedIn = true;
req.session.save(() => {
  res.redirect('foo');
});

Moving the req.session parameters outside of the callback did the trick. Here's my refactored code. Thank you so much!


invalid install.xml file.

The install.xml is no longer valid and was either created for an old version of Moodle or has been handwritten.
This needs to be fixed using the Moodle xmldb editor (under admin > development > XMLDB.)
Please hit the "load" link for your plugin install.xml file in the moodle xmldb editor, and then make Moodle think there is an update to the file (easiest way to do this is to change the description of a table - add a full stop or something similar.) Then get XMLDB to "Save" the updated file which will remove all the old invalid xml from your file.

@danmarsden , Hey Dan, I did as you said and I think it worked? Is it valid now?

yeah that looks correct to me - sorry probably should have said that this one wasn't a blocker for approval - I just spotted some spacing that didn't come from xmldb...  :-)

Oh that's ok, thanks!


Notches

Closes #871

@VeraZab ready for review

so add notch width too?

Absolutely, it's already there :)

@nicolaskruchten Any comments on placement in the panel?

💃

Lgtm :dancer:


feat: Stableswap v2

I see potential way to merge iterations in add_liquidity into 1 iter but it would complicate inner code and also do more work before it fails so I'm not sure if it's worthed. Especially if set is that small. Also I see way how to get rid of Btrees. In my experience(from other lang) simple find is usually faster for small sets than construct more complicated data structure, but I didn't benchmarked it in rust. If we are interested in this I can try to draft it.

i agree that it could be in one, however, this would make it quite complicated.
because the thing is that add_liquidity can take any number of assets.  eg. if you have a pool with 5 assets, you can just add liquidity of one asset.
however you still need to load all asset's reserves and you also need to verify that all provided assets are in the pool.
in this way, if there is an asset which does not belong to the pool - we might read balances of other assets only to find out that the input is incorrect.
both approach have good and bad points.


Compatible to angular-bootstrap 0.14.3

angular-bootstrap version is now 0.14.3

added uib- prefix

hmm... peerDependencies warning. These have always confounded me

It's working with
´´´node_js:

'4.1'
´´´

It's working if I update .travis.yml
node_js:
  - '4.1'

Best option to fix this is to upgrade npm to version 4.2.0
node_js:
  - '4.2.0'


Refresh token lookup based off entity instead of the key to account for authority aliases

RefreshToken lookup today is based off generating a RefreshToken key and lookup based off the Key. Since we are sharing cache with python and other libraries which may not always respect the preferredCacheAuthority to cache the authority key (environment) look up based off the RT key may fail in some cases.
This PR modifies the lookup to look into the entity which accounts for the aliases for the environment

Coverage decreased (-0.07%) to 83.212% when pulling 7ed91d3dd667bb82645edda13bd209e113d6844e on refreshtoken-lookup into 94f05fd71e9028f5f32b07f45075e6c76cf21cb9 on dev.

#2201 addresses this - merged all changes including tests. Closing this PR.


feat(UI): Attempt on displaying an error when sourcing wrong files.

Checklist:

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

Closes #49492

@ojeytonwilliams The issue discussed earlier in contributor chat is resolved. But one issue remains is that how I should source the html of the preview in the challenge saga.
Is it ok to just get the iframe from the document document.querySelector("iframe") and just look for any problematic links and scripts inside, or do you need a more complicated solution ?

Good question, @CallmeHongmaybe. I think the appropriate place for this code is https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/src/templates/Challenges/utils/frame.ts since that's where we keep the code that interacts with the preview and test iframes. initMainFrame should call that code, so learners will see the message whenever their code has a problem.
One other thing is that it shouldn't throw the error - we just want to warn people that something is wrong. Instead of throwing, could you send the message to the console and the proxyLogger?

I'm able to bring the message to the console and the proxyLogger, but one thing that bugged me is that the response always returns 200 no matter what URL I throw in to the fetch function.

But one thing that bugged me is that the response always returns 200 no matter what URL I throw in to the fetch function.

Sorry, missed this comment :man_facepalming:
So, yeah, relative URLs will all be 200s in development because Gatsby handles requests for missing pages and returns a 200 status. Requests to other sites should behave correctly, though.

I tried with absolute URLs like https://fonts.googleapis.com/css?family=Lobster and jQuery CDNs and regardless of the spelling the errors return a fulfilled promise.
Are there any environments in FCC ( like preview or staging kind of environment ) to test the fetching ?

Hello is anyone here ?

Hi @CallmeHongmaybe, the review suggestions still need to be addressed before we can move forwards.
As for testing, you can check the behaviour for external urls that you know return 404 statuses and/or build the site locally. While Gatsby's development mode won't work, the site it builds will behave properly.


fix: remove deprecated proptype check

This way of checking proptypes has been deprecated in React 15. Also, it's making sure it has a certain number of components, which is totally dumb. And, it crashes when one of the children is undefined. React.PropTypes.node it is!

LGTM!

LGTM 🌈

LGTM!


pov: Redraw to avoid confusion about edges between siblings

The following information is inferred from the supposition that in the
bottom graph the path from 6 to 9 is 6 2 0 3 9 as specified later in
the README:
In the top graph: 1, 2, 3 are all children of 0.
In the bottom graph: Only 0 is a child of 2, and 1 and 3 are children of
2.
However, the same ascii art was being used to describe both situations,
which makes it appear as if 1 and 3 are children of 2 in the original
graph. If that is the case, then one would believe that the path from 6
to 9 should be 6 2 3 9. In addition, there would be no explanation for
how the rearranged graph got to be the way it is.
In general, this ascii art's branching strategy makes it appear as if
there is a path between two siblings, because they connect at a point
other than the parent node.
This commit redraws all the trees so that edges only go from parent to
child without connecting at any other point.
Closes exercism/xclojure#134
Closes #377

Honestly though, this might still make it look like there is an edge between 2 and 3. Okay, well there's this possible solution:
    +-----0-----+
    |     |     |
  +-1-+ +-2-+ +-3-+
  |   | |   | |   |
  4   5 6   7 8   9

  |           |
  7           2
              |
        +-----0-----+
        |           |
      +-1-+       +-3-+
      |   |       |   |
      4   5       8   9

Just say the word if you think that ascii art is clearer.

Eh, I'm going to make the call that that looks better. Old proposal:
          0
          |
    +-----+-----+
    |     |     |
    1     2     3
    |     |     |
  4-+-5 6-+-7 8-+-9

        6
        |
  7-----+-----2
              |
              0
              |
        1-----+-----3
        |           |
      4-+-5       8-+-9

Side note: This new review feature is pretty cool.

Thanks for catching my mistake!


Take filenames as track names if the files lack tags

Please, write the file names and track numbers in the output after the calculated DR values instead of  "00-(null)" if no tags are defined. Some file formats (wav, dts, au) do not suppott tagging.
The header could use the album dir name instead of  (null) / (null) too.
This output is rather cryptic.
Analysed: (null) / (null)
---------------------------------------------------------------------------------------------------------
DR     Peak        RMS         Duration  Track
---------------------------------------------------------------------------------------------------------
DR12   -1.19 dB    -16.00 dB       4:07  00-(null)
DR13    0.00 dB    -17.23 dB       4:28  00-(null)
DR13   -2.04 dB    -17.42 dB       3:34  00-(null)
DR13   -0.66 dB    -17.58 dB       4:15  00-(null)
DR12   -2.21 dB    -18.65 dB       6:52  00-(null)
DR12   -1.69 dB    -16.16 dB       4:15  00-(null)
DR13   -1.33 dB    -18.61 dB       4:12  00-(null)
DR12   -0.36 dB    -17.19 dB       4:13  00-(null)
---------------------------------------------------------------------------------------------------------
Number of tracks:  8
Official DR value: DR13

It would be cool to use some grid widget instead of plain text field for readability.

I guess the filename bit should be easy.
You are correct regarding the text box, I am completely new to GTK and did something that could at least be pasted somewhere else (for http://dr.loudness-war.info), and thanks fot the Grid widget tip!

I have address your folder and filename suggestions in https://github.com/dakeryas/deadbeef-dr-meter/commit/cc8065c63f9a1e66cb9d86d7d748ce6d9e489944
Please open another ticket for the grid widget with more info.


Rename to Cloudshaper

@dalehamel can you rename the repository?

@wvanbergen I'm assuming you didn't miss anything. If you did, we'll fix it as we find it.

I did a bunch of find & replace, and rake test still works. Most likely I missed something but that should be easy fixes.


Glide dockings using local machine

Hi, I am trying to play with DockStream using Schrodinger. I am wondering if there is the possibility to use it in the local machine specifying $SCHRODINGER/glide instead of the tokens procedure.

Hi Oulfin,
The usage of the "token guard" and the prefix are completely optional. You should be able to use something such as in the Glide tutorial, just remove the "prefix_execution" line.
In general, you have two options to steer how the backends are executed: Either by using "prefix_execution" (which is run directly before execution) or by specifying the binary path.
I haven't tried something like:
... "parameters": {           "binary_location": "$SCHRODINGER",           "parallelization": {             "number_cores": 2           },           "glide_flags": {             "-HOST": "localhost"           }, ...

Hi,
Thanks, I am try to follow the Glide tutorial.
I have included different options in binary location, like opt/schrodinger2021-2/, opt/schrodinger2021-2/glide, $SCHRODINGER, $SCHRODINGER/glide
        **"binary_location": "/opt/schrodinger2021-2/",
        "parallelization": {                              # if present, the number of cores to be used
                                                        # can be specified
        "number_cores": 2
      },**

But all of them ended up with the same error:
**Traceback (most recent call last):
File "~/Desktop/Play_AI/DockStream-master//docker.py", line 157, in
docker = Glide(**docking_run)
File "~/Desktop/Play_AI/DockStream-master/dockstream/core/Schrodinger/Glide_docker.py", line 202, in init
raise DockingRunFailed("Cannot initialize Glide docker, as Schrodinger backend is not available - abort.")
dockstream.utils.dockstream_exceptions.DockingRunFailed: Cannot initialize Glide docker, as Schrodinger backend is not available - abort.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "~/Desktop/Play_AI/DockStream-master//docker.py", line 187, in
raise DockingRunFailed() from e
dockstream.utils.dockstream_exceptions.DockingRunFailed**
Is it because I need to activate the license as Open Eye? If yes, how to activate it?
By the way it a really cool tool! Congrats for the work on this.

Hi again,
Thanks, glad you find the package useful.
You have Glide installed on your machine, right?
So executing $SCHRODINER/glide -h properly returns the help message?
It is a proprietary solution and you need to obtain a license for it.
If you want to use DockStream with free software, you can use a combination of RDkit embedding + AutoDockVina or rDock.

Yes, I have my Glide installed and running ( I am using it every day with a valid license)
usage: glide_startup.py [options] <input_file>
positional arguments:
input_file
optional arguments:
-v, -version          Show the program's version and exit.
-h, -help             Show this help message and exit.
-k, -keywords         Print full list of available keywords.
-docking-keywords     Print list of keywords available for docking jobs.
-gridgen-keywords     Print list of keywords available for gridgen jobs.
-allow_missing_inputs
The problem is if I need to tell some how DockStream that I have a valid license, or should it detect the license automatically?
Best,

Hi Oulfin,
From your above comment, executing $SCHRODINGER correctly returns the Schrodinger installation directory. In the Glide tutorial, "module load schrodinger/2019-4 automatically sets all necessary environment variable paths. To specify the path to the Schrodinger installation directory manually, try replacing:
"prefix_execution": "module load schrodinger/2019-4 --> "prefix_execution": "export SCHRODINGER=$SCHRODINGER"
I have tried this and it executes as intended.
In regards to the license detection, it should be automatic. If you execute "$SCHRODINGER/licadmin CHECK", it returns "License OK"?

Hi GuoJeff,
Thanks!
This worked for me: "export SCHRODINGER=/opt/schrodinger20xx"
Best.


Add 5022 port rule in LB

[Enter feedback here]
Hi Team,
I have worked on a case where customer has configured AG on FCI which they have spanned across two regions. Post creating load balancer with VNN they have noticed that the secondary region AG went in disconnecting mode. After doing various checks we figured out that 5022 wasn't reachable. To resolved this we have created a new load balancer rule with port 5022.
It's a suggestion to check it , if we can add that in document as well.

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

ID: a9894346-d829-29f1-4ffb-3bdcf6bc99f9
Version Independent ID: 28d4ffb9-e681-82b8-1436-86ea3ede4b69
Content: Configure a load balancer & availability group listener (Azure portal) - SQL Server on Azure VMs
Content Source: azure-sql/virtual-machines/windows/availability-group-load-balancer-portal-configure.md
Service: virtual-machines-sql
Sub-service: hadr
GitHub Login: @tarynpratt
Microsoft Alias: tarynpratt

@Sweta020116
Thanks for bringing this to our attention.
I'm going to assign this to the document author so they can take a look at it accordingly.

Hi @Sweta020116 thank for bringing this to our attention. I'll add an item to the backlog to see about adding this.
#please-close


Obsolete SDK - Microsoft.Azure.Management.ResourceManager.Fluent

[Enter feedback here]
Does not specify if this nuget package is actively being developed or in maintenance mode, and what the replacement is.

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

ID: 54b34178-4c56-b4e0-8775-2bab5f2b1a36
Version Independent ID: 203f9bf5-e743-871e-8b35-8d037d2bd431
Content: AzureCredentialsFactory Constructor (Microsoft.Azure.Management.ResourceManager.Fluent.Authentication) - Azure for .NET Developers
Content Source: xml/Microsoft.Azure.Management.ResourceManager.Fluent.Authentication/AzureCredentialsFactory.xml
Service: azure-resource-manager
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'ARM:0.52266294,Azure.Identity:0.24011229,Managed Identity:0.043290194'

Thank you for your feedback.  Tagging and routing to the team member best able to assist.


Fixes #486

Add a precondition to PrivateKey.of that enforces the length to 33 bytes (starting with either  0x00 or 0xED).
Update BCKeyUtils to add/remove the padding for secp keys (the way we do for Ed keys).
Add a new function to PrivateKey called valueWithoutPrefix which returns the natural 32 private key bytes.
Update Secp256k1KeyPairService in Seed.java to prefix with private keys with 0x00 if only 32 bytes.
Validate that PrivateKey.keyType() works properly via unit tests.

Merging this now that all tests passing except for two subsets of ITs.

build_testnet_reporting is failing only on AMM and Clawback because neither are yet enabled in TestNet.
build_testnet_clio  is failing only on AMM and Clawback because neither are yet enabled in TestNet and failing on  NFToken because of neither https://github.com/XRPLF/clio/pull/736 nor https://github.com/XRPLF/clio/pull/780 are deployed yet.


chore(main): Fix the docs job.

Added publish-reporter-script in the publish script to report the kokoro build status on the release PR. Sample comment.

@diptanshumittal is this PR ready to merge?

@shivgautam Who is taking over for this PR now that Diptanshu has changed projects?

Closing due to inactivity


Support for image metadata

Is your feature request related to a problem? Please describe.
Services like Unsplash require the image be attributed to the photographer. There doesn't seem to be any way to pass additional metadata about the selected image from the service to the uploader.
Describe the solution you'd like
It would be great if services could pass a metadata object along with the file blob into the next() call. I don't personally have a need for effects to be able to read or modify the metadata, but passing the metadata into effects may make sense. Finally the metadata would need to be passed into the uploader so it can be sent to the server.
Describe alternatives you've considered
I tried setting custom attributes on the file blob, but because the file is manipulated by effects as well as run through safeBlobToFile, blobToUpploadFile, and safeUpploadFileToFile, those attributes get lost.

@pegler did you find a solution? I have the same problem.


Jupyterlab rendering bug

Hi all!
Currently running into this jupyterlab issue on openeo platform when using firefox. Using chrome resolves my issues so far. The easiest solutions seems to be to upgrade the jupyterlab version.
Jaap

Hi Jaap, thanks for reporting. I have taken up the issue in the eodc-lab ticketing system. It will be handled with lower priority as it is no major issue and can be solved by using a different browser.


Update LogarithmicScaleDown featuregate docs

Ref https://github.com/kubernetes/enhancements/issues/2185
This updates the LogarithmicScaleDown feature gate documentation to reflect its 1.22 Beta status
PR to make this change: https://github.com/kubernetes/kubernetes/pull/101767

/assign @chrisnegus
/sig apps

Please add a reference to the upstream change PR so that we know if and when this one can be kicked in. Thanks.
Feel free to lift the hold when this is ready.
/hold

/unassign

/hold
till this enhancement is not labelled 'At Risk' anymore

@PI-Victor this isn't at risk anymore, the PR that was holding it (in https://github.com/kubernetes/enhancements/issues/2185#issuecomment-874951777) merged

/hold cancel
the changes for this have merged, ready for approval on the docs update

we have an internal spreadsheet that we use to track enhancements, that spreadsheet says this enhancement is marked as at risk, and still does. but no worries, whenever that changes, i will personally merge this, please leave the hold on. if it's only a matter at updating the the spreadsheet, that's also ok. as long as you are set for the code freeze, everything's good.
/hold

Ok, sorry @PI-Victor!

as promised
/hold cancel
/approve


Add Javascript support

Initially meant to add this to the previous pull request but it got merged. I could see an argument for making this optional, since someone might want to use an different server client for their javascript files, but im not sure how much of a concern that should be. open to hear suggestions

Handled in #17. My opinion is that the filetypes it uses are shown in the README and it's very easy to override. I think most people using tsserver don't also use another server (I didn't).


TEST - DONT MERGE THIS

@caphrim007 how's this test going?

@zancas waiting for PD to buy me something

Nice.


Update x_path_queries for windows collection rule

Jira link
Change description

Troubleshooting issue with window dcr failing at apply stage- unexpected status 400 (400 Bad Request) with error: InvalidPayload: Data collection rule is invalid
Linux dcr works fine so thinking it must be something to do with the data sources in the Windows one

Testing done

Checklist

[x] commit messages are meaningful and follow good commit message guidelines
[x] README and other documentation has been updated / added (if needed)
[x] tests have been updated / new tests has been added (if needed)
[ ] Does this PR introduce a breaking change

Plan Result (nonprod)
Plan: 1 to add, 0 to change, 0 to destroy.

Create

azurerm_monitor_data_collection_rule.windows_data_collection_rule

Change Result (Click me)

  # azurerm_monitor_data_collection_rule.windows_data_collection_rule will be created
  + resource "azurerm_monitor_data_collection_rule" "windows_data_collection_rule" {
      + description         = "A data collection rule for collecting Windows event logs and sending them to the appropriate log analytics workspace."
      + id                  = (known after apply)
      + immutable_id        = (known after apply)
      + kind                = "Windows"
      + location            = "uksouth"
      + name                = "ama-windows-vm-logs"
      + resource_group_name = "oms-automation"

      + data_flow {
          + destinations = [
              + "hmcts-nonprod",
            ]
          + streams      = [
              + "Microsoft-WindowsEvent",
              + "Microsoft-Event",
              + "Microsoft-SecurityEvent",
            ]
        }

      + data_sources {
          + windows_event_log {
              + name           = "ms-windows-event-log"
              + streams        = [
                  + "Microsoft-WindowsEvent",
                ]
              + x_path_queries = [
                  + "*",
                ]
            }
          + windows_event_log {
              + name           = "ms-event-log"
              + streams        = [
                  + "Microsoft-Event",
                ]
              + x_path_queries = [
                  + "*",
                ]
            }
          + windows_event_log {
              + name           = "ms-security-event-log"
              + streams        = [
                  + "Microsoft-SecurityEvent",
                ]
              + x_path_queries = [
                  + "*",
                ]
            }
        }

      + destinations {
          + log_analytics {
              + name                  = "hmcts-nonprod"
              + workspace_resource_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/oms-automation/providers/Microsoft.OperationalInsights/workspaces/hmcts-nonprod"
            }
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Plan Result (prod)
Plan: 1 to add, 0 to change, 0 to destroy.

Create

azurerm_monitor_data_collection_rule.windows_data_collection_rule

Change Result (Click me)

  # azurerm_monitor_data_collection_rule.windows_data_collection_rule will be created
  + resource "azurerm_monitor_data_collection_rule" "windows_data_collection_rule" {
      + description         = "A data collection rule for collecting Windows event logs and sending them to the appropriate log analytics workspace."
      + id                  = (known after apply)
      + immutable_id        = (known after apply)
      + kind                = "Windows"
      + location            = "uksouth"
      + name                = "ama-windows-vm-logs"
      + resource_group_name = "oms-automation"

      + data_flow {
          + destinations = [
              + "hmcts-prod",
            ]
          + streams      = [
              + "Microsoft-WindowsEvent",
              + "Microsoft-Event",
              + "Microsoft-SecurityEvent",
            ]
        }

      + data_sources {
          + windows_event_log {
              + name           = "ms-windows-event-log"
              + streams        = [
                  + "Microsoft-WindowsEvent",
                ]
              + x_path_queries = [
                  + "*",
                ]
            }
          + windows_event_log {
              + name           = "ms-event-log"
              + streams        = [
                  + "Microsoft-Event",
                ]
              + x_path_queries = [
                  + "*",
                ]
            }
          + windows_event_log {
              + name           = "ms-security-event-log"
              + streams        = [
                  + "Microsoft-SecurityEvent",
                ]
              + x_path_queries = [
                  + "*",
                ]
            }
        }

      + destinations {
          + log_analytics {
              + name                  = "hmcts-prod"
              + workspace_resource_id = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/oms-automation/providers/Microsoft.OperationalInsights/workspaces/hmcts-prod"
            }
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.


Automatically add lakeformation tags in case we let dbt create databases

Generally I have the creation of databases outside dbt (terraform or cdk)- including lakeformation tagging.
There are some scenarios like running dbt in the CI, where I would like to run in a freshly created db - (that already works) and automatically tag that db with some default tags.
Looking here seems like that we just miss a call to default tags - that can be parsed from dbt_project.yml or from profile config e.g. default_lakeformation_tags

@nicor88 this feature was implemented at first time of lakeformation was integrated. However in this case we may have the following problem: what if you need to modify LF-tags ? How would you do that ? If you manage LF tags somehow outside dbt (I use terraform, for instance) then you'll need to import database into terraform state.
If you need to create some temp databases on CI/CD stage, then you can create database without LF tags as it's done now.
Otherwise we can implement LF-tags management for databases as well, but in this case full CRUD must be implemented. And we should sort out when should we run that LF-tags update operation.

This specific issue imply cases where db needs to be created in dbt for example for ephemeral setups - like CI.
I wont make it super complicated to cover corner cases, and still recommend final users to have such process for long lived production databases outside dbt

I got your point. But why do you need LF lags for such databases at all? I'm creating such temp dbs with ci without tags and it works ok, coz all users and services have access to tagged resources only.

@svdimchenko table creations and all dbt run commands should work. I will give it a try in the next days without ci to see if all works, in case I will just close this one. Thank you for the clarification.

If we talk about implementation, it can be easily added of course on macro you have mentioned. But I'm just not sure if we do need to add this feature to the adapter. Just ping me if you'll need support with that.


Add Functional Tests

/retest-required

To me, it looks nice; however, it may require approval from one of the owners

/retest-required

/test ovn-operator-build-deploy-kuttl


[FEA] Add tests for LOCAL insert overwrite consistent with the CPU

Is your feature request related to a problem? Please describe.
We might be allowing LOCAL fs writes and since https://github.com/apache/spark/commit/657d151395 the behavior has changed and needs further investigation.
Describe the solution you'd like
Match CPU behavior as needed.

This is a change to the sql parser, not to any other part of catalyst.  Closing.

This is a change to the sql parser, not to any other part of catalyst.  Closing.


Does not handle 'holes' correctly

I know)) Any suggestions are welcome. Also check out w8r/martinez

Thanks. I'll try fixing when I have time. Good work btw.


[joltphysics] Add new port

I know this is not what's advocated for vcpkg, but for this port, I'm using the latest commit instead of the latest release version. The reason for that is that since the previous release, the CMakelist.txt file have been improved a lot, supports many more platforms and it was far easier to make a working and clean port from it.

What does your PR fix?

Add new port joltphysics : https://github.com/jrouwe/JoltPhysics

Which triplets are supported/not supported? Have you updated the [CI baseline]

All except arm-uwp. Yes.

Yes

Hi @RT222, thank you for the PR!
You mentioned using the latest upstream commit instead of their latest release. However, we can't do this without upstreams approval. I went ahead and reached out to see if they approved or if they were willing to make an early release.
Additionally, I noticed that this port doesn't provide any usage instructions. Under some conditions,
vcpkg will generate the usage instructions, but this port does not. Would you mind adding them?
To do so,

Create a file named usage in the port directory with the content you want to display.
Here is an example using zlib:

The package zlib is compatible with built-in CMake targets:

    find_package(ZLIB REQUIRED)
    target_link_libraries(main PRIVATE ZLIB::ZLIB)

To the portfile.cmake, add

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

Rerun vcpkg x-add-version

I will keep the info:reviewed label while I wait for upstream's response to make sure we don't drop this.

@RT222 It looks like @jrouwe was kind enough to do a release for us, so please update the port to the latest release. Additionally, the library now supports arm and uwp. We can delete them from the support clause. Finally, the usage text file is not technically required, so that wouldn't block this PR. That said, it would be very helpful. :)

Thanks @JavierMatosD for the assistance, and thanks @jrouwe for your reactivity and for sharing with us this awesome library.
There's still some issues to tackle before the port is ready :

Thank you for adding support for ARM and UWP. Unfortunately, I still can't build your library on this platform with vcpkg, it fails with the following compilation error :
Jolt\Core\Core.h(109): fatal error C1189: #error:  Unsupported CPU architecture
By default, vcpkg use the Debug and Release build type modes. In the JoltPhysics documentation, it is mentioned that the Release mode include support for profiling and debug rendering. Do you think it would be more appropriate to use the Distribution instead of the Release build type mode?

Jolt\Core\Core.h(109): fatal error C1189: #error:  Unsupported CPU architecture

By default it detects the ARM platform by: #if defined(aarch64) || defined(_M_ARM64). This works on my machine, but maybe _M_ARM64 is not set when building as a package for some reason (maybe it's compiling in emulation mode and also _M_ARM64EC needs to be checked)? What do I need to do to repro this?

Do you think it would be more appropriate to use the Distribution instead of the Release build type mode?
Yes, Distribution is better if there are only 2 choices to make.

Ok, I know what is going on. It's trying to compile the 32-bit ARM version instead of the 64-bit version.
vcpkg install joltphysics:arm64-uwp
works,
vcpkg install joltphysics:arm-uwp
doesn't.
Let me see if a 32-bit version can work.

The latest version on 'master' should work now. Please let me know if it works for you too and then I'll create a release with it.

I can confirm that it's working fine now, well done. :)

Ok, I created release 2.0.1

I think it's ready to go.

@RT222 Thanks again for the new port!
@jrouwe Thanks for being a great upstream maintainer and tagging meaningful releases!
@JavierMatosD Thanks for bringing these folks together!
@JonLiu1993 Thanks for the initial review!


Hover / Suggest inconsistency: Plaintext Linebreak

Split from #78718:
Plaintext Linebreak
const markupContent: MarkupContent =  {
	kind: 'plaintext',
	value: 'foo\nbar'
};

The problem comes from our API:
vscode.d.ts:
type MarkedString = MarkdownString | string | { language: string; value: string }

class CompletionItem {
  documentation?: string | MarkdownString
}
class Hover {
  contents: MarkedString[]
}

Observations:

'foo' as CompletionItem#documentation would be rendered as plaintext
['foo'] as Hover#contents would be rendered as markdown
Completion can rendered either Markdown or Plaintext. Hover can't.

This somewhat makes sense, since string is explicitly an type allowed on CompletionItem#documentation, and the string of 'foo' is interpreted as a subtype of MarkedString in Hover#contents.
However in LSP we have:
type MarkupKind = 'plaintext' | 'markdown'
interface MarkupContent {
  kind: MarkupKind
  value: string
}
interface Hover {
  contents: MarkupContent | MarkedString | MarkedString[]
}
interface CompletionItem {
  documentation?: string | MarkupContent
}

Observations:

Both 'foo' and { kind: 'plaintext': value: 'foo' } as CompletionItem#documentation would be rendered as plaintext
Both 'foo' and { kind: 'plaintext': value: 'foo' } as Hover#contents would be rendered as markdown.
foo as as Hover#contents is subtype of MarkedString, so it's fine if it's rendered as Markdown
{ kind: 'plaintext': value: 'foo' } as Hover#contents rendered as Markdown doesn't make sense and is inconsistent with CompletionItem#documentation.

We can fix this by allowing string in Hover#contents, like:
class Hover {
  contents: (MarkedString | string)[]
}

for VS Code API, and make LSP node library adopt it.
@jrieken and @dbaeumer, what's your thoughts?

I do see the problem that we don't support string type directly in Hover however it is supported through MarkdownString.appendText which to my understanding adds plain text to the MarkdownString. I would not add string to Hover.contents. I would rather deprecate string from CompletionItem#documentation
For the describe problem with the line break \n I would fix this in the converter in the LSP client here: https://github.com/Microsoft/vscode-languageserver-node/blob/master/client/src/protocolConverter.ts#L307

I'm wondering if this change should happen in the LS client library or vscode side, since MarkdownString.appendText('\n') should append \n\n if properly escaped. And MarkedString.appendText does advertise "escaping":
https://github.com/microsoft/vscode/blob/master/src/vs/base/common/htmlContent.ts#L25
	export class MarkdownString {
		/**
		 * Appends and escapes the given string to this markdown string.
		 * @param value Plain text.
		 */
		appendText(value: string): MarkdownString;
	}

@octref that would even be better. Lets see what @jrieken thinks.

👍 for fixing this appendText

@octref nice!

Doesn't work for me.
I think the change also needs to be done here: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/api/common/extHostTypes.ts#L1230

Good catch. My bad.


[C++][Parquet] Fix regressions caused by PARQUET-981

PARQUET-981 may have caused downstream build failure in Apache Arrow
https://travis-ci.org/apache/arrow/jobs/232424614
Reporter: Wes McKinney / @wesm
Assignee: Wes McKinney](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=wesm) / @wesm
Related issues:

C++: Release 1.1.0 (blocks)

Note: This issue was originally created as PARQUET-987. Please see the migration documentation for further details.

Wes McKinney / @wesm:
Resolved by https://github.com/apache/parquet-cpp/commit/c4caaf0363b00490bb78b664599909b4107339ef


SMTP Issue

Hey Guys,
I have made the below changes to the switchboard.env file but still not receiving emails via SMTP
CANARY_SMTP_SERVER=mailhost.omit.omit.omit.com
CANARY_SMTP_PORT=25
<EMAIL_ADDRESS>CANARY_ALERT_EMAIL_SUBJECT="Canary Alert via SMTP"
CANARY_SMTP_USERNAME=
CANARY_SMTP_PASSWORD=
CANARY_PUBLIC_DOMAIN=omit.omit.com
CANARY_ALERT_EMAIL_SUBJECT="Canary Token Fired"
CANARY_TOKEN_RETURN=fortune
CANARY_WEB_IMAGE_UPLOAD_PATH=/uploads
LOG_FILE=switchboard.log
Any help would be much appreciated.
Thanks

This is my full switchboard.env file by the way

Hi Camaro23,
could you try using a smtp username&password?
I think the code currently requires that.
Florian

Hey @obsti8383,
Thanks for the assistance. What if I dont use authentication for this mail server? Within the container, I have ran the "mail" command to ensure that I can connect with my mail server and that works well. Do you know of any logs within the canary tokens container I could view to help troubleshoot?
Thanks

Hey @obsti8383,
I found my switchboard.log file. Here is my error:
2019-04-24 10:55:10+0000 [HTTPChannel,0,<IP_ADDRESS>] "A smtp error occurred: <class 'smtplib.SMTPException'> - STARTTLS extension not supported by server."
Do you know what version of TLS is used by default? Can I change the version?
Thanks

Ah, that problem is independent from the password. You need an SMTP server that has STARTTLS enabled and must select the correct port (most probably 587).
Anyhow the authentication with empty password will most probably still fail, since the code tries to authenticate anyhow. I've implemented it that way, since I didn't consider the usage of anonymous SMTP relays.

Hey @obsti8383,
Thanks for the quick reply. Could I point towards a postfix server and have that forward via STARTTLS?
Thanks

I don't think so (but I'm no SMTP expert). Usually TLS must terminate directly at the configured server for the client to be able to validate the certificate correctly.
I think you have to enable TLS (e.g. as described here: http://www.postfix.org/TLS_README.html) and use a certificate that is also trusted by your canarytokens/python installation.


chore: icons with annotation

:tada: This PR is included in version 1.0.32 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Bug located in SolveSetup.py

Before submitting the issue

[X] I have searched among the existing issues
[X] I am using a Python virtual environment

Description of the bug
If the logger isn't defined, calling create_linear_count_sweep() from the setup throws an error when trying to write to self.logger.

Windows
Which Python version are you using?
3.10
Installed packages

requirements

cff1==1.15.0; python_version > '3.6' and sys_platform == 'linux'
https://github.com/tomerfiliba-org/rpyc
License: MIT
dotnetcore2==3.1.23; python_version > '3.6' and sys_platform == 'linux'
https://github.com/dotnet/core
License: MIT
pythonnet==3.0.1; python_version > '3.6'
https://github.com/pythonnet/pythonnet
License: MIT
pywin32>=301; python_version > '3.6' and sys_platform == 'windows'
https://github.com/mhammond/pywin32
License: PSF
rpyc==5.3.0; python_version > '3.6'
https://github.com/tomerfiliba-org/rpyc
License: MIT

optional

matplotlib==3.6.3; python_version > '3.6'
License: https://github.com/matplotlib/matplotlib/blob/master/LICENSE/LICENSE
License: PSF
numpy==1.24.1; python_version > '3.7'
License: BSD-3-Clause License
pandas==1.5.2; python_version > '3.7'
pandas==1.3.5; python_version == '3.7'
License: BSD-3-Clause License
psutil==5.9.4; python_version > '3.6'
License: BSD-3-Clause License
pyvista==0.37.0; python_version > '3.6'
License: MIT

Hi @dcrawforAtAnsys ,
I can not reproduce the issue. How are you disabling the logger?
I have tried the following code:
import pyaedt

pyaedt.settings.use_grpc_api = False

app = pyaedt.Hfss(specified_version="2023.1", non_graphical=False, new_desktop_session=False)

pyaedt.settings.logger.disabled = True

setup = app.create_setup("MySetup")
setup.props["Frequency"] = "1GHz"
setup.props["BasisOrder"] = 2
setup.props["MaximumPasses"] = 1
setup.update()
app.create_linear_count_sweep("MySetup", "GHz", 0.8, 1.2, 401)

app.release_desktop(False, False)


Enhancement: Ability to specify initial column width and for data table to be horizontally scrollable

You can specify the width using initialWidth. Any options available on lightning-datatable are passed through by default


capitalize content titles

This isn't ideal, but it seems like there are quite a lot of pieces of content without capitalization, so maybe this is a good compromise for now?
fixes #623

This can't be done in CSS?

@delianides it is being done in CSS, using the junction capitalize class