Need to define "consistent, but not equal, types"

Currently, PartitionedArrays require all partitions to have identical high-level types. This can be loosened to any arrays that are Content::mergeable (but compared at the level of Type::). Given an equivalence class of mergeable types, there is a "broadest" member of that set, and all members can be expanded to meet those requirements (e.g. by simplifying unions of numbers and by wrapping arrays with OptionType).

[ ] Loosen the already existing equals definition to allow named RecordType fields and UnionType types to be in different orders, as well as squashing double-OptionType and double-UnionType.
[ ] Implement mergeable for Type subclasses.
[ ] Implement broadest to find the most general of a set of mergeable types.
[ ] Implement broaden(array), which ensures that an array has the broadened type.

Care will have to be taken to integrate this with VirtualArray. If VirtualArray is implemented before the above, then VirtualArray will require its materialized array to have exactly the type in its specification, but afterward, it can be relaxed to broaden its materialized array.

We haven't needed it yet. More of these things happen bottom-up thorough nesting structures than top-down through schemas, anyway. In fact, some of the "wants" described above have been filled in different ways. So I'm closing this as obsolete.


[Feature Request]Could you please reduce the file size of the "download" file so that we can deploy it on Cloudflare pages?

Could you please reduce the file size of the "download" file so that we can deploy it on Cloudflare pages?
Because the pages are limited to a file size of 25MB.
Thank you so much!

You can change the file size to 20 or 25 MB. Go ahead.

dd if=/dev/urandom of=file.txt bs=1048576 count=30
https://stackoverflow.com/questions/9185289/uncompressable-data-sequence
https://skorks.com/2010/03/how-to-quickly-generate-a-large-file-on-the-command-line-with-linux/
Try to zip and RAR, and make sure it's not getting compressed.

downloading.txt
remove the file extension and replace the original file.
Can Cloudflare pages handle POST requests? Can you provide a setup guide?


update maps/slice imports and use slog

Version 1.21.3 now includes maps and slices as standard. The current imports:
import (
	"golang.org/x/exp/maps"
	"golang.org/x/exp/slices"
)

... need to be updated to not use the experimental versions
Replace zap with slog

strange thing is there is now no Keys function on maps, so now reverting to use lo.Keys instead, which really should be necessary.


[Feature] Logical Micro-operations Calculator

Description
Logical Micro Operations Calculator is a variety of binary calculator which can perform logical micro-operations.
Logical Micro-operations is a topic in Engineering subject - Computer Architecture and Design

This is a example of how this operations work ⏬

Screenshots
Attached above ⬆
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSOC'24 contributor.
[ ] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

@Rakesh9100 Please assign this issue to me ✅

Do not open more than one issue at a time


Interrupt Trigger

This is a Fantastic library for the MMA7660.   I was attempting to enable the interrupts Register but was having Difficulty setting that by the Wire LIB.  Is there a function that can change the interrupt Register to trigger a 1 for the various trigger modes.
Orientation Change                               When                           FBINT, PLINT = 1
Shake                                                     When                           SHINTX, SHINTY, SHINTZ = 1
Tap or Tilt                                              When                           PDINT = 1
Auto-Wake/Sleep                                  When                           ASINT = 1
X, Y, Z Data Update                                When                          GINT = 1

Hello, how can we have this X, Y, Z Data Update When GINT = 1? If this register is enable we have real-time tracking motion. Best. António

I'm very sorry that this library has not yet written an interface related to directly setting interrupt registers.

Hello,
I'm going to close this issue, feel free to re-open it if you have any other questions.
[Autocommentary]


default-branch-button: Branch name or commit hash is truncated

Description
When the button for this feature is added, the branch name or commit hash is truncated, even though visually there is enough room for the full branch name/commit hash to be displayed.

How to replicate the issue + URL
https://github.com/refined-github/refined-github/blob/74d86d37d7301719e0d9bd6536c52e32379e78e8/source/features/default-branch-button.tsx
Extension version
24.8.13
Browser(s) used
Chrome
Token ⚠

[X] I set a token in the options page. I understand that some features require a token to work.

Indeed this issue can even be seen in my own gif: https://github.com/refined-github/refined-github/pull/7403
Cause: https://github.com/refined-github/refined-github/pull/6249
https://github.com/refined-github/refined-github/blob/51b867bf47a95569a4d13ddaaaff161c288a5910/source/features/default-branch-button.css#L1-L4


v1.5: backports 19-07-03

Backported PRs:

PR: 8402 -- pkg/kvstore: fix nil pointer in error while doing a transaction in etcd  (@aanm) -- https://github.com/cilium/cilium/pull/8402
PR: 8408 -- operator: add warning message if status returns an error (@aanm) -- https://github.com/cilium/cilium/pull/8408
PR: 8416 -- maps/lbmap: protect service cache refcount with concurrent access (@aanm) -- https://github.com/cilium/cilium/pull/8416
PR: 8417 -- pkg/k8s: do not parse empty annotations (@aanm) -- https://github.com/cilium/cilium/pull/8417
PR: 8427 -- pkg/kvstore: add etcd lease information into cilium status (@aanm) -- https://github.com/cilium/cilium/pull/8427
PR: 8388 -- daemon: Change loglevel of "ipcache entry owned by kvstore or agent" (@brb) -- https://github.com/cilium/cilium/pull/8388
PR: 8444 -- test: set 1.15 by default in CI Vagrantfile (@aanm) -- https://github.com/cilium/cilium/pull/8444
PR: 8443 -- Change nightly CI job label from fixed to baremetal (@nebril) -- https://github.com/cilium/cilium/pull/8443
PR: 8453 -- pkg/k8s: hold mutex while adding events to the queue (@aanm) -- https://github.com/cilium/cilium/pull/8453
PR: 8462 -- Retry provisioning vagrant vms in CI (@nebril) -- https://github.com/cilium/cilium/pull/8462
PR: 8449 -- cli: fix panic in cilium bpf sha get command (@fristonio) -- https://github.com/cilium/cilium/pull/8449

When you have backported the above commits, you can update the PR labels via this command:
$ for pr in 8402 8408 8416 8417 8427 8388 8444 8443 8453 8462 8449; do contrib/backporting/set-labels.py $pr pending 1.5; done

This change is

test-me-please

test-missed-k8s

test-docs-please

test-upstream-k8s

Will re-run the failed tests once the CI provisioning errors have been fixed.

test-me-please

test-missed-k8s

Normal Gingko tests failed in a variety of ways: https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/13466/

test-me-please

Upstream K8s tests failed due to provisioning error: https://jenkins.cilium.io/job/Cilium-PR-Kubernetes-Upstream/1385/execution/node/42/log/

test-upstream-k8s

Runtime egress policy tests are failing? https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/13479/

test-me-please

test-missed-k8s

test-docs-please

test-upstream-k8s

I reverted the Envoy log reduction commits and the L3-dependent L7 egress tests started passing. Given that this is not a critical bugfix for v1.5, I removed it from this PR.

Cilium-Ginkgo-Tests failed: https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/13489/testReport/junit/Suite-k8s-1/15/K8sIstioTest_Istio_Bookinfo_Demo_Tests_bookinfo_inter_service_connectivity/
Istio pods couldn't get ready. Investigating while triggering build again.

test-me-please

Cilium-Ginkgo-Tests-K8s failed as well: https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-K8s/2268/

FQDN restart test failed (this is a known issue - https://github.com/cilium/cilium/issues/8234 .
Istio test failed too - it looks like kube-apiserver and kube-scheduler restarted, which is cause for concern (and hopefully unrelated to Cilium!).

Will triage, and yet again, I am trying again!

test-missed-k8s

K8s tests failed: https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-K8s/2270/
Pod got stuck in ContainerCreating state:
2019-07-09T17:40:49.196188634Z level=warning msg="Error changing endpoint identity" containerID=9f429b53af datapathPolicyRevision=0 desiredPolicyRevision=0 endpointID=3767 error="unable to resolve identity: key allocation cancelled: context canceled" identityLabels="k8s:io.cilium.k8s.policy.cluster=default,k8s:io.cilium.k8s.policy.serviceaccount=default,k8s:io.kubernetes.pod.namespace=default,k8s:zgroup=testDSClient" ipv4=<IP_ADDRESS> ipv6= k8sPodName=default/testclient-sm9jn subsys=endpoint

Identity could not be resolved for the endpoint. This might be due to etcd-operator connectivity being disrupted :(

test-missed-k8s

I've given up on the upstream K8s tests, they appear to be broken in the provisioning stages.


Android: setting launchActivity has no effect (confirmed, with suggestions to fix)

Hi
I was setting launchActivity property, but after a few hours I found out It's not working. and after longer hours of debugging I figured that this if condition probably never becomes true and thus launchActivity never taking effect
probably just removing launchActivityIntent == null &&  part of it will fix the problem (tested locally)
should I make a PR ? Edit: made a PR anyway
also tell me if this is not the right way or I got something wrong here
thanks ;)

ooh i think this was put intentionally but you could be correct 🤔 what was the issue?

Well just use any payload with launchActivity set
I'm not behind laptop anymore (was debugging this for around 7-8 hours, got tired 😅)

Actually here you go, the payload:
https://github.com/meypod/al-azan/blob/41349297ead30d2fabf1eebbeb5130285d1fd8f6/src/tasks/set_alarm.ts#L85

I have described the issue in the first comment
I too think this was intentionally set, but I think the intent was something else, and the result of this code is not what was intended
Maybe git history can help ?

I went back as far as I could and found only this:
https://github.com/invertase/notifee/compare/@notifee/react-native@4.0.1<EMAIL_ADDRESS>which means there's not much I can know about why that if was put there in the first place
but it seems it's not logical, because anything that getLaunchIntentForPackage can return (which may be null or not), isn't something that should affect the launchActivity option in any way.

Thank you. left a comment on your p/r and pushed up a fix. Will be released shortly.


Use IUnconfiguredProjectVsServices instead of HostObject

Use IUnconfiguredProjectVsServices instead of HostObject
Also inlined initialization and removed an unneeded Requires (it would null ref before it was called).

tag @dotnet/project-system @mavasani


[Bug]: There appears to be an extra space after buildIcon in rspack.ProgressPlugin if the prefix option not provided

System Info
System:
OS: macOS 14.4.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 2.35 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
pnpm: 8.15.7 - ~/.nvm/versions/node/v16.15.0/bin/pnpm
Browsers:
Chrome: 125.0.6422.112
Safari: 17.4.1
Details

Reproduce link
No response
Reproduce Steps
pnpm build

Rspack uses indicatif::ProgressBar to draw the progress bar with template "● {prefix:.bold} {bar:25.green/white.dim} ({percent}%) {wide_msg:.dim}" (code), with has spaces around the prefix. So there are two spaces between the dot and the bar by default.
Perhaps ProgressPlugin can provide configuration to customize the template. And also PR is welcome.

has been implemented by #6722


Tenant names with dashes are denied by admission webhook

Bug description
Tenant names with dashes fail admission we hook with "Tenant name has forbidden characters." Do dashes cause an issue or is this solely due to the regex used?
How to reproduce
Steps to reproduce the behavior:

Attempt to creat a Tenant resource with name "test-tenant"

Expected behavior
A tenant with the name "test-tenant" is created.
Logs
Error: admission webhook "tenant.capsule.clastix.io" denied the request: Tenant name has forbidden characters

It seems we have a regex, there:
https://github.com/clastix/capsule/blob/ee6e3aa0df79ada668d68f3a174eb09ae2617bc5/pkg/webhook/tenant/validating.go#L67-L70
I recall a discussion with @MaxFedotov that implemented that, also according to git blame, but honestly I don't recall what's the downside of having dashes on Tenant name. Pretty sure, the Tenant name is used across referenced resources to allow selection, but we just need to adhere to DNS RFC-1123.
Please, Max, would you mind providing a reminder behind this designing decision?

Hi,
this was related to https://github.com/clastix/capsule/issues/76#issuecomment-688826105
Without this restrictions, we are unable to distinguish namespace name from tenant name

Ah I see. This may cause some issues for my use case. I'm trying to map Tenant resources to some exists groups I have, but some of these groups have dashes. I'd like to keep them if possible so that the namespace prefixes make sense to the users, since they're familiar with the group names they're in.
Unfortunately, I can't drop the dashes for the Tenant name since I sometimes have other groups that would then conflict. For example, unique groups "abc" and "ab-c".

I think we can try to make an effort and solve this problem from the upside-down, rather.
I just opened a PR and would be nice having feedback from @MaxFedotov since I guess we can easily implement it when test suite is green! :)

Good news @d-m: with the latest contributions Capsule now accepts also Tenant names with dashes as DNS RFC-1123 🎉
Please, give it a try building Capsule from master and feel free to open back this issue in the case is not working as expected.


Add missing

Add missing definition for .

I was working on a project that uses THREE.InstancedBufferAttribute and noticed that react-three-fiber was missing a definition for it.
Adding it solves the problem: I can now compile (TypeScript) and use instanced geometry.


[WIP] feature: Novo Hot Reloading + Chunking

Note this is a WIP PR subject to significant overhauling. Questions welcome,
hold the review comments for the time being.
This change ensures that hot reloading works with NOVO and generates
better chunk sizes.

Just gave this a spin, a couple preliminary notes (and understand that the work here is bound to change):

When making a change on the server, it took ~14 seconds to restart / recompile server and refresh the browser and see the change reflected. During that 14 second refresh time one sees in the browser:

Hot loading on the client doesn't seem to work:

Several smaller changes have been put into place and are adequate for the time being.


az create container using yaml file throws Python error

This is autogenerated. Please review and update as needed.
Describe the bug
I wanted to mount a volume to a container instance. I exported the yaml-config via az container show of an existing container. I adjusted a few lines and wanted to deploy it, but received the error message. This way of deploying works for Container Apps, so I assume it should also work for Container Instances? I don't understand whether this error is related to the yaml file or to something else.
Command Name
az container create
Errors:
The command failed with an unexpected error. Here is the traceback:
('Unable to build a model: ("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'")), DeserializationError: ("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'"))', DeserializationError("Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'", AttributeError("'str' object has no attribute 'get'")))
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1436, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1201, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1230, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
AttributeError: 'str' object has no attribute 'get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 622, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1454, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.10/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1436, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1201, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1230, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
azure.core.exceptions.DeserializationError: ("Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'", AttributeError("'str' object has no attribute 'get'"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/container/custom.py", line 121, in create_container
    return _create_update_from_file(cmd.cli_ctx, resource_group_name, name, location, file, no_wait)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/container/custom.py", line 433, in _create_update_from_file
    return sdk_no_wait(no_wait,
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/util.py", line 717, in sdk_no_wait
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py", line 8974, in begin_create_or_update
    raw_result = self._create_or_update_initial(
  File "/opt/az/lib/python3.10/site-packages/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py", line 8879, in _create_or_update_initial
    _json = self._serialize.body(parameters, 'GenericResource')
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 624, in body
    raise_with_traceback(
  File "/opt/az/lib/python3.10/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 622, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1454, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.10/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1436, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1201, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 1230, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
azure.core.exceptions.SerializationError: ('Unable to build a model: ("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'")), DeserializationError: ("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'"))', DeserializationError("Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'", AttributeError("'str' object has no attribute 'get'")))

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az container create --resource-group {} --file {}

Expected Behavior
Environment Summary
Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04.2 LTS
Python 3.10.10
Installer: DEB

azure-cli 2.46.0

Extensions:
containerapp 0.3.13
webapp 0.4.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

route to CXP team

Any update? Same error here:
az container create -g {} -f {}.yaml
azure-cli                         2.60.0 *

core                              2.60.0 *
telemetry                          1.1.0

Extensions:
aks-preview                      1.0.0b6

Dependencies:
msal                              1.28.0
azure-mgmt-resource             23.1.0b2

Python location '/opt/homebrew/Cellar/azure-cli/2.60.0/libexec/bin/python'
Extensions directory '/Users/ltmleo/.azure/cliextensions'

Python (Darwin) 3.11.9 (main, Apr  2 2024, 08:25:04) [Clang 15.0.0 (clang-15<IP_ADDRESS>)]

Legal docs and information: aka.ms/AzureCliLegal

I just realized that my yaml file (exported using az container show) does not have the same format as the expected form az container created. See this documentation, might help.


✨ Add Spring Boot MicroShift product

Adds

new product springboot-microshift
new deployment strategy FromImageStrategy that creates Docker image from generated app and push it to the remote registry, than create a Kubernetes resources (deployment, config map and service)
system-x services implemented : AMQ Broker , IBM MQ, Infinispan, MySql

@mcarlett can you please elaborate a bit how the microshift stuff should work? (I have no experience with that)
at the first glance microshift should be a subset of openshift, so what are we missing from openshift features that require a whole new product class?
what's the difference in the system-x service classes? they seem to be 99% identical to the openshift system-x services
since we control the archetype, wouldn't it be easier to delegate all the docker stuff to some maven plugin, instead of doing it in the code?

@avano I implemented a new deploy strategy to keep separated the way to deploy the product. Yes this is not the only way to build docker image and push it in a registry (MicroShift doesn't have Build resource), I can do something similar using jkube and I planned to implement another deployment strategy based on that. I added new product to handle different scenarios and the current implementations of system-x-services for Openshift are not compatible (they use DeploymentConfig) and I thought to keep separated, but if you think the solution to use Openshift implementations can be adopted, I can keep just a property and handle it into the implementations (ex: test.use.microshift will remain in the springboot-openshift product but I will add some conditions based on this property)

since we will need to migrate to deployments anyway, it's probably not worth duplicating the resources

yes indeed, I removed the product and I replacing deploymentconfig with deployment in the system-x-services I want to use for testing MicroShift

what about the docker stuff? can't it be moved to some maven plugin in the archetype?

as I said it is possible to use the openshift maven plugin to push the generated image, I will implement this additional deployment strategy, do you think the current implemented cannot be used at all?

also did you consider running own docker registry on the microshift, to avoid pushing all the images to quay? would that be possible?

out of the box MicroShift doesn't have it's own registry and I think installing a new one is not a good practice since MicroShift is built to run on edge devices with limited resources, so I would keep as light as possible, that's why I thought to use external image registry
thanks @avano

what about the docker stuff? can't it be moved to some maven plugin in the archetype?

as I said it is possible to use the openshift maven plugin to push the generated image, I will implement this additional deployment strategy, do you think the current implemented cannot be used at all?

well, of course it can be used, but I think it is not necessary to do all the stuff manually when some maven plugin can do the same with less hassle

also did you consider running own docker registry on the microshift, to avoid pushing all the images to quay? would that be possible?

out of the box MicroShift doesn't have it's own registry and I think installing a new one is not a good practice since MicroShift is built to run on edge devices with limited resources, so I would keep as light as possible, that's why I thought to use external image registry

I think the only prerequisite is that you need to have a registry and it doesn't matter where/what the registry is. keep in mind that running the whole TNB testsuite builds 250+ docker images, so using some external image registry and cleaning it afterwards is just more work to do, that you can avoid by having ephemeral registry on the microshift instance

well, of course it can be used, but I think it is not necessary to do all the stuff manually when some maven plugin can do the same with less hassle

ok since I already implemented the usage of the embedded openshift-maven-plugin with external repository, I can remove the deprecated deployment strategy

I think the only prerequisite is that you need to have a registry and it doesn't matter where/what the registry is

this is on of the goal of the PR, so that I added a dedicated configuration parameter openshift-sb.result-image.repo, it is possible to configure this parameter based on the CI

. keep in mind that running the whole TNB testsuite builds 250+ docker images, so using some external image registry and cleaning it afterwards is just more work to do, that you can avoid by having ephemeral registry on the microshift instance

I don't think having an image repository in the microshift device is a good practice because usually the microshift cluster is installed in small devices with limited resources but, as in the previous point, TNB framework doesn't care the management of the registry since it handles only the configuration of the registry. The CI process will handle the registry


fix: convert single quote entities in Opportunities email

This PR addresses #844

[x] Addresses the issue in full
[ ] Addresses only certain aspects of the issue

Description
Please include a summary of the change and which issue(s) is addressed.
How Can This Be Tested/Reviewed?
Provide instructions so we can review, including any needed configuration, and the test cases that need to be QAd.
Author Checklist:

[ ] Added QA notes to the issue with applicable URLs
[ ] Reviewed in a desktop view
[ ] Reviewed in a mobile view
[ ] Reviewed considering accessibility
[ ] Added tests covering the changes
[ ] Made corresponding changes to the documentation
[ ] Ran yarn generate:client and/or created a migration when required

Review Process:

Read and understand the issue
Ensure the author has added QA notes
Review the code itself from a style point of view
Pull the changes down locally and test that the acceptance criteria is met
Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@emilyjablonski OK I've updated this PR based on our chat last week. What do you think about this approach?


remove simplification of monomial constants in posynomial

Closes #1060

test models please

Looks like one of the engine tests doesn't run with cvxopt...Anyway, @whoburg, this is ready for review and merging.

Yup, I have a working branch which addresses this better. Will push soon!

Superseded by #1064


Using popover-is-open to close popovers

I am attempting to close my popovers when clicking anywhere outside of them by using the new popover-is-open attribute. My current HTML and relevant controller code looks like so:

  <button class="btn btn-default btn-xs" type="button">

  </button>

vm.togglePopover = false;

vm.openTogglePopover = function() {
  vm.togglePopover = !vm.togglePopover;
};

This works great for toggling popovers on/off by clicking on them. How is the popover-is-open attribute used to close popovers by clicking outside of them?

Please do not use the issues forum for support related requests.  Rather, please follow the instructions here.
The answer to #4486 may be of some help.

Is there documentation regarding this new attribute yet? Seems like this is a common issue. I would happily provide a PR if needed.

@chrisjlee, doesn't look like we have a working example in our docs yet for either tooltips or popovers.  Please feel free to get with @Foxandxss to discuss the docs (and how to create a good example) as he's currently in the process of a doc sweep for the 1.0 release.  I think there may also be an issue tracking the doc sweep...

Let me add this issue on my list of things to update with the doc.

Thank you so much, @icfantv

Look at the plunker for the easiest solution using uib-popover and mouse events.
https://plnkr.co/edit/9oMYadXPNJcRPrig71iF?p=preview


Post-install build.js fails

I'm attempting to install node-sass as a dependency of an advanced ng2/electron seed inside a Docker container running behind a corporate firewall controlled by a Jenkins CI instance.

NPM version (npm -v):
3.10.8

Node version (node -v):
v6.9.1

Node Process (node -p process.versions):
{ http_parser: '2.7.0',
node: '6.9.1',
v8: '5.1.281.84',
uv: '1.9.1',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '57.1',
modules: '48',
openssl: '1.0.2j' }

Node Platform (node -p process.platform):
linux

Node architecture (node -p process.arch):
x64

node-sass version (node -p "require('node-sass').info"):

npm node-sass versions (npm ls node-sass):
not applicable, attempting to install v4.1.1

This is the relevant part of the respective Dockerfile, it is build from node:6.9.1 which is itself based on Debian Jessie.

ENV SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=1
ENV SASS_BINARY_PATH=/usr/base/binaries/
ENV SASS_BINARY_NAME=linux-x64-48
COPY ./ /usr/base

The correct copy process of the binary has been confirmed.
The installation process fails during the postinstall call to build.js:

<EMAIL_ADDRESS>postinstall /usr/base/node_modules/node-sass
node scripts/build.js
Binary found at /usr/base/binaries/
Testing binary
Binary has a problem: { Error: Cannot find module '/usr/base/binaries/'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at module.exports (/usr/base/node_modules/node-sass/lib/binding.js:19:10)
at Object. (/usr/base/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12) code: 'MODULE_NOT_FOUND' }
Building the binary locally
Building: /usr/local/bin/node /usr/base/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=

The following local compilation via node-gyp fails, again because the following GET is blocked by a firewall:

GET https://nodejs.org/download/release/v6.9.1/node-v6.9.1-headers.tar.gz

While this isn't really the problem, I'm also open to workarounds based on supplying cached node header files to node-gyp.
Any ideas?

By setting ENV SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=1 you're forcing a local compilation. In order for node-gyp to compile locally it needs the headers for your version of node. By blocking that download the binary cannot be compiled so the build step will fail.

Is using SKIP_SASS_BINARY_DOWNLOAD_FOR_CI and supplying a pre-downloaded version via SASS_BINARY_PATH instead not an intended workflow?

No it is not. SKIP_SASS_BINARY_DOWNLOAD_FOR_CI is an an internal, undocumented flag scheduled for remove. SASS_BINARY_PATH is all you need.

great, thank you for the clarification, I'll be able to confirm on Tuesday.

Unfortunately, the problem remains unchanged even after removing the SKIP_SASS_BINARY_DOWNLOAD_FOR_CI ENV flag

I expect the current problem to be different. We cannot help without a full install log.

I have created a gist containing the complete install log along with the used Dockerfiles, thanks for your efforts.
http://gist.github.com/TekSiDoT/0904eb396e50685c6c8e22540660c461

Sorry for the delay, I've started looking into this, it does appear to be bug.

No worries, I appreciate you investing time in this, looking forward to your results.

Any updates?

Electron isn't a supported environment for node-sass

@nschonni This is not about running node-sass in Electron but about a bug handling a flag concerning the offline use of node-sass during a build process. This same could be reported using any number of projects (among others: @angular/cli).

Sorry this is a legitimate issue I just haven't had the time to get around to yet.

Thanks for your time!

The headers is the target option from node-gyp https://github.com/nodejs/node-gyp#command-options
When supplying the sass-binary-path, it assumes that is the full path including the binding.node https://github.com/sass/node-sass/blob/a14fbe5b3bf374c6d4192b7e2079e3812712fa92/test/runtime.js#L86

We have the same problem with an offline build setup, it's currently a blocking point for us, is there any workaround we can use a temporary measure?

We have the same problem with node-sass install behind firewall and proxy.
We have setup proxy with npm install, but get error "tunneling socket could not be established, statusCode=403".
Is there workaround for that?
Can sass-binary-path be used? And what binary exactly do I need to manually download?

Any updates on this?

Please see my advice from https://github.com/sass/node-sass/issues/2738#issuecomment-542960751 if the issue still persists.


Advanced Tutorial Master Issue

Feature branch: 5.1
This issue attempts to outline and organise the goals for the GDPC 5.x advanced tutorial.
Goals

The generator demonstrates all major and most minor features of GDPC (see Features)
The generator fulfils the minimum viable product requirements (see MVP)
The generator contains code and systems that may be easily modified for use in other projects
The generator is creative and unique and can provide inspiration for other participants
The generator fulfils the technical requirements for GDPC 2022 (see Requirements)
The generator is submitted to GDPC 2022 and achieves an above-average score

Roadmap
See Projects -> Advanced Tutorial
Requirements

Runtime <= 10 minutes
RAM usage <= 2GB
Can handle a build area of 1000x255x1000
Player is positioned in the centre of the build area (and directed towards generated settlement)
Can handle generated and player-made structures

MVP
1.Fulfils competition requirements
2. Places settlement in sensible location
3. Uses template structures
4. Uniform paths connect structures to spawn point
5. Pre-existing structures are avoided and ignored
Features
World analysis:

[x] Global slices
[x] Biomes
[ ] Obtrusiveness and optimal direction
[ ] Versions
[x] Block categories

World manipulation:

[ ] Interfaces
[x] Running commands
[ ] Manipulating build area
[x] Placing blocks (advanced)
[ ] Placing geometric shapes (advanced)
[ ] Placing lecterns, signs, blocks with inventory

Utility:

[x] 2D/3D loops
[ ] Book writing
[ ] Speeding up ticks for tree growth

Optimisation:

[x] Keeping time
[x] Caching
[ ] Buffering
[ ] Hint: LRU Cache

Generator Architecture
4-phase process:

World analysis
Settlement setup/essentials/plot reservation
Settlement expansion and improvement (variable, finite length of time)
Settlement cleanup and beautification (remaining time)

The advanced tutorial is no longer being worked on by its original developer @Flashing-Blinkenlights, and will likely become outdated soon. It is now considered to be out of scope of the library.
An advanced tutorial may return in the future, possibly in a different form.


Allow to easy install CHIP wheels in current virtual env

Problem
It's not easy to build and install all CHIP packages in the current python virtual environment. Current use case:
./scripts/build_python.sh
# find all wheels generated in the output directory (where is the output, though)
# uninstall them, and install again...

In order to simplify that, the build_python.sh now provides option to automatically install all generated packages without the need of creating new virtual env (which is time costly since new env is re-created by default), i.e.:
source ./scripts/activate.sh
./scripts/build_python.sh -i
# do some modifications in the code
./scripts/build_python.sh -i
# ... repeat ...

Changes

added -i/--install-wheels option to install generated packages
renamed -i/--create_virtual_env to  -e/--create-virtual-env (the -e better align with "environment", though, this change breaks backward compatibility)
renamed some long options to use "-" instead of "_"

Testing
CI will verify

@arkq I believe installing chip wheels in an activated package is a path for errors as the modules that we install may conflict with the source code itself and we had frequent bug reports from people saying "update master" did not work.
I would like to explicitly disallow:
source ./scripts/activate.sh
./scripts/build_python.sh -i

which this script seems to intend to allow.

Maybe enfoce some extra  command ... not sure how but like --i-know-this-may-break-my-builds or something.

Maybe enfoce some extra command ... not sure how but like --i-know-this-may-break-my-builds or something.

Thinking of it more, I think we should allow "just reinstall wheels without clearing a virtualenv" however ensuring we do have a virtualenv path. Never allow to install in .environment/$PW_ENVIRONMENT_ROOT

Please add a check that the virtualenv should not be the build virtual environment

The whole reason for this PR was to allow easy install of all CHIP python packages in the build environment :D I've been always using it that way without any issues. However, I understand that for non-developers such configuration might sometimes causes difficulties, especially for ones not familiar with python ecosystem. I will keep using my local scripts for that, so let's drop this change.


Semantic segmentation with Swin-L backbone

Will there be pre-trained models available for semantic segmentation with Swin-L backbone?
Thanks!

Yes, we will release this result in the future.


UI: Sort order is lost when going back to start screen

If you sort by newest first, and then open up a trace and then go back to the start screen, the sort order is lost, making it somewhat confusing if you are trying to pinpoint a specific trace.

@adriancole @rogeralsing That would be a nice improvement to the UI if the sorting method would persist.

adding help-wanted as I would like this, too, but don't know how to make it happen.

We should add ?sortOrder=something to the URL (replaceHistory) and then have the crossroads router read that param when it delegates to the views. Somebody would have to send a PR for it.

I've created a first pass on this feature.  Any feedback on what I did?
I did it in two commits since there were a few plumbing changes needed to make the feature possible.  The two commits can be combined, though, if that is preferable.

@joel-airspring thx.. for laziness it is easier to review code on a pull request than clicking on commits. Can you raise a PR with those 2?

PR #1543


HA Master lose connection on ILB restart due to kubernetes issue 41184

The agents may report NodeNot Ready due to single master restart, or HA Masters on ILB restart.
This is to track the following kubernetes issue: https://github.com/kubernetes/kubernetes/issues/41185.
Per @colemickens, this is a related issue: https://github.com/kubernetes/kubernetes/issues/41916#issuecomment-299177721.
To avoid this, an alternative solution is multi-host client: https://github.com/kubernetes/kubernetes/pull/40674.

To add more color on this, one person's research indicates the delay is due to the way the Linux kernel handles dead TCP connections: https://github.com/kubernetes/kubernetes/issues/41916#issuecomment-312428731


Improve override based on user

user x can only override his own resources

closed via https://github.com/geosolutions-it/geonode-importer/pull/57


undefined method Illuminate\Config\Repository::package() in Laravel 5

In laravel 5 the Serviceprovider is throwing this error
Call to undefined method Illuminate\Config\Repository::package() in
aura-is-here/laravel-multi-tenant/src/AuraIsHere/LaravelMultiTenant/LaravelMultiTenantServiceProvider.php on line 44

This is related to
https://laracasts.com/discuss/channels/general-discussion/l5-latest-commit-breaks-if-using-waygenerators-or-image-internvention?page=1

It's not really related to that. It's just that asset registration is different in L5.
I'll be hopefully getting to this this week. Thanks!

We are getting below error on upgrade to Laravel 5.
Call to undefined method Illuminate\Config\Repository::package() in
aura-is-here/laravel-multi-tenant/src/AuraIsHere/LaravelMultiTenant/LaravelMultiTenantServiceProvider.php on line 44


GPIO and AON_COUNTERS examples don't build with current ISSM toolchain

examples/gpio/ and examples/aon_counters/ won't build with the current ISSM toolchain, as provided from the bundle or from https://github.com/01org/qmsi/releases .
Error is:
In file included from ../../build/debug/quark_d2000/libqmsi/include/qm_gpio.h:8:0,
from main.c:5:
main.c: In function 'gpio_example_callback':
main.c:68:12: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t {aka long unsigned int}' [-Werror=format=]
QM_PRINTF("GPIO callback - status register = 0x%u\n", status);
^
../../build/debug/quark_d2000/libqmsi/include/qm_common.h:84:31: note: in definition of macro 'QM_PRINTF'
#define QM_PRINTF(...) printf(VA_ARGS)
^
This is a known issue and will be fixed on the next toolchain version.
For now, a workaround would be to just modify the failing examples and change the %u printf modifiers to %lu.

Fixed by new toolchain.


🚀 Feature: Allow integrator to configure logging of Exceptions

🔖 Feature description
You should add the ability for an integrator to configure what internal errors are logged to the application logs. This is particularly useful in relation to application security where it is desirable to log an error thrown in response to a decision to DENY by the permissions framework.
🎤 Context
Log attempts by users to circumvent security. This is in response to a security audit that we are performing pending adoption.
We have integrated the permissions framework and created a permissions policy. We want the backstage backend to log instances where the permissions framework has made a decision to DENY an action, returned as a http 403 (forbidden).
A detailed message is returned to the front-end where this occurs, an example is given below where a conditionalDecision has been defined on the catalog refresh action. The information in this message is not logged by the backend.
{"error":{"name":"NotAllowedError","message":"","request":{"method":"POST","url":"/refresh"},"response":{"statusCode":403}}
We have implemented a front-end plugin that leverages the backend-proxy to call a third party API. The proxy attaches a PAT that allows access to the third party API. We have defined re-write rules on the proxy that limit the reachable end-points on the third party API. We want to log instances of a http 404 (not found) thrown by the proxy as this could indicate a malicious attempt by a user to leverage the proxy to attempt access to restricted endpoints on the third party API.
✌ Possible Implementation
The functionality of the DefaultErrorHandler is defined in MiddlewareFactory.ts
It is made available to the App's ServiceBuilderIml and plugin authors via the Express error request handler
In MiddlewareFactory.ts, 500 type errors are logged by default and all errors can be logged based on the options.logAllErrors parameter passed in from the Express error request handler
It should be up to the integrator to define in configuration what errors are logged. The configuration could be read in MiddlewareFactory::error and a decision made there whether or not the error should be logged. The log output should include the identity of a user making the request that caused the error. This can be read from the Identity API using the request.
A list of Http error types that should be logged can then be configured by the integrator in the backend section of the configuration
backend:
logger:
responseTypes: ['403', '404']
👀 Have you spent some time to check if this feature request has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
None

@oconnormj the purpose of the disableDefaultErrorHandler() and setErrorHandler() methods of the service builder are for you to be able to replace the default error handler with a custom one in your own backend setup. I think the logic that you're asking for here is a little bit too specific to your use-case and something that's best to implement as part of your own setup.
If there are other members of the community that feel like this would be a useful addition to the base setup, please chime in.


dask chunking tutorial outline

from the pangeo working meeting discussion with @mgrover1 @jmunroe @norlandrhagen
Here's an outline for an intermediate tutorial talking about dask chunking specifically for Xarray users

Motivation: why care about chunk size?

demonstrate relation between chunk size and computation time / number of tasks with a simple example?

maybe even memory usage

https://tutorial.dask.org/02_array.html#Choosing-good-chunk-sizes
https://docs.dask.org/en/stable/array-chunks.html

Keeping track

monitoring chunk sizes and num tasks throughout the pipeline using the repr

use some images

while output blocks may be small (say after a big reduction), intermediate blocks need not be.
So keep monitoring chunksizes (and tasks) throughout the pipeline.

Why is it important to choose appropriate chunks early in the pipeline?

Demonstrate that rechunking is not cheap in most cases

Specify chunks when reading data

Avoid chunks="auto".

https://docs.dask.org/en/stable/array-chunks.html#automatic-chunking

Specifying chunks during data read

open_dataset
open_mfdataset

Analysis vs storage chunks:

Dask chunks should be a multiple of chunks on disk
talk about aligning chunks with files stored on disk
@djhoese example

Agreed this would be great to document thoroughly. See also this relevant issue + discussion in rioxarray https://github.com/corteva/rioxarray/issues/253

demonstrate relation between chunk size and computation time / number of tasks with a simple example?

maybe even memory usage

This would be huge! This comes up often in Satpy where users want to process satellite images on their local machine but they only have 8GB or 16GB of memory. If someone can make a good diagram showing chunks being processed by a worker thread/process and how changing the size of all chunks or number of workers contributes to the overall memory usage that would be such a help when explaining this to users.

forgot to cc @rybchuk!


Tidy exhibits

@caseyedavis12 : lots of little tweaks. Merge, or trust me.

@mccalluc: thanks. i trust you.


Checkbox's label style

Hi there!
Is there a known way to change the text color of my checkbox's label if checked? I've been trying with all kinds of selectors but I couldn't find a way.
Thanks in advance for any help!

@cbernadou Just had this issue. Try something like this:
            color="white"
            sx={{ 'input:checked ~ &': { color: 'white' } }}
          />```


Fix dama flag bug (see Discord ping)

Another example
https://mahjongsoul.game.yo-star.com/?paipu=231213-f8236e49-1ed6-4bde-aa60-d900ed1d9146
Both ``dama'' were open hands (first one happens to be atoduke, if this makes a difference)


PodSecurity documentation

Document the new PodSecurity feature. Documentation should include:

[ ] How to enable the feature (alpha)
[ ] How to use the feature

[ ] API documentation, pointers to Pod Security Standards for level definitions.
[ ] Labels usage, examples, best-practices
[ ] Configuration

[ ] Webhook usage & installation instructions
[ ] Extending PodSecurity: extension points in the code, maybe a pointer to another page (or docs on the pod-security-admission repo)
[ ] PSP migration guide (maybe just a pointer to the PSP docs)
[ ] What do when you need more control: pros/cons of extending, running alongside a 3p plugin, migrating to a 3p plugin

/sig auth

/milestone v1.22

I'd partition the "Extending PodSecurity" and "running alongside a 3p plugin, migrating to a 3p plugin" bits to docs for beta

Done. Created https://github.com/kubernetes/website/issues/28867

/triage accepted
/sig security
/priority important-soon

/assign
PR for this will include changes for #28721 as well.

completed in #28903
/close


False positive with DeletePrefix

For a multi-line string, I am using gsub(/^  /, '') and I receive a wrong suggestion that I should replace this call with delete_prefix.
Note that ^ matches at the beginning of a line, not only at the beginning of the string.

Expected behavior
No offense being reported.
Actual behavior
lib/colorls/flags.rb:169:23: C: Performance/DeletePrefix: Use delete_prefix instead of gsub.

      puts <<EXAMPLES.gsub(/^  /, '')

                      ^^^^

Steps to reproduce the problem
def show_examples
      puts <<EXAMPLES.gsub(/^  /, '')

  examples:

    * show the given file:

      colorls README.md

    * show matching files and list matching directories:

EXAMPLES
    end

RuboCop version
0.84.0 (using Parser <IP_ADDRESS>, rubocop-ast 0.0.3, running on ruby 2.6.6 x86_64-linux)

I believe the same bug exists for Performance/StartWith.
# This checks that _any_ line in the output starts with "origin"
`git remote -v`.match?(/^origin/)

#  Performance/StartWith suggests this, which only tests the first line
`git remote -v`.start_with?("origin")

I think the fix is that both cops should only flag patterns that start with \A (not ^).

I think the fix is that both cops should only flag patterns that start with \A (not ^).

Yes, same goes for $ and \Z in regard to the delete suffix and end with cops.


Multi-GPU OOM when resuming from checkpoint

System Info
Accelerate config:

compute_environment: LOCAL_MACHINE
deepspeed_config: {}
distributed_type: MULTI_GPU
downcast_bf16: 'no'
fsdp_config: {}
gpu_ids: all
machine_rank: 0
main_process_ip: ''
main_process_port: ''
main_training_function: main
megatron_lm_config: {}
mixed_precision: bf16
num_machines: 2
num_processes: 16
rdzv_backend: static
same_network: false
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false

Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[X] My own task or dataset (give details below)

Reproduction
Hi all,
When training a model with MULTI_GPU I am running into an issue where when I try to resume from a checkpoint I run into a torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 214.00 MiB (GPU 0; 79.18 GiB total capacity error.
The model trains perfectly fine when not resuming from a checkpoint. Only when the model is saved, training is stopped, and then training is resumed does the CUDA out-of-memory error occur.
Here is the code:
import math
import multiprocessing
import os
from datetime import timedelta
from functools import partial
from itertools import chain

import torch
from accelerate import Accelerator
from accelerate.utils import InitProcessGroupKwargs
from datasets import concatenate_datasets, load_dataset
from lion_pytorch import Lion
from palm_rlhf_pytorch.palm import PaLM
from palm_rlhf_pytorch.palm import LayerNorm, ParallelTransformerBlock

from torch.optim import AdamW
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import (AutoTokenizer, default_data_collator,
                          get_cosine_schedule_with_warmup,
                          get_linear_schedule_with_warmup, set_seed)

from palm_rlhf_pytorch.stable_adamw import StableAdamWUnfused

# constants

class CFG:
    BATCH_SIZE: int = 1
    GRADIENT_ACCUMULATE_EVERY: int = 4
    SEED: int = 42
    LEARNING_RATE: float = 1.6e-4
    WEIGHT_DECAY: float = 0.1
    SEQ_LEN: int = 8192
    NUM_CPU: int = multiprocessing.cpu_count()
    RESUME_FROM_CHECKPOINT: str = "/save_dir/step_100"
    CHECKPOINTING_STEPS: int = 100
    OUTPUT_DIR: str = "/save_dir"
    ENTITY_NAME: str = "your_entity"

# helpers

def print_num_params(model, accelerator: Accelerator):
    n_params = sum(p.numel() for p in model.parameters() if p.requires_grad)
    accelerator.print(f"Number of parameters in model: {n_params}")

def decoupled_optimizer(
    model: torch.nn.Module,
    learning_rate: float,
    weight_decay: float,
    beta_1: float,
    beta_2: float,
    optimizer_type: str = "adamw",
    use_fsdp: bool = False,
    accelerator: Accelerator = None,
):
    """
    Decouples the optimizer from the training process.

    This function sets up the optimizer for the model by creating two groups of parameters:
    one for weight decay and one without weight decay. Then, it initializes the optimizer
    with these two groups of parameters.

    Args:
        model (Module): The model whose parameters are optimized.
        learning_rate (float): The learning rate for the optimizer.
        weight_decay (float): The weight decay for the optimizer.
        beta_1 (float): The exponential decay rate for the 1st moment estimates.
        beta_2 (float): The exponential decay rate for the 2nd moment estimates.
        optimizer_type (str): The type of the optimizer. Can be 'lion', 'adamw', or 'stable_adamw'.
        use_fsdp (bool, optional): If True, the optimizer will work with fully sharded data parallelism. Defaults to True.
        accelerator (Accelerator, optional): The accelerator from HuggingFace's Accelerate library. Defaults to None.

    Returns:
        Optimizer: The initialized optimizer.

    Raises:
        ValueError: If the optimizer type is not 'lion', 'adamw' or 'stable_adamw'.
    """
    accelerator.print(f"Using {optimizer_type} optimizer")
    # Create an empty dictionary called param_dict to store the model's named parameters.
    param_dict = {}
    # Iterate over the model's named parameters and populate the param_dict with key-value pairs.
    for param_name, param in model.named_parameters():
        param_dict[param_name] = param

    # Separate the model's named modules into two groups: decay and no_decay.

    # Create an empty list to store the names of the LayerNorm and Embedding layer weights with no weight decay.
    no_decay = []

    if use_fsdp:
        exclude_module = "_fsdp_wrapped_module.token_emb"
    else:
        exclude_module = "token_emb"

    # Iterate through the named modules of the model.
    for module_name, module in model.named_modules():
        # Check if the current module is an instance of any of the desired types (LayerNorm or torch.nn.Embedding).
        for ndim in [LayerNorm, torch.nn.Embedding]:
            if isinstance(module, ndim):
                # If torch.nn.Embedding, append its name with a ".weight" suffix to the no_decay list.
                if module_name == exclude_module:
                    no_decay.append(f"{module_name}.weight")
                else:
                    # If the module is an instance of LayerNorm
                    no_decay.append(f"{module_name}.gamma")
                # Exit the inner loop since the desired module has been found.
                break

    # Create an empty list to store the names of the Linear layer weights with weight decay.
    decay = []

    # Iterate through the named modules of the model.
    for module_name, module in model.named_modules():
        # Check if the current module is an instance of the desired type (torch.nn.Linear).
        for ndim in [torch.nn.Linear]:
            if isinstance(module, ndim):
                # If the module is an instance of torch.nn.Linear, append its name with a ".weight" suffix to the decay list.
                decay.append(f"{module_name}.weight")
                # Exit the inner loop since the desired module has been found.
                break

    # Create two separate lists of model parameters: decay_param and no_decay_param.
    # The decay_param list contains the parameters that should have weight decay applied.
    # The no_decay_param list contains the parameters that should not have weight decay applied, excluding the 'to_logits.weight' parameter.

    # Create an empty list called decay_param to store the parameters with weight decay.
    decay_param = []

    if use_fsdp:
        exclude_param = "_fsdp_wrapped_module.to_logits.weight"
    else:
        exclude_param = "to_logits.weight"

    # Iterate over the decay list, which contains the names of the parameters with weight decay.
    for param in decay:
        # Check if the current parameter is not 'to_logits.weight'.
        # Append the corresponding parameter from param_dict to the decay_param list.

        if param != exclude_param:
            decay_param.append(param_dict[param])

    # Create an empty list called no_decay_param to store the parameters without weight decay.
    no_decay_param = []

    # Iterate over the no_decay list, which contains the names of the parameters without weight decay.
    for param in no_decay:
        # Append the corresponding parameter from param_dict to the no_decay_param list.
        no_decay_param.append(param_dict[param])

    # Create a list called grouped_params that contains two dictionaries.
    # The first dictionary has the decay_param list and the corresponding weight_decay value.
    # The second dictionary has the no_decay_param list and a weight_decay value of 0.0.
    grouped_params = [
        {"params": decay_param, "weight_decay": weight_decay},
        {"params": no_decay_param, "weight_decay": 0.0},
    ]

    # Create a variable called optimizer that stores an instance of the optimizer.
    if optimizer_type == "lion":
        optimizer = Lion(grouped_params, lr=learning_rate, betas=(beta_1, beta_2),)
    elif optimizer_type == "adamw":
        optimizer = AdamW(grouped_params, lr=learning_rate, betas=(beta_1, beta_2),)
    elif optimizer_type == "stable_adamw":
        optimizer = StableAdamWUnfused(
            grouped_params, lr=learning_rate, betas=(beta_1, beta_2),
        )
    else:
        raise ValueError(
            "Invalid optimizer_type. Expected 'lion', 'adamw', or 'stable_adamw', got: {}".format(
                optimizer_type
            )
        )

    # Return the optimizer.
    return optimizer

def build_pre_tokenized():
    d0 = load_dataset("conceptofmind/c4_0-to-20_neox_with_eos_8k", split="train")
    d1 = load_dataset("conceptofmind/c4_21-to-40_neox_with_eos_8k", split="train")
    d2 = load_dataset("conceptofmind/c4_41-to-60_neox_with_eos_8k", split="train")
    d3 = load_dataset("conceptofmind/c4_61-to-80_neox_with_eos_8k", split="train")
    d4 = load_dataset("conceptofmind/c4_81-to-100_neox_with_eos_8k", split="train")
    train_dataset = concatenate_datasets([d0, d1, d2, d3, d4])
    return train_dataset

def main():
    # accelerator
    timeout = InitProcessGroupKwargs(timeout=timedelta(seconds=1_000_000))

    accelerator = Accelerator(
        gradient_accumulation_steps=CFG.GRADIENT_ACCUMULATE_EVERY,
        mixed_precision="bf16",
        log_with="wandb",
        kwargs_handlers=[timeout],
    )

    accelerator.init_trackers(
        project_name="my_model",
        config={
            "batch_size": CFG.BATCH_SIZE,
            "gradient_accumulate_every": CFG.GRADIENT_ACCUMULATE_EVERY,
            "learning_rate": CFG.LEARNING_RATE,
            "seq_len": CFG.SEQ_LEN,
        },
        init_kwargs={"wandb": {"entity": CFG.ENTITY_NAME}},
    )

    accelerator.print(f"Total GPUS: {accelerator.num_processes}")

    # set seed

    set_seed(CFG.SEED)

    # instantiate palm

    model = PaLM(
        num_tokens=50304,
        dim=2028,
        depth=20,
        dim_head=128,
        heads=8,
        flash_attn=True,
    )

    print_num_params(model, accelerator)

    # dataloaders
    train_dataset = build_pre_tokenized()

    train_loader = DataLoader(
        train_dataset, batch_size=CFG.BATCH_SIZE, collate_fn=default_data_collator,
    )

    # optimizer
    optim = decoupled_optimizer(
        model=model,
        learning_rate=CFG.LEARNING_RATE,
        weight_decay=CFG.WEIGHT_DECAY,
        beta_1=0.90,
        beta_2=0.95,
        optimizer_type='adamw',
        use_fsdp=False,
        accelerator=accelerator
    )

    # Determine number of training steps
    max_train_steps = math.ceil(len(train_loader) / CFG.GRADIENT_ACCUMULATE_EVERY)
    accelerator.print(f"Max train steps: {max_train_steps}")

    # lr scheduler
    NUM_WARMUP_STEPS = int(max_train_steps * 0.01)
    accelerator.print(f"Num warmup steps: {NUM_WARMUP_STEPS}")

    lr_scheduler = get_lr_scheduler_with_warmup(
        optimizer=optim,
        scheduler_type="cosine",
        num_warmup_steps=NUM_WARMUP_STEPS,
        max_train_steps=max_train_steps,
        grad_accumulate_every=CFG.GRADIENT_ACCUMULATE_EVERY,
    )

    # prepare
    model, optim, train_loader, lr_scheduler = accelerator.prepare(
        model, optim, train_loader, lr_scheduler
    )

    # checkpoint scheduler
    accelerator.register_for_checkpointing(lr_scheduler)

    max_train_steps = math.ceil(len(train_loader) / CFG.GRADIENT_ACCUMULATE_EVERY)
    accelerator.print(f"Max train steps recalculated: {max_train_steps}")

    # Total batch size for logging
    total_batch_size = (
        CFG.BATCH_SIZE * accelerator.num_processes * CFG.GRADIENT_ACCUMULATE_EVERY
    )
    accelerator.print(f"Total batch size: {total_batch_size}")

    # resume training
    progress_bar = tqdm(
        range(max_train_steps), disable=not accelerator.is_local_main_process
    )
    completed_steps = 0

    if CFG.RESUME_FROM_CHECKPOINT:
        if CFG.RESUME_FROM_CHECKPOINT is not None or CFG.RESUME_FROM_CHECKPOINT != "":
            accelerator.print(f"Resuming from checkpoint {CFG.RESUME_FROM_CHECKPOINT}")
            accelerator.load_state(CFG.RESUME_FROM_CHECKPOINT)
            path = os.path.basename(CFG.RESUME_FROM_CHECKPOINT)
        training_difference = os.path.splitext(path)[0]

        # need to multiply `gradient_accumulation_steps` to reflect real steps
        resume_step = (
            int(training_difference.replace("step_", ""))
            * CFG.GRADIENT_ACCUMULATE_EVERY
        )

    if CFG.RESUME_FROM_CHECKPOINT and resume_step is not None:
        active_loader = accelerator.skip_first_batches(train_loader, resume_step)
        completed_steps += resume_step
        progress_bar.update(resume_step)
    else:
        # After the first iteration though, we need to go back to the original dataloader
        active_loader = train_loader

    # training

    model.train()
    for step, batch in enumerate(active_loader):
        with accelerator.accumulate(model):
            inputs = batch["input_ids"].to(accelerator.device)
            loss = model(inputs, return_loss=True)
            accelerator.backward(loss)

            accelerator.log({"loss": loss.item()}, step=step)

            if accelerator.sync_gradients:
                accelerator.clip_grad_norm_(model.parameters(), 1.0)

            optim.step()
            lr_scheduler.step()
            optim.zero_grad()

        if accelerator.sync_gradients:
            progress_bar.update(1)
            completed_steps += 1

        if isinstance(CFG.CHECKPOINTING_STEPS, int):
            if completed_steps % CFG.CHECKPOINTING_STEPS == 0:
                output_dir = f"step_{completed_steps}"
                if CFG.OUTPUT_DIR is not None:
                    output_dir = os.path.join(CFG.OUTPUT_DIR, output_dir)
                accelerator.save_state(output_dir)

        if completed_steps >= max_train_steps:
            break

    # end training
    accelerator.end_training()

    # save final model
    if CFG.OUTPUT_DIR is not None:
        accelerator.wait_for_everyone()
        unwrapped_model = accelerator.unwrap_model(model)
        with accelerator.main_process_first():
            accelerator.save(
                unwrapped_model.state_dict(), f"{CFG.OUTPUT_DIR}/final/final_model.pt"
            )

if __name__ == "__main__":
    main()

Expected behavior
Resume training from checkpoint.

Can you try installing via main? Aka: pip install git+https://github.com/huggingface/accelerate?
And ideally can you tell us the output of accelerate env?

Can you try installing via main? Aka: pip install git+https://github.com/huggingface/accelerate?
And ideally can you tell us the output of accelerate env?

I will try with main right now. Thank you!

Can you try installing via main? Aka: pip install git+https://github.com/huggingface/accelerate?
And ideally can you tell us the output of accelerate env?

Looks like this is all set from some test runs.
Thank you!
Best,
Enrico

I'm facing the same issue. Without resuming the memory usage is 77/81G on each GPU, and when resuming it gets OOM.

Hi @muellerzr , I'm facing the same issue here. Got OOM when resuming from a checkpoint but it works fine for fresh training. Below is the output of accelerate env:
- `Accelerate` version: 0.34.2
- Platform: Linux-6.1.115-126.197.amzn2023.x86_64-x86_64-with-glibc2.34
- `accelerate` bash location: /home/yumengll/miniforge3/envs/ldm-diffusers/bin/accelerate
- Python version: 3.11.11
- Numpy version: 2.2.0
- PyTorch version (GPU?): 2.4.0 (True)
- PyTorch XPU available: False
- PyTorch NPU available: False
- PyTorch MLU available: False
- PyTorch MUSA available: False
- System RAM: 1999.96 GB
- GPU type: NVIDIA H100 80GB HBM3
- `Accelerate` default config:
        Not found

Thank you in advance!


Polyline geometry DOM

🎉 New feature

Closes https://github.com/ignitionrobotics/sdformat/issues/296

Summary

Expose polylines through the C++ API.
Polyline is different from other geometries because the user can specify more than one of them. So I'm proposing here an API that's slightly different and returns an std::vector<> as opposed to the raw pointers returned for the other geometries. The API will look slightly different from other geometries, but I think it would need to be different anyway.
Test it

See the added tests. I'll also open a Gazebo PR soon.
Checklist

[x] Signed all commits for DCO
[x] Added tests
[ ] Added example and/or tutorial
[x] Updated documentation (as needed)
[x] Updated migration guide (as needed)
[x] codecheck passed (See contributing)
[x] All tests passed (See test coverage)
[x] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

Codecov Report

Merging #1000 (3df3d3a) into sdf9 (1491d72) will decrease coverage by 44.10%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             sdf9    #1000       +/-   ##
===========================================
- Coverage   87.58%   43.47%   -44.11%
===========================================
  Files          63        1       -62
  Lines        9963       23     -9940
===========================================
- Hits         8726       10     -8716
+ Misses       1237       13     -1224

Impacted Files
Coverage Δ

src/Geometry.cc

src/Frame.cc

src/NavSat.cc

src/Noise.cc

src/Box.cc

src/Camera.cc

include/sdf/Element.hh

src/Exception.cc

src/Param.cc

src/Model.cc

... and 54 more

Continue to review full report at Codecov.

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

Polyline is different from other geometries because the user can specify more than one of them.

This is correct, but I noticed that the required attribute is 0 instead of * in the spec where the poly line is included:

https://github.com/ignitionrobotics/sdformat/blob/sdf12/sdf/1.9/geometry.sdf#L17

I guess this shows that we aren't following that attribute very closely, but perhaps we can update the spec to match the actual usage? (ie. I'm suggesting we change the required value from 0 to * on that line and in the other sdf/1.* folders)

This is correct, but I noticed that the required attribute is 0 instead of * in the spec where the poly line is included:

I noticed that too. I think the required symbols can be a bit confusing, because * means "zero or more elements are required". I guess it would be clearer if it didn't have the word "required" 🤔
https://github.com/ignitionrobotics/sdformat/blob/12e77821af7c2810c4d9d532ee8cb833cbb8e318/include/sdf/Element.hh#L109-L113

I think the required symbols can be a bit confusing,

Ticketed an issue here: https://github.com/ignitionrobotics/sdformat/issues/1002

I'm suggesting we change the required value from 0 to * on that line

@scpeters , after you read that issue, I'd appreciate some feedback on whether you still think we should go ahead with this or if we should improve those required symbols before making any large changes like that.

I think the required symbols can be a bit confusing,

Ticketed an issue here: Enforce required elements #1002

I'm suggesting we change the required value from 0 to * on that line

@scpeters , after you read that issue, I'd appreciate some feedback on whether you still think we should go ahead with this or if we should improve those required symbols before making any large changes like that.

that's a fair point; let's not make any changes here to the spec


Moving Exceptions Part 5

Fixes: #922
Problem: Currently exception classes are scattered all over SDK, this will lead to unecessary duplication and confusion. Vlan tests will fail when there was a specified vlan already and if 1.1 interface is in use.
Analysis:
Removed the following exceptions from resource.py:
*ExclusiveAttributesPresent
*MissingUpdateParameter
*RequestParamKwargCollision
*KindTypeMismatch
*DeviceProvidesIncompatibleKey
*InvalidResource
corrected imports whenever needed. Corrected vlan tests to accommodate existence of other vlans.
Tests:
Flake8
Unit
Functional

failures are related to jenkins, tests pass locally, merging


Add circleci build test integration

Add circleci build test integration

Receiving error on build. Could be an issue with docker.. https://circleci.com/gh/universelabs/polypropylene/29

From: Guy Lepage<EMAIL_ADDRESS>Date: Thu, Nov 15, 2018 at 4:17 PM
Subject: Re: [CircleCI] Re: Repository not appearing in Organization
To: CircleCI<EMAIL_ADDRESS>WHOA! Some really weird stuff is going on now..
The repository is not showing up in the left column. Nor in the “Workflows” section. Strange.

From: Guy Lepage<EMAIL_ADDRESS>Date: Thu, Nov 15, 2018 at 4:08 PM
Subject: Re: [CircleCI] Re: Repository not appearing in Organization
To: CircleCI<EMAIL_ADDRESS>It was automatically added there but about 5 minutes ago I unfollowed it, logged out and logged back in. I was still following the projects somehow. But just now when I clicked your link I am unfollowed. Let me try and set it up. :)
From: CircleCI<EMAIL_ADDRESS>Date: Thu, Nov 15, 2018 at 4:06 PM
Subject: [CircleCI] Re: Repository not appearing in Organization
To: Guy Lepage<EMAIL_ADDRESS>Hello Guy,
My apologies if this sounds obvious, have you yet tried to add the project under the new org?
https://circleci.com/add-projects/gh/universelabs
Kyle Tryon
Support Engineer @ CircleCI
From: CircleCI<EMAIL_ADDRESS>Date: Thu, Nov 15, 2018 at 4:02 PM
Subject: [CircleCI] Re: Repository not appearing in Organization
To: Guy Lepage<EMAIL_ADDRESS>Hello Guy,
I believe I may have an idea of what's going on here. Please allow me to confirm with our team and we'll get right back to you.
Kyle Tryon
Support Engineer @ CircleCI
From: CircleCI<EMAIL_ADDRESS>Date: Thu, Nov 15, 2018 at 3:03 PM
Subject: [Request Received] - Repository not appearing in Organization
To: Guy Lepage<EMAIL_ADDRESS>
Guy Lepage
Nov 15, 12:03 PST

I transferred a GitHub repository, polypropylene (not to be confused with "polyethylene"), from my personal (guylepage3) GitHub account to my universelabs GitHub account.

I setup my config.yml file correctly for the polypropylene repository, but it's not working as the polypropylene repository is not appearing in my CircleCI "universelabs" account that I transferred it too. It does not show the repository here.. https://circleci.com/gh/organizations/universelabs/settings#projects

Can someone please assist with getting that repository to show in my CircleCI account and no longer in my personal (guylepage3) CircleCI account? Thank you.

This ticket includes a secure attachment. Use this link to access the attached files: https://circleci.sendsafely.com/receive/?thread=NJM4-T9AV&packageCode=x4CyEQxXWCMHbSp7gj4WqECuHPGgUArIjqqQvS5DSaM#keyCode=g_x-Q2La5IpxSuKp2CMwqJk94XWhD4LnA_Q6e9De7fQ

Item is now resolved..


Emissives can be seen through vehicles

Any emissive such as lights or any markers can be seen through the vehicle. I tried set simplepassive_alpha 255, but it doesn't appear to have an effect.

Does this happens with SimplePassive disabled?

No it does not

https://github.com/justalemon/SimplePassive/blob/9c8538d5a4579e4463e22228cb86d932d5535f23/SimplePassive.Client/Passive.cs#L75
Rather than setting the alpha to 255, you could use RESET_ENTITY_ALPHA. Resetting the alpha does resolve the problem.

I'm going to try to use RESET_ENTITY_ALPHA and see what happens.
I'm also going to add a convar that completely disables the alpha changes, so the alpha of the entities will not be changed.

ec710287facbab79b1a770927bd9dc6c12a65456 uses RESET_ENTITY_ALPHA instead of SET_ENTITY_ALPHA to set the visibility of the entities to the maximum.
Can you see if this fixes your problem? You can download a test build from https://ci.appveyor.com/project/justalemon/simplepassive/builds/33188713/artifacts.

The 6 lights on the center would be visible thru entities.

That is no longer the case:

(Sorry about the low quality pics, my PC is trash)


Support sharing on BlueSky

Is your feature request related to a problem? Please describe.
I would like the ability to share things on BlueSky using a "Share with BlueSky" button.
Describe the solution you'd like
I would want a new field in the user database to specifically hold the BlueSky address and for buttons to either replace or be added next to the "Share on Twitter" buttons.
Describe alternatives you've considered
We have yet to migrate Twitter to the new name, and the current CEO of Twitter's values do not align with FreeCodeCamp's. I would love for us to replace the buttons in their entirety in all of our platforms. But if campers prefer having a "Share on Twitter" button , we can have both buttons.
Additional context
Steam currently lists out BlueSky accounts and the platform is gaining reasonable traction. I believe it is relevant.

I think the places where we have share on twitter are:

when you complete a challenge
on the certificate
sharing an article on /news

I may be missing something

I think the results on LearnToCode and DeveloperQuizSite projects should be included in this list.

I think it is a little too early to include this in the main platform. It might just turn out to be something like Mastodon, which turned out to be a failed product as well.

I do think we can add this functionality now. I'm closing this in favor of https://github.com/freeCodeCamp/freeCodeCamp/issues/54572


Reentrancy while redeeming tokens can be used to steal funds

Added private var chamberLocked at chambers for chambersNonReentrant modifier.
Created lockChamber | unlockChamber functions that are only callable by wizards.
Added chambersNonReentrant modifier to updateQuantities function at Chamber.
Added generic nonReentrant modifier to withdrawTo function at Chamber.
issue | redeem functions at IssuerWizard now locks updateQuantities at Chamber.
Created Reentrancy test from audit pocs with checks to make sure that the issue is fixed.
Check Effect Interaction pattern for issue function at IssuerWizard.


../go/pkg/mod/github.com/templexxx/cpu@v0.1.0/cpu.go:93:14: undefined array length CacheLineSize or missing type constraint

I encountered an error while compiling frp using go. Please tell me how to solve it

Just change the package version in your go.mod to master , then run go mod tidy . Go will automatically upgrade the cpu package to the latest version of the master branch.


Mapping WMR (HP Reverb 2) controllers to memory buffer changes.

Hi.
I have access to HP Reverb 2 and i decided to map memory signalls to controllers functionality. This is not full list but i will try to find all functionalities c: buffer[] is name directly taken from source code. L means left controller, R means right.
buffer[1] = L{joy_click = 1;  win_button = 2; menu_button = 4; rear_button = 8}
buffer[2] = L{joy_x = [0,255]}
buffer[3] = L{joy_y = [0,255]}
buffer[5] = L{throttle_front = [0,255]}
buffer[6] = L{throttle_rear = [0,255]}
buffer[7] = L{y = 1; x = 2}
buffer[8] = {???}
buffer[9] = {???}
buffer[10] = {???}
buffer[11] = R{conroller_camera_detetction [0-255; 0 - not see; 255 - see]}
buffer[12] = {???}
buffer[14] = both_conrollers_camera_detecion [0-255; 0 - not see; 255 - both see; if one is seen msg is 0,255,0,255]
buffer[16] = {controllers_are_in_sleep_mode = high [0-255]}
buffer[17] = {??? something with gogles?}
buffer[18] = {???}
buffer[33 - 44] = {if any controller turn on = 0; else nothing; shorly before disabling and enabling - value >0; [0-255]}
buffer[45] = {if any controller turn on - high value; else nohing; [0-255]};
Hope this will be helpfull C:

This looks like you're referring to the controller report coming from the headset.
The WMR driver in Monado is much further advanced than the OpenHMD one. It supports 6DOF headset tracking, and 3DOF controller with some WMR headsets. I have a WIP branch for supporting G2 controllers here https://gitlab.freedesktop.org/thaytan/monado/-/tree/dev-wmr-HP-G2-tunnelled-controller
I don't plan on working on the OpenHMD WMR driver.


[Group 2][Accessible Pressable] Migrate ResendValidationForm

HOLD on https://github.com/Expensify/App/issues/16988
Description
Migrate ResendValidationForm to use PressableWithFeedback

Triggered auto assignment to @strepanier03 (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero process steps for feature requests for more details.

Hi @roryabraham can you assign me to this one?

This is done


Analyzers running against files in bin folder

The new analyzers feature keeps picking up loose .cs files that are scripts for the runtime application. Typically this only happens after a build operation has occurred, i assume a file watcher is picking it up at this point and is not honoring the omnisharp searchexcludes.
Visual Studio Enterprise does not have this issue.
OmniSharp server started.
Path: C:\Users\ChrisBaird.AzureAD.vscode\extensions\ms-vscode.csharp-1.20.0.omnisharp\1.33.0\OmniSharp.exe
PID: 19648
    Starting OmniSharp on Windows 6.2.9200.0 (x64)

    DotNetPath set to dotnet

    Located 4 MSBuild instance(s)
        1: Visual Studio Professional 2019 16.0.28803.156 - "d:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"
        2: Visual Studio Enterprise 2017 15.9.28307.718 - "d:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin"
        3: Visual Studio Enterprise 2019 16.1.29102.190 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
        4: StandAlone 15.0 - "C:\Users\ChrisBaird.AzureAD\.vscode\extensions\ms-vscode.csharp-1.20.0\.omnisharp\1.33.0\.msbuild\Current\Bin"

Does this happen if analyzers are disabled? (You probably must add syntax error for .cs files when disabled)
It could be that "misc .cs" files that have special case doesn't get correctly filtered

Interestingly, when I set "enableAnalyzersSupport": false, the only problems from the loose script files in the bin folders are CS prefixed errors and warnings (CS0103 and CS0436 for example). All the stylecop, codeanalysis and sonarcube errors are no longer displayed.
These are the analyzers in the .csproj
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.1.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="3.1.0"/>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All"/>
<PackageReference Include="SonarAnalyzer.CSharp" Version="<IP_ADDRESS>72" />


Add Linter for checking license headers on source files

Problem statement
We have not linter for project source code files. In some places, we have a license header in some places we have not a license. Besides some files could have not actual license header.
Solution
Use linter for license headers on CI on static-code-analysis stage.

@nickolaev related to this problem, I have the next questions:

What kind license header we should use? I found some headers here https://github.com/networkservicemesh/networkservicemesh/tree/master/conf , but I'm not sure what is header should be used.

So I see 2 issues here:

exsiting files which lack Licenses. I suggest on these we get a generic header not decalring any company copyright.

newly added and/or changed files. These should be verified thorugh the linter for missing headers. The actual License header shoudl be added by the author(s) of that change

@edwarnicke how does this sound to you?

@nickolaev the linter which I will try to use provides it possible to detect the author of the file and apply the needed header. But I need examples of valid headers for companies that used in the project to configure linter.
Also, I need to know what the header should be used by default.

In addition, should we add license headers for test files?

IMO each source file shoudl have a License header.

I just wrote a script to find all the headers used in the project. Let me know what is headers we should support.
// Copyright (c) YEAR Cisco and/or its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Copyright YEAR VMware, Inc.
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Copyright YEAR Red Hat, Inc.
// Copyright (c) YEAR Cisco and/or its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Copyright (c) YEAR Cisco and/or its affiliates.
// Copyright (c) YEAR Red Hat Inc. and/or its affiliates.
// Copyright (c) YEAR VMware, Inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Copyright YEAR Red Hat, Inc.
// Copyright (c) YEAR Cisco and/or its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

IMO each source file shoudl have a License header.

That would be ideal.
We can get to a first step by linting for new files that don't have license headers.

@edwarnicke sounds OK, what is default header should be?

@denis-tingajkin Since we are only checking new .go files for the presence or absence of a header we only need to produce a failure and a good recommendation as to what to do.
So basically indicate to them to use header:
// Copyright (c) YEAR COPYRIGHTHOLDER
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

But don't accept it unless both YEAR and COPYRIGHTHOLDER have been replaced.

@edwarnicke got it

@nickolaev Sound good to you as a starting place?  It doesn't fix all the existing files, but it does preclude new ones without Copyright.

@denis-tingajkin @edwarnicke, I do agree with the proposed template and the overall approach,. However the YEAR could be anything like "2018" or "2018,2019" or even "2018-2019".
Then

@denis-tingajkin @edwarnicke, I do agree with the proposed template and the overall approach,. However the YEAR could be anything like "2018" or "2018,2019" or even "2018-2019".
Then you can have multiple companies for COPYRIGHTHOLDER. I am saying this in case there is a regular expression in place that can handle these cases.

@nickolaev You good with 'separate line per copyright holder' ?


fix(UI): select svg icon size

Issue:
What I did
How to test

Deploy preview for mcs-lite-ui ready!
Built with commit 2530f52c33df127c093d9974d571e7ac907d97c7
https://deploy-preview-596--mcs-lite-ui.netlify.com

Deploy preview for mcs-lite-introduction ready!
Built with commit 2530f52c33df127c093d9974d571e7ac907d97c7
https://deploy-preview-596--mcs-lite-introduction.netlify.com

Deploy preview for mcslite ready!
Built with commit 2530f52c33df127c093d9974d571e7ac907d97c7
https://deploy-preview-596--mcslite.netlify.com


Cannot read properties of undefined (reading 'length')

I have this action setup in a monorepo (Turbo) and the workflow is throwing an error after reading the coverage.txt file.

Output: coverage.txt

Thanks for the output, I will take a look soon.

I was actually missing an important thing in my jest.config file. This error occurs when you don't have the text-summary option. In my case, I only had the text.
coverageReporters: ['json', 'json-summary', 'text', 'text-summary']
Probably a good idea to mention this in the docs?
Thanks for looking into it though!


89 collapse about components into one and finalize styling

I removed the circle decoration, moved the dark box on the about page to the help page and styled the help page contents to a card, and I styled the about us page to a card format. Everything renders and tests pass.

Merged to may2023

I went through the files and removed unused css styles in Footer.css and style.js, removed the empty App.css file, and removed unused imports. I checked the rendering and test cases.

I have merged this to may2023, while removing Jordan's changes. We can discuss in class.


Fix memory leak on initial requests with HttpObjectAggregator

This PR should fix issue #348. The change is very simple: initial HttpRequests are released if they are ReferenceCounted. However, the reasoning is complicated and requires a non-trivial understanding of netty reference counting, so here's a more detailed explanation of what's happening:
When HttpObjectAggregator is in the pipeline, it generates ReferenceCounted FullHttpRequests (since they have content as well as the request headers). Whereas, when HttpObjectAggregator is not in the pipeline, the HttpRequest does not contain body content and therefore is not ReferenceCounted.
When the ProxyToServerConnection#write() method is called, it always increments ReferenceCounted objects, since netty will automatically decrement them when they are written to the server (and we want to keep them around, since our ClientToProxyConnection will also try to clean them up).  Generally this works fine, even for FullHttpRequests, but it breaks when dealing with the initial request.
For initial HTTP messages, which are eventually written to the server, the ProxyToServerConnection#write() method is called twice: first when the server is disconnected, and then again after the connection is complete. This causes the ReferenceCounted object to be .retain()ed twice, but only released by netty once (when it is actually written to the server).
For initial HTTPS messages (always a CONNECT), which are not written to the server at all, they are only .retain()ed once, when the server is disconnected, then "dropped", since the CONNECT is never written to the upstream server. But since the FullHttpRequest was already retained by the write() method, it must be manually released.

we have verified that this resolves #348. lgtm!

connectionSucceeded will release request,but when connectionfailed happen, it must be also release request! @jekh

@linking12 Hi. I was investigating issue # and encountered your comment.
Can you review my PR that hopefully should fix the issue?


Strange xml format

I did a backup with FreeOTP v2.01.
A backup File externalBackup.xml was created but this does not look like a UTF-8 encoded XML file but contains the following at the heading:
.HashMapÚÁÃ`Ñ F
loadFactorI 	thresholdxp?@     w      t

Can you please explain the output format of the XML file?

the serialized output stream of the tokenBackup.xml shared preferences file, written from

Thank you @justin-stephenson ! Today I started learning FreeOTP and how I may manage my OTP codes. I was looking for a way to save the FreeOTP codes, and I ended up here trying to open the "backup file" created by the app. Im not a Java expert at all. May you (maybe) help us a bit trying to convert the file, at least, in a plain text file? After that I will try to chek by myself on how manage it based on the structure you provided (from source code). Thank you again in advance!

Thank you @justin-stephenson for explanation and @DoctorD90 to temind me on that topic. I was also thinking about decoding the Strukturen. I am more in python but perhaps there is a way to decode structure with a small Java script using the TokenPersistence class.

I was also thinking about decoding the Strukturen. I am more in python but perhaps there is a way to decode structure with a small Java script using the TokenPersistence class.

Well, I'm in python much more me too. I don't know Java at all, and I probably haven't neither the system installed for it. It would be awesome to have the export in a "simple" encrypted xml, so with a simple decryption it would be easy to access to. As I said, my personal target is to get the unencrypted xml, cause Im not able. I will do everything else I need in python :)

Are you trying to export your token secrets from the app to plain text? This is not supported as FreeOTP now stores token secrets in the Android keystore,  for security reasons we don't allow exporting the token secrets outside the backup + restore operations used to transfer tokens to the same, or another FreeOTP app android device.