Sensor, monthly accumulated cost with subsidy AND grid cost

Would it be possible to get a sensor for the monthly accumulated cost with subsidy AND grid cost?
Thanks for your job, this is a great addition to the official tibber sensors! :D

@kongjudas
thanks for your feedback.
I was thinking of an addition to the sensors already provided in the tibber_data, this sensor would come in handy, to show the real cost pr.month. Tibber_data already has a cost sensor and also grid price (if grid company is supported), so why not a total cost sensor (if grid supported).. I would really much appreciate that sensor! :)

@Danielhiversen
Thanks for adding this enhancement to the integration! It has worked great for me.
Would it be possible to also add raw_today attributes to the sensors:

sensor.estimated_total_price_with_subsidy_and_grid_price_x
sensor.subsidy_x


Support multiple from numbers

LGTM assuming tests pass. Just want a little more explanation on the changes you did for tests

yah for sure. I made it so that we actually call the twilio client in testing, bc i want to assert that we're calling it with the spanish or english phone numbers as determined by the client's locale setting. To do this, I thought it would be safest if we always mock out the call, so that we don't have to remember to do it in every test (since we never want to really call the client in testing). So I created a generic way to declare patchings which will be applied before each test runs and reset after each test. The first two patching are for time, which uses our existing MockDateTime impl, and a mocked version of the Twilio client's create method. These two mocks both implement a start() and stop() interface so that we can start them before tests and reset them between tests.


B 17827 move history logs Destination SIT address changes

B-17827
Summary
MilMove office users need to be able to refer to the Move History component for visibility into events. One request was more information regarding SIT address changes, found here in this screenshot.
Because of the nature of SIT address changes, and needing to keep track of the previous address(es), all SIT address changes are INSERTS into the address table. As a result, the entries in the audit_history table do not contain relevant information to the SIT or the MTO, they simply contain the insert into the address table.
The approach I chose to use was to add a trigger to the sit_address_updates table, and retrieve the needed information in move_history_fetcher.sql file. I updated the appropriate front end event related constants, and created MoveHistory event templates for each event.
Origin SIT address changes were addressed by @danieljordan-caci in this commit.
Please note the value displayed for the initial SIT delivery address is NOT necessarily the most recent change to the origin SIT address. The important information to the office user reviewing the information is the updated SIT delivery in relation to the initial SIT that was submitted.
More information on the technical implementation decisions initially made when creating the History and Audit Log can be found here.
Verification Steps for Reviewers
These are to be checked by a reviewer.

[ ] Has the branch been pulled in and checked out?
[ ] Have the BL acceptance criteria been met for this change?
[ ] Was the CircleCI build successful?
[ ] Has the code been reviewed from a standards and best practices point of view?

How to test
(if you have a move accessible in an approvals requested stage, jump to step 6)

Access the application as a customer; create a new HHG move and submit it
Access the application as an office user; login as a services counselor and select the move you created. Fill out required information and Submit move details
Sign out and login in a TOO role; access the move and add service items to the shipment
Sign out and login in a PRIME role; access the move and add service item. Fill out the required information for a Destination SIT and create the service item
Sign out and login in a TOO role; access the move and approve the destination SIT requested service items on the Move task order tab
Sign out and login in a PRIME role; access the move and click Update Service Items. Fill out the Request Destination SIT Address Change form and save
Sign out and login in a TOO role; access the move and navigate to the move history. Note the entry for the destination SIT delivery address change by the PRIME

Navigate to Move task order tab and review the request for the Domestic destination SIT delivery address change. Enter remarks and reject the change.
Navigate back to Move history tab and note the entry for the rejection of the prime's request for destination SIT delivery address change by the TOO

Navigate back to Move task order tab and edit the destination SIT delivery address.
Navigate back to Move history and note the entry for the updated destination SIT delivery address by the TOO

Sign out and login in a PRIME role; access the move and click Update Service Items. Fill out the Request Destination SIT Address Change form and save
Sign out and login in a TOO role; navigate to the Move task order tab and accept the request to update destination SIT delivery address.
Navigate to move history tab and note the entry approving the requested destination SIT delivery change

Warnings

:warning:
Please add the JIRA issue key to the PR title (e.g. MB-123)

  Generated by :no_entry_sign: dangerJS against c6a3373cbc2b7a6c7dbd7a27e33dd2b804e981de

I tried updating a service item as a prime user and It causes my session to crash. Attached console output.

The audit_history table only cares about these three actions:

UPDATE
INSERT
`DELETE``

Anytime those actions are performed, a row is added to the table and stores an event_name to the table (which is the name of an API call associated with the action). Looking at your AC:

TOO editing SIT destination delivery address or -SIT origin pickup- address

This can have the event name of updateMTOShipment if not providing a final address
If it's a final address specifically for delivery, then they need to request it first

TOO approving a Prime request to change SIT destination delivery address

This has the event name of approveSITAddressUpdate

TOO rejecting a Prime request to change SIT destination delivery address

This has the event name of rejectSITAddressUpdate

Prime has submitted a request to change SIT destination delivery address

This has the event name of createSITAddressUpdateRequest

When considering the Audit Log, each event name can have it's own component that renders. Have you looked into this? Did you run into any issues? You could render different components (AKA different text formatting, displays, etc) based on what the value in the changed_data column reads.

I know that's a little vague, but you can find some direction in src/constants/MoveHistory/EventTemplates/index.js:
export { default as acknowledgeExcessWeightRisk } from './AcknowledgeExcessWeightRisk/acknowledgeExcessWeightRisk';
export { default as approveShipment } from './ApproveShipment/approveShipment';
export { default as approveShipmentDiversion } from './ApproveShipmentDiversion/approveShipmentDiversion';
export { default as createBasicServiceItem } from './UpdateMoveTaskOrderStatus/createBasicServiceItem';
export { default as createMTOServiceItem } from './CreateMTOServiceItem/createMTOServiceItem';
export { default as createMTOServiceItemCustomerContacts } from './CreateMTOServiceItem/createMTOServiceItemCustomerContacts';
export { default as createMTOServiceItemDimensions } from './CreateMTOServiceItem/createMTOServiceItemDimensions';
export { default as createMTOShipment } from './CreateMTOShipment/createMTOShipment';
export { default as createAddresses } from './UpdateAddress/createAddress';
export { default as createMTOShipmentAgent } from './UpdateMTOShipment/createMTOShipmentAgent';
export { default as createOrders } from './CreateOrders/createOrders';
export { default as createEntitlements } from './CreateOrders/createEntitlements';
export { default as createMoves } from './CreateOrders/createMoves';
export { default as createPaymentRequest } from './CreatePaymentRequest/createPaymentRequest';
export { default as createPaymentRequestReweighUpdate } from './UpdateReweigh/createPaymentRequest';
export { default as createPaymentRequestShipmentUpdate } from './UpdateMTOShipment/createPaymentRequestShipmentUpdate';
export { default as createReweighRequestWeightUpdate } from './UpdateMTOShipment/createReweighRequestWeightUpdate';
export { default as createStandardServiceItem } from './ApproveShipment/createStandardServiceItem';
export { default as deleteShipment } from './DeleteShipment/deleteShipment';
export { default as proofOfServiceDocUpload } from './CreateUpload/proofOfServiceDocUpload';
export { default as requestShipmentCancellation } from './RequestShipmentCancellation/requestShipmentCancellation';
export { default as requestShipmentDiversion } from './RequestShipmentDiversion/requestShipmentDiversion';
export { default as requestShipmentReweigh } from './RequestShipmentReweigh/requestShipmentReweigh';
export { default as setFinancialReviewFlag } from './SetFinancialReviewFlag/setFinancialReviewFlag';
export { default as submitMoveForApproval } from './SubmitMoveForApproval/submitMoveForApproval';
export { default as updateAllowance } from './UpdateAllowances/updateAllowance';
export { default as updateBillableWeight } from './UpdateBillableWeight/updateBillableWeight';
export { default as updateBillableWeightAsTIO } from './UpdateBillableWeight/updateBillableWeightAsTIO';
export { default as updateBillableWeightRemarksAsTIO } from './UpdateBillableWeight/updateBillableWeightRemarksAsTIO';
export { default as updateMoveTaskOrderStatus } from './UpdateMoveTaskOrderStatus/updateMoveTaskOrderStatus';
export { default as updateMTOServiceItem } from './UpdateMTOServiceItem/updateMTOServiceItem';
export { default as updateMTOShipment } from './UpdateMTOShipment/updateMTOShipment';
export { default as updateMTOShipmentAgent } from './UpdateMTOShipment/updateMTOShipmentAgent';
export { default as updateMTOShipmentDeprecatePaymentRequest } from './UpdateMTOShipment/updateMTOShipmentDeprecatePaymentRequest';
export { default as reweighPaymentRequest } from './UpdateReweigh/updatePaymentRequest';
export { default as updateOrder } from './UpdateOrders/updateOrder';
export { default as updatePaymentRequest } from './UpdatePaymentRequest/updatePaymentRequest';
export { default as updatePaymentRequestJobRunner } from './UpdatePaymentRequest/updatePaymentRequestJobRunner';
export { default as updatePaymentRequestStatus } from './UpdatePaymentRequestStatus/updatePaymentRequestStatus';
export { default as updateReweighWeight } from './UpdateReweigh/updateReweighWeight';
export { default as updateServiceItemStatus } from './UpdateServiceItemStatus/updateServiceItemStatus';
export { default as updateMTOReviewedBillableWeightsAt } from './UpdateMTOReviewedBillableWeightAt/updateMTOReviewedBillableWeightsAt';
export { default as uploadAmendedOrders } from './UploadAmendedOrders/uploadAmendedOrders';
export { default as updateMTOShipmentStatus } from './UpdateMTOShipmentStatus/updateMTOShipmentStatus';
export { default as updateMTOServiceItemMoveStatus } from './CreateMTOServiceItem/createMTOServiceItemUpdateMoveStatus';
export { default as updateMoveEstimatedExcessWeight } from './UpdateMTOShipment/updateMTOShipmentPrimeEstimatedExcessWeight';
export { default as updateMTOStatusServiceCounselingCompleted } from './UpdateMTOStatusServiceCounselingCompleted/updateMTOStatusServiceCounselingCompleted';
export { default as updateAllowanceByCounselor } from './UpdateAllowances/updateAllowanceByCounselor';
export { default as updateServiceMemberByCounselor } from './UpdateServiceMember/updateServiceMemberByCounselor';
export { default as updateServiceMemberByTOO } from './UpdateServiceMember/updateServiceMemberByTOO';
export { default as createServiceMember } from './CreateServiceMember/createServiceMember';
export { default as patchServiceMember } from './PatchServiceMember/patchServiceMember';
export { default as updateAddress } from './UpdateAddress/updateAddress';
export { default as createUpload } from './CreateUpload/createUpload';
export { default as deleteUpload } from './DeleteUpload/deleteUpload';
export { default as updateServiceMemberBackupContacts } from './UpdateServiceMemberBackupContact/updateServiceMemberBackupContact';
export { default as createServiceMemberBackupContacts } from './CreateServiceMemberBackupContact/createServiceMemberBackupContact';
export { default as updateCustomer } from './UpdateCustomer/updateCustomer';
export { default as updateServiceItemSitEntryDate } from './UpdateSITEntryDate/updateSitEntryDate';
export { default as createDestinationSITUpdateRequest } from './CreateSITRequest/CreateSITAddressUpdateRequest';
export { default as approveSITAddressUpdate } from './UpdateSITAddress/ApproveSITAddressUpdate';
export { default as rejectSITAddressUpdate } from './UpdateSITAddress/RejectSITAddressUpdate';
export { default as createSITAddressUpdate } from './UpdateSITAddress/CreateSITAddressUpdate';

Each one of these represents an event_name in the audit_history table. So if that event was used in the move's history, then the specific component listed in the path renders.
So for updateMTOShipment event, it renders just a bland component:
export default {
  action: a.UPDATE,
  eventName: o.updateMTOShipment,
  tableName: t.mto_shipments,
  getEventNameDisplay: () => 'Updated shipment',
  getDetails: (historyRecord) => <LabeledDetails historyRecord={formatChangedValues(historyRecord)} />,
};

You could check what gets returned in the historyRecord and the changedValues object and render specific components based off of that, but honestly if we are talking about SIT destination delivery updates from the TOO - that'd be an easy check:

Check if destination_address_id is in changedValues
If so, render this component that displays the address (similar to what the updateAddress.jsx component is doing in src/constants/MoveHistory/EventTemplates/UpdateAddress

I'm not saying this is what you need to do, but this is what is currently being done for other move history logs and events. Let me know if ya got questions.

I tried updating a service item as a prime user and It causes my session to crash. Attached console output.

Seems like the final_destination_address_id column is empty for a service item in that shipment when it shouldn't be maybe?

@danieljordan-caci thanks for all the info! I will give it a more thorough read, but upon a once over, I think I employed most of what you described in my approach. I think the biggest obstacle was that address changes for destination SITs are all inserts into the address table, not updates. So the old_data column returned from the DB is blank, and the changed_data column doesn't have anything relevant to the SIT/Move. A destination SIT address update made by a TOO looks like this in our audit logs currently

and 'sit_destination_final_address_id' (the column updated on the mto_service_items table) is an ignored column on our trigger

@danieljordan-caci thanks for all the info! I will give it a more thorough read, but upon a once over, I think I employed most of what you described in my approach. I think the biggest obstacle was that address changes for destination SITs are all inserts into the address table, not updates. So the old_data column returned from the DB is blank, and the changed_data column doesn't have anything relevant to the SIT/Move. The old_data and changed_data columns for a destination SIT address update made by a TOO look like this in our audit logs currently

and sit_destination_final_address_id of mto_service_items table is an ignored column on our trigger, so that doesn't populate this particular action in our logs either

So when you're signed in as the TOO and update either the pickup/delivery address, what is the event_name that populates in the audit_history table?

@danieljordan-caci thanks for all the info! I will give it a more thorough read, but upon a once over, I think I employed most of what you described in my approach. I think the biggest obstacle was that address changes for destination SITs are all inserts into the address table, not updates. So the old_data column returned from the DB is blank, and the changed_data column doesn't have anything relevant to the SIT/Move. The old_data and changed_data columns for a destination SIT address update made by a TOO look like this in our audit logs currently

and sit_destination_final_address_id of mto_service_items table is an ignored column on our trigger, so that doesn't populate this particular action in our logs either

So when you're signed in as the TOO and update either the pickup/delivery address (are you just updating the shipment address?), what is the event_name that populates in the audit_history table?

This is just for the destination SIT address changes. The event name for a TOO changing the destination SIT address is createSITAddressUpdate

I tried updating a service item as a prime user and It causes my session to crash. Attached console output.

Seems like the final_destination_address_id column is empty for a service item in that shipment when it shouldn't be maybe?

That's what I'm seeing at this point. I've been able to get past this issue when using own profile rather than the pre-existing ones in dev.

I tried updating a service item as a prime user and It causes my session to crash. Attached console output.

Seems like the final_destination_address_id column is empty for a service item in that shipment when it shouldn't be maybe?

That's what I'm seeing at this point. I've been able to get past this issue when using own profile rather than the pre-existing ones in dev.

Yeah some of that test data needs to be addressed and adjusted to include some fields to avoid silly errors like this. Oh well.

@danieljordan-caci Updated with comments
@joeydoyecaci Updated with changes per your comments
Please give them a once over when convenient


Limit file upload size on client-side

I know there are good reasons for validating file upload size on the server-side as well as the client-side, but for usability I'd like to check the size of a file upload before saving a form.
I have a form definition for collecting images:
<h:html xmlns="http://www.w3.org/2002/xforms"                                                                                xmlns:h="http://www.w3.org/1999/xhtml"                                                                                xmlns:ev="http://www.w3.org/2001/xml-events"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:jr="http://openrosa.org/javarosa">
    <h:head>
        <h:title>Photos - Demo Form</h:title>

        <model>
            <instance>
                <photos id="photos">
                    <my_photo/>
                    <meta>
                        <instanceID/>
                    </meta>
                </photos>
            </instance>

            <bind nodeset="/photos/my_photo" type="binary"/>
        </model>
    </h:head>

    <h:body>
        <upload ref="/photos/my_photo" mediatype="image/*">
            <hint>Select a picture or take a photo</hint>
            <label>Image widget</label>
        </upload>
    </h:body>
</h:html>

Things I've tried
1. Override FormModel.prototype.types.binary.validate
Unfortunately due to https://github.com/enketo/enketo-core/blob/master/src/js/Form-model.js#L1565-L1569, validate() is never actually called for binary input fields.
Even if it were called, validate() is only passed the "value" of the field, which for an <input type="file"> is actually the name of the file.  What we would actually need access to is that.nodes[0].files to access e.g. that.nodes[0].files[0].size
2. Add a photo input widget
Adding custom validation in a widget:
    …
    Photowidget.prototype._init = function() {
        var $el = $( this.element );
        $el.on('change', function() {
            var i, tooBig, $this;

            for ( i = 0; i < this.files.length; ++i ) {
                if ( this.files[ i ].size > MAX_FILE_SIZE ) {
                    tooBig = true;
                }
            }

            if ( tooBig ) {
                …TODO mark this field as invalid so that constraint message is displayed…
            }
        });
    };
    …
    module.exports = {
        'name': pluginName,
        'selector': 'input[type=file][accept="image/*"]',
    };
    …

Adding a warning in HTML from the widget seems trivial, but there doesn't seem to be a simple way of invalidating the corresponding field in the model.

Is there a simple way to impose a size constraint on a binary field in the current version of Enketo?
If not, do you have any suggestions for how it might be achievable?

Hi @alxndrsn,
The scaffolding to restrict file sizes is built-in but it happens at the widget level.

https://github.com/enketo/enketo-core/blob/master/src/widget/file/filepicker.js#L141 calls getFileUrl()
The filemanager is meant to be overwritten by the application. It has an example _isTooLarge function. This is how we've done it in Enketo Express: https://github.com/kobotoolbox/enketo-express/blob/master/public/js/src/module/file-manager.js

The reason this is best done before actually populating the model (and therefore not using validate() is that invalid values would still be stored. The current way is similar to how a browser prevents text input into a number field.

This is really great, thanks!
I don't think I'd need to change anything in file-manager.js except for the max file size.  If there was a simple way to override just this function, then that would be interesting to me.  Currently I am using the following patch:
*** 159,165 ****
   * @return {Boolean}      [description]
   */
  function _isTooLarge( file ) {
!     return false;
  }

  module.exports = {
--- 159,165 ----
   * @return {Boolean}      [description]
   */
  function _isTooLarge( file ) {
!     return file && file.size > 32 * 1024;
  }

  module.exports = {

Also, simply adding the filepicker widget to my app seems slightly different to the demo at https://enke.to/x/#widgets:

Am I doing something obviously wrong, or is there further custom code I should be writing?

Let's expose isTooLarge (and remove the underscore). Makes sense. I guess my thinking was the whole thing would always be replaced with one that used local storage (e.g. to load an existing record with images).
In your screenshot, it looks like there is perhaps a CSS issue. Is the filepicker css file included?

Let's expose isTooLarge (and remove the underscore).

Sounds great, thanks!

In your screenshot, it looks like there is perhaps a CSS issue. Is the filepicker css file included?

Yes exactly - I remembered to add the widget, but forgot the CSS.  Thanks again 🙂

Let's expose isTooLarge (and remove the underscore).

Let me know if a PR would be appreciated.

Please do, since it nicely combines with https://github.com/enketo/enketo-core/issues/466. 👍
I need to look up that albatross sketch now, as I don't know it and am intrigued!

Any chance of getting a release soon containing this fix?

Yes, sorry. I'll try to look at PR today or tomorrow and create a release immediately after merging

Oh, I got confused. This is already merged... I will release a new version today! With or without the translation PR.

Thanks!

As you probably noticed I actually still forgot to do it yesterday... Sorry about that. It was finally done this morning.

Can't say I noticed :¬)


not loading more after connected to the internet again

not loading more after getting connected again

Please watch this video for this library
https://youtu.be/c0nKjMnDfG4


Initial import of MVM/SparkJava/gcloud-java example

This example shows how to use SparkJava from a Managed VM.  The sample is a webpage that interfaces with Cloud Datastore using gcloud-java.

Travis build using JDK7 is failing because this sample uses Java 8 lambdas.  Switching this example to use Java 7 will require downgrading the SparkJava version from version 2 to 1.  Do you think modifying the sample to use SparkJava v1 instead v2 is the way to go @ludoch @lesv?

No, the point of this sample is to use Java8 and the latest sparkjava.
On Wed, Jan 6, 2016 at 1:31 PM, Ajay Kannan<EMAIL_ADDRESS>wrote:

Travis build using JDK7 is failing because this sample uses Java 8
lambdas. Switching this example to use Java 7 will require downgrading the
SparkJava version from version 2 to 1. Do you think modifying the sample to
use SparkJava v1 instead v2 is the way to go @ludoch
https://github.com/ludoch @lesv https://github.com/lesv?
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/java-docs-samples/pull/51#issuecomment-169469193
.

Do we know if/when we can up the Java version to Java 8 for Travis CI?  If that will take a while, then I see two alternatives (provided that we keep using the latest sparkjava):

Not run this app's tests via Travis CI now.  We can keep the test code around and remove sparkjava from the list of modules, so that we have access to the code for manual testing.  We can also create an issue to integrate this app with Travis.
Wait on placing this app in this repository.

I'm in favor option 1, unless we can update the Java version in CI to 8 soon.  What are other people's opinions?

https://blog.travis-ci.com/2013-11-26-test-your-java-libraries-on-java-8/
On Wed, Jan 6, 2016 at 5:17 PM, Ajay Kannan<EMAIL_ADDRESS>wrote:

Do we know if/when we can up the Java version to Java 8 for Travis CI? If
that will take a while, then I see two alternatives (provided that we keep
using the latest sparkjava):

Not run this app's tests via Travis CI now. We can keep the test code
around and remove sparkjava from the list of modules, so that we have
access to the code for manual testing. We can also create an issue to
integrate this app with Travis.
Wait on placing this app in this repository.

I'm in favor option 1, unless we can update the Java version in CI to 8
soon. What are other people's opinions?
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/java-docs-samples/pull/51#issuecomment-169515621
.

Added a commit that uses jdk8 to run CI.

LGTM


[Question] What does it mean "Change notify component to autoload " in 1.2.4?

What does it mean? "Change notify component to autoload - You may have to remove existing notify configuration to avoid _2 service" Shall I delete the entry in configuration.yaml for notify.alexa_media?

Yes you can. It should automatically create it now. I didn't test what happens if you left it in so wasn't sure if it's caused duplicate services.

Correct, if you use the new notify targets you do not have to specify target.

hi,
where it write the new notify service? i dont see nothing in my configuration yaml....

hi,
where it write the new notify service? i dont see nothing in my configuration yaml....

It's a service, so you can use it into your configuration.yalm. Check your services in HA Developer tools - Services.


19361 - UXA  add Returned Undeliverable to FAS

Issue #: /bcgov/entity19361
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

package + package lock update please


add spaces to the commodity code

Desktop view:

Mobile view:

 [TARIFF17] Add spaces to the commodity code to make it easier to read for traders who only need exporting codes (8 digits)

 [TARIFF17] Add spaces to the commodity code to make it easier to read for traders who only need exporting codes (8 digits)


Add VehicleType startDepot and endDepot fields and use those everywhere

This PR:

[ ] Part of #5. This PR is a step towards multiple depots.
[ ] Adds and passes relevant tests.
[ ] Has well-formatted code and documentation.

Notes:

It is essential that you add a test when making code changes.
This keeps the code coverage level up, and helps ensure the changes work as intended.
When fixing a bug, you must add a test that would produce the bug in the master branch, and then show that it is fixed with the new code.
New code additions must be well formatted. Changes should pass the pre-commit workflow, which you can set up locally using pre-commit.
Docstring additions must render correctly, including escapes and LaTeX.

We first need to move all uses of 0 for the start/end depot to using the vehicle's start and end depot. Those will remain hardcoded at 0 in this PR, because I'm pretty sure just replacing all the zeroes is pretty big already. A follow-up PR can then add support for multiple depots and relax that hard-coded 0.


formatOnSave doesn't appear to fix wrapping and whitespace issues when liquid is within quotes or capture tag

I searched existing issues in theme-check-vscode and theme-check and couldn't find this, but apologies if it is somewhere and I failed to find it.
We're finding that formatOnSave is not working for a render tag within quotes, like this:

It also appears not to work if within a capture tag like this:

if it is outside of either of these situations like this:

then upon save it is "correctly" autoformatted to be like this:

My hunch is this is a problem with a theme-check rule, however when I disable  "editor.formatOnSave": false, in VSC and run theme-check on this code, it doesn't raise an issue with any 3 of these scenarios, so I'm opening the issue on the VSC plugin directly.  I'm happy to re-report this in a more appropriate place if someone can point me in the right direction

if this is still an issue please open an issue in the theme tools repo, this repo is no longer the source of truth 🙏 thank you!


OpenWRT not able to login

Describe the problem
Clean installation of gl-inet AR300M with OpenWrt 22.03.4 with their firmware 4.3.17. Installed Netbird https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/netbird_0.28.9-r1_mips_24kc.ipk
Netbird up with setup key says:
Error: login backoff cycle failed: rpc error: code = DeadlineExceeded desc = context deadline exceeded
In the logfile I see:
2024-09-01T20:36:00Z ERRO client/server/server.go:262: failed login: context deadline exceeded
2024-09-01T20:36:00Z ERRO util/grpc/dialer.go:38: Failed to dial: dial: dial tcp ####:443: connect: invalid argument

Seems like a Go problem. Version 0.17 works for OpenWrt but is missing important features. Would be great to get the current version running. Looks like something changed between 0.17 and 0.28.9 with the go implementation to connect to the management server.
To Reproduce

Fresh firmware on gl-inet AR300M
Download netbird package from the snapshot tree
install netbird
run netbird up with setup-key
wait until it times out and read the above error msg

Expected behavior
It should just connect, like it does with 0.17
Are you using NetBird Cloud?
self-hosted, but it doesn't matter, I tried it also with the the cloud version, same error
NetBird version
0.28.9
NetBird status -dA output:
Daemon status: LoginFailed
Run UP command to log in with SSO (interactive login):
netbird up
If you are running a self-hosted version and no SSO provider has been configured in your Management Server,
you can use a setup-key:
netbird up --management-url <YOUR_MANAGEMENT_URL> --setup-key <YOUR_SETUP_KEY>
More info: https://docs.netbird.io/how-to/register-machines-using-setup-keys
Do you face any (non-mobile) client issues?
Please provide the file created by netbird debug for 1m -AS.
We advise reviewing the anonymized files for any remaining PII.
Output:
Error: failed to up: up already in progress: current status LoginFailed
Screenshots
none
Additional context
none

Update: I exchanged the original gl-inet firmware with a vanilla OpenWRT installation. The newest Netbird package (atm 0.28.9) works perfectly.

FYI: this might be caused by using legacy iptables instead of new nftables on the system running Netbird.

Thanks for your hint. Looks like it’s the same problem indeed. I don’t want to go back to the stock firmware as the underlying  OpenWrt firmware is older and the vanilla one feels better. Maybe I‘ll get another one to test it.
Interestingly enough I had a look at the function, which is creating the connection and there is a differentiation between running as root or as a different user. as root it uses the new custom connect and as normal user the legacy way.
But I was not able to trigger this if statement. Seems like netbird up was just telling the daemon to connect, which was running as root.
Maybe those exports could have helped.


Allowing for different Kits and Converters

Putting an issue on the board that builds off of #54. Currently there is no ability to switch out the converter for custom objects as the receiving code is hardcoded in the package. This creates a blockers for our dependency on speckle in unity.

Closing for now.
The current RecursiveConverter component does allow users to specify their own converter, although not exposed in the UI, users can quite easily specify their own converter through code.
We are aware of further DX improvements we can make in our converters, and we aim to slowly work towards easier customisation of conversion functions.


Fail to verify SC via upload std json: OverflowKnownLength

When I upload a 2MB+ json file for sc verification, there is an error JSON payload (4152195 bytes) is larger than allowed (limit: 2097152 bytes).
With backend log:
smart-contract-verifier    | 2022-12-22T05:32:47.117254Z  WARN HTTP request{http.method=POST
http.route=/api/v1/solidity/verify/standard-json http.flavor=1.1
http.scheme=http http.host=host.docker.internal:8043
http.client_ip=<IP_ADDRESS> http.user_agent=hackney/1.18.1
http.target=/api/v1/solidity/verify/standard-json
otel.name=HTTP POST /api/v1/solidity/verify/standard-json
otel.kind="server"
request_id=c69c1e33-ae5e-4870-8ffd-15ce3cdacd47
exception.message=JSON payload (4152211 bytes) is larger than allowed (limit: 2097152 bytes).
exception.details=OverflowKnownLength { length: 4152211, limit: 2097152 }
http.status_code=413
otel.status_code="OK"}:
tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: OverflowKnownLength { length: 4152211, limit: 2097152 }

Environment

Deployment type (Manual/Docker/Docker-compose): Docker-compose
Elixir & Erlang/OTP versions (elixir -version):

Erlang/OTP 24 [erts-12.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:no-native-stack]
Elixir 1.13.1 (compiled with Erlang/OTP 24)

Node JS version (node -v): v16.13.1
Operating System: Fedora 36 w/ kernel 6.0.12-200.fc36.x86_64
Blockscout Version/branch/commit: 5.0.0-prerelease-f218a75f
Archive node type && version (Erigon/Geth/Nethermind/Ganache/?): Ganache

Steps to reproduce

prepare a json file that is more than 2MB
go to smart contract verification page and choose via Standard Input Json
upload the json file and click "verify & publish"

Expected behaviour
The smart contract will be verified.
Actual behaviour

Is there any way to set this limit via env variable?
Any help willbe appreciated!

Fixed in https://github.com/blockscout/blockscout-rs/pull/332. Now the maximum payload size may be specified via configuration variables. Adapted in smart-contract-verifier-v1.0.0 release


Mentions in comments on Announcements is not working - always refreshing the page

Affected module
UI
Describe the bug
When a Announcement is opened, and someone try to add a comment with a mention on it, the page is refreshing and not allowing to add a comment - only when we try to add a coment with mention
To Reproduce

Create an Announcement
add a comment with mention (team or user)

Expected behavior
Allow to add a mention with user or team
Version:

OpenMetadata version: 1.3.0 - collate sandbox

Additional context
Only for add a team or user '@'
to add an asset is working properly

This is handled by this PR #15194

Will ship it with 1.3.1


without_a_bundler_no_modules: wasm_bindgen is not defined

Describe the Bug
When running without_a_bundler_no_modules example get error wasm_bindgen is not defined at line 19 of index.html: const { add } = wasm_bindgen;
I build with wasm-pack build --target no-modules

I can't reproduce this. I copied the without-a-bundler-no-modules folder, ran wasm-pack build --target no-modules, and then loaded index.html in a browser and everything worked fine.
What's your version of wasm-pack and Rust?

It was my mistake.  I closed this minutes after I opened it as I realised.
I have not found how to delete an issue I have opened.
Sorry about that, I have without-a-bundler-no-modules working well.
Not without-a-bundler (--taget web) but that is another story, and now I do not care.


Formatter change single quote string to double quote string!

Formatter change single quote string to double quote string.
It's kind of weird

Please give us more information. I think you are using the vue-js extension.
But give us more detailed infos via VS Code => Help => Report Issues

It's solved!Thanks.

How is it solved? I still have this issue. :(

It's because of the vue-js extension: #36750


Create midi piano plugin

Can you please have a look at the code? The plugin still is not meant to be deployed, but it would be great if you can give me some feedback. Thanks in advance!

I checked out the branch and tried to use the plugin, but couldn't get it to work (don't know how much it already supposed to work, though).

The range selector for the key range looks like it's selecting random keys (never where the user actually clicks)
After uploading a MIDI file the website crashes

I made a small screen recording of my test:
https://user-images.githubusercontent.com/2676617/194555451-441a58d3-fdc3-4228-a92c-59fec828ffaa.mp4

As the code on both sides has changed a lot in the meantime, we'll close this PR for now. We can create another one when the topic is ready again.


Add S3 GetObjectAttributes API Implementation

Explain the changes

Create the file s3_get_object_attributes.js and add the API in src/endpoint/s3/ops/index.js and nb.d.ts and object_sdk.js and the implementation in every namespace so it removes properties that are not in the schema of read_object_md and reuse it. In s3_rest.js add the attributes in OBJECT_SUB_RESOURCES (else it was using only GetObject instead).
In s3_bucket_policy_utils.js add the get_object_attributes permissions, since this is the first case where we have 2 permissions, it is an array and I changed the code to iterate an array (see function is_statement_fit_of_method_array). Therefore, had to add the _.flatten to ensure that the array that was added is also flattened. I also added to s3_rest.js a JSDoc to the function _get_method_from_req since it might be also an array and not just a string.
In s3_bucket_policy_utils.js add break in every loop where it is found true (since we do not need to continue after we found a match.
In namespace_fs.js in function _get_object_info add || undefined in case there is no version-id the value won't be false but undefined.
In src/upgrade/upgrade_scripts/5.15.6/upgrade_bucket_policy.js do not use the get_object_attributes key in the map, as it harms the function _create_actions_map.
In object_server.js add the case for permission check where passing version-id.
In namespace_s3 for using the function _get_s3_object_info added the properties checksum and object_parts, to add them had to add them in file src/sdk/nb.d.ts under the interface ObjectInfo and add the definitions from AWS SDK V3 (where there was a type change defined in the file itself).

Issues: Fixed #8209

The suggested fix is to add "HeadObject" with the returned XML.

List of GAPs:

Encryption is not internally used.
Condition headers (If-Match and If-Unmodified-Since) were not tested specifically in this API (as they were copied from HeadObject), and are not used in all namespaces.
In object_server there is a hard-coded check on the permission, it might be redundant today as we have in s3_rest permission check by the bucket policy (more details can be found in this comment). Note: the origin of it is from the object_api where we have anonymous: true and it appears in a few actions.
Define all the headers that we work with as const.

Testing Instructions:
Automatic Tests:

sudo NC_CORETEST=true node ./node_modules/mocha/bin/mocha ./src/test/unit_tests/test_s3_bucket_policy.js -g 'bucket policy on get object attributes'
sudo NC_CORETEST=true node ./node_modules/mocha/bin/mocha ./src/test/unit_tests/test_bucketspace_versioning.js
make run-single-test testname=test_s3_bucket_policy.js CONTAINER_PLATFORM=linux/arm64
make run-single-test testname=test_s3_ops.js CONTAINER_PLATFORM=linux/arm64 (currently, in a local run it shows 2 errors that are not directly related: (1) "before all" hook for "should tag text file": RestError: The API version 2024-08-04 is not supported by Azurite; (2) "after all" hook for "should getObjectAttributes": NoSuchBucket: The specified bucket does not exist (the bucket was copied from the previous test).

Manual Tests:
NC
1) A basic test on a bucket with versioning disabled:

Create an account with the CLI: sudo node src/cmd/manage_nsfs account add --name <account-name> --new_buckets_path /tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid>
Note: before creating the account need to give permission to the new_buckets_path: chmod 777 /tmp/nsfs_root1, chmod 777 /tmp/nsfs_root2.
Start the NSFS server with: sudo node src/cmd/nsfs --debug 5
Notes:

I Change the config.NSFS_CHECK_BUCKET_BOUNDARIES = false; //SDSD because I’m using the /tmp/ and not /private/tmp/.

Create the alias for S3 service:alias nc-user-1-s3=‘AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:6443’.
Check the connection to the endpoint and try to list the buckets (should be empty): nc-user-1-s3 s3 ls; echo $?
 Put bucket versioning Enabled: nc-user-1-s3 s3api put-bucket-versioning --bucket bucket-1 --versioning-configuration Status=Enabled
10. Put an object: nc-user-1-s3 s3api put-object --bucket bucket-1 --key hello.txt (save the version-id in the output)
11.  Create an additional account: sudo node src/cmd/manage_nsfs account add --name <account-name> --new_buckets_path /tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid> (same uid and gid).
13. Create the alias for S3 service:alias nc-user-2-s3=‘AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:6443’.
14. Add bucket policy: nc-user-1-s3 s3api put-bucket-policy --bucket bucket-1 --policy file://policy.json
policy.json:
{
  "Version": "2012-10-17",
  "Statement": [
    {
     "Effect": "Allow",
     "Principal": { "AWS": [ "<account-name-2>" ] },
     "Action": ["s3:GetObject", "s3:GetObjectAttributes"],
     "Resource": [ "arn:aws:s3:::bucket-1/*", "arn:aws:s3:::bucket-1" ]
    }
  ]
}

Call get object attributes (from account2): nc-user-2-s3 s3api get-object-attributes --bucket bucket-1 --key hello.txt --object-attributes "StorageClass" "ETag" "ObjectSize"
Add bucket policy (versioned): nc-user-1-s3 s3api put-bucket-policy --bucket bucket-1 --policy file://policy2.json
policy2.json:

{
  "Version": "2012-10-17",
  "Statement": [
    {
     "Effect": "Allow",
     "Principal": { "AWS": [ "<account-name-2>" ] },
     "Action": ["s3:GetObjectVersion", "s3:GetObjectVersionAttributes"],
     "Resource": [ "arn:aws:s3:::bucket-1/*", "arn:aws:s3:::bucket-1" ]
    }
  ]
}

Call get object attributes with version-d: nc-user-2-s3 s3api get-object-attributes --bucket bucket-1 --key hello.txt --version-id <version-id-from-previous-call>--object-attributes "StorageClass" "ETag" "ObjectSize"

Containerized:

Build the images and install NooBaa system on Rancher Desktop (see guide).
Note: nb is an alias that runs the local operator from build/_output/bin (alias created by devenv).
Wait for the default backing store pod to be in state Ready before starting the tests: kubectl wait --for=condition=available backingstore/noobaa-default-backing-store --timeout=6m -n test1
I'm using port-forward (in a different tab): kubectl port-forward -n test1 service/s3 12443:443
PV
Create the alias for the admin - first, need to get the credentials: nb status --show-secrets -n test1 and then alias s3-nb-user-1='AWS_ACCESS_KEY=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:12443'
Check the connection to the endpoint and try to list the buckets (should have first.bucket): s3-nb-user-1 s3 ls; echo $?
Create the second account and create its alias: nb account create user2 -n test1 and then nb account status user2 -n test1 --show-secrets for the credentials and then alias s3-nb-user-2='AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:12443'
Create a new bucket: s3-nb-user-1 s3 mb s3://bucket1
Add bucket versioning: s3-nb-user-1 s3api put-bucket-versioning --bucket bucket1 --versioning-configuration Status=Enabled
Put object: s3-nb-user-1 s3api put-object --bucket bucket1 --key nice_day2 (save the version-id we will use it).
Check access to the new bucket by the new account (should be Access Denied): s3-nb-user-2 s3 ls s3://bucket1
Add bucket policy: s3-nb-user-1 s3api put-bucket-policy --bucket bucket1 --policy file://policy.json
policy.json:

{
  "Version": "2012-10-17",
  "Statement": [
    {
     "Effect": "Allow",
     "Principal": { "AWS": [ "user2" ] },
     "Action": ["s3:GetObject", "s3:GetObjectAttributes"],
     "Resource": [ "arn:aws:s3:::bucket1/*", "arn:aws:s3:::bucket1" ]
    }
  ]
}

Call get object attributes (from account2): s3-nb-user-2 s3api get-object-attributes --bucket bucket1 --key nice_day2 --object-attributes "StorageClass" "ETag" "ObjectSize"
Add bucket policy (versioned): s3-nb-user-1 s3api put-bucket-policy --bucket bucket1 --policy file://policy2.json
policy2.json:

{
  "Version": "2012-10-17",
  "Statement": [
    {
     "Effect": "Allow",
     "Principal": { "AWS": [ "user2" ] },
     "Action": ["s3:GetObjectVersion", "s3:GetObjectVersionAttributes"],
     "Resource": [ "arn:aws:s3:::bucket1/*", "arn:aws:s3:::bucket1" ]
    }
  ]
}

Call get object attributes with version-id: s3-nb-user-2 s3api get-object-attributes --bucket bucket1 --key nice_day2 --version-id <version-id-from-previous-call> --object-attributes "StorageClass" "ETag" "ObjectSize"
namespace S3
Create namespacestore type aws-s3: nb namespacestore create aws-s3 ns-shira-aws -n test1
Create bucketclass: nb bucketclass create namespace-bucketclass single bc1 --resource=ns-shira-aws -n test1
Create OBC: nb obc create obc1 --bucketclass=bc1 -n test1
Create the alias (credentials from the printed output): alias alias s3-nb-user-3='AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:12443'
Put object: s3-nb-user-3 s3api put-object --bucket <obc-name> --key mimi
Get objects attributes: s3-nb-user-3 s3api get-object-attributes --bucket <obc-name> --key mimi --object-attributes "StorageClass" "ETag" "ObjectSize"

[X] Doc added/updated
[X] Tests added

Push merging after other reviews and fixes made according to Guy's review


chore(deps): Bump Reactist to v23.1.0

Closing this one in favor of #59, just because that one has more CI checks passing than this one. I opened that one without knowing that this was already in place.


Dplyr query in tutorial not the same as on a data.frame

Going over the tutorial here and noticed that running this on sparklyr:
delay <- flights_tbl %>%
  group_by(tailnum) %>%
  summarise(count = n(), dist = mean(distance), delay = mean(arr_delay)) %>%
  filter(count > 20, dist < 2000, !is.na(delay)) %>%
  collect()

Gives different results from:
flights_tbl  %>% collect() -> flights_df

delay_df <- flights_df %>%
    group_by(tailnum) %>%
    summarise(count = n(), dist = mean(distance), delay = mean(arr_delay)) %>%
    filter(count > 20, dist < 2000)

It seems to be because the mean in spark has something like na.rm = TRUE by default.

Indeed, the issue here is that Spark defaults to something like na.rm = TRUE for all arithmetic / mathy operations. The results are the same if I force na.rm = TRUE on the R equivalent code.
I don't know if there's anything we can do to change this behavior; I imagine we'll just have to make sure it's clearly documented. @javierluraschi, what do you think?

Took a look at this... couldn't find any simple way yo reconfigure this behavior to match R to set mean to NA when NA values are present. Users of sparklyr will have to become aware there are differences in behavior between R and Spark, in this case, for NAs. This is already the case for dplyr where a dplyr backend (say Postgress) does not guarantee 100% fidelity between dplyr execution against R. That said, if this becomes a continuous source of confusion, we could consider enhancing mean() and others to respect NA values.

What about something straightforward like printing a warning if certain functions are called and there are NAs? If I call functions like mean with na.rm = TRUE it already spits out a warning anyway, so this would be roughly consistent.

While running the mean on column with NA, I've got the warning message:
na.rm not needed in SQL: NULL are always droppedFALSE

How this should be understood:

na.rm not needed in SQL: NULL are always dropped : all NAs are automatically dropped
na.rm not needed in SQL: NULL are always dropped == FALSE: all NAs are not automatically dropped
What's the meaning of droppedFALSE in the above warning message?

Closing, since understanding Spark NA behavior is expected while using sparklyr. The workarounds mentioned, as in checking for NAs, have a computation cost associated to it that we would rather avoid. If we hear more feedback from the community on this we can reconsider.


torchaudio.info doesnt work on some .sph files

Some SPHERE files (.sph) cannot be opened by torchaudio.info. I get the following error on some file
"formats: can't open input file filename.sph': sph: unsupported coding ulaw,embedded-shorten-v2.00'"
I cannot share the file although.
Such files are easily handled by special package like:
https://pypi.org/project/sphfile/
There is some tool called NIST's sph2pipe which might help:
http://www.cs.columbia.edu/~ecooper/tts/raw.html
https://www.ldc.upenn.edu/language-resources/tools/sphere-conversion-tools
I am using torch.version = 1.8.0.dev20201028

Hi @saurabh-kataria
Thanks for the report. Can you tell us which backend/interface you are using?
Are you on Linux/macOS/Windows?

It is sox_io since it fails on Line 25 sinfo = torch.ops.torchaudio.sox_io_get_info(filepath) of .../python3.8/site-packages/torchaudio/backend/sox_io_backend.py. OS is Debian/linux.

Reading the sox's documentation, libsox does not support shorten format.

SoX can read these files when they contain μ-law and PCM data. It will ignore any header information that says the data is compressed using shorten compression and will treat the data as either μ-law or PCM. This will allow SoX and the command line shorten program to be run together using pipes to encompasses the data and then pass the result to SoX for processing.

Reading the description from here, looks like commonly used code for shorten format is copy-protected, which I guess is why sox does not adopt it.
I am not sure how we can handle this or if it is possible for torchaudio to support these formats. One workaround will be to use other library, as you pointed out, to read it into NumPy NDArray, and convert it to Torch Tensor.

Thanks for looking into it. Meanwhile, I have been using NIST reader sphfile https://pypi.org/project/sphfile/ successfully to numpy arrays.

I will close the issue as there is no immediate action torchaudio can take on this. Thanks again for reporting it though.


[Discussion] Language Support

I don't fully know what I am asking for when I say this - but what would it take for Tally Arbiter to support multiple languages for the UI other than English? Is this even a desirable feature or just a niche ask?

Localization. That's the word I was thinking of.

Its not that complicated: https://angular.io/guide/i18n

Cool. Well I’ll just leave this here until someone asks for it.


Bump dependencies + PR for Superstruct?

Hello!
I have found myself reliant on your library to help with validating object unions. At the moment, your peer dependendencies cause an unmet peer with Superstruct, since they updated to v2.0.0 in july. Do you plan on maintaining this library?
I also saw in some issues the Superstruct maintainers were open to receiving this feature into their repo. You said you had to clean it up first. How is that faring? Could I do it for you?

Hi @BuyMyBeard! Yes, I've been meaning to update the dependencies.
I'd also love to get this into superstruct proper but just haven't had the time to tidy it up. From memory the typings might not be quite right in some cases and there may also have been a case of having multiple discriminators that it couldn't realise.
If you have time to work on a PR for superstruct, please go for it!
I'll update the dependencies for this for now.


2.0 checklist

[x] next.config.js
[x] Upgrade to Webpack 2.0 #287
[x] Switch to more optimized main bundle / ditch CDN
[x] Document singleton Router API
[x] Document programmatic server API in README
[x] Add config.babel Object + Function support

[x] Document adding an additional babel transformation in README (do-expressions)

[x] Make sure we flush head and CSS upon errors #439
[x] Add missing READMEs in examples/ and link to them throughout the README
[x] Document usage of SSR styling solutions with <Document> in examples/

[x] glamor
[x] styled-components
[x] styletron

[x] Incorporate styled-jsx and update

[x] Readme
[ ] Blog post
[x] Examples

[x] Show dev-mode deprecation for pushTo and replaceTo
[x] Show dev-mode deprecation notice for next/css and point to the glamor example
[ ] Router events

IMO, for a 2.0 release, glamor should be removed entirely (as a breaking change) instead of showing a dev-only deprecation message. This still includes it within the bundle.
This route would have made sense is 1.3 was the next target release.
Happy to tackle this if it's wanted.

@lukeed I want to give people some time to migrate away. We can do a 3.0 release soon that removes it.

3.0 release is coming, so this issue can be closed, I suppose :)

Yes it is :)


Ability to CRUD Topic attribute in Google::Apis::ClassroomV1::CourseWork class?

Hello All,
I was wondering if there is a way via the Ruby API doc to modify a Topic for the following class:
Google::Apis::ClassroomV1::CourseWork
Topics were introduced in August 2016 as far as I can tell as a way for teachers to organize their stream:
https://support.google.com/edu/classroom/answer/6149237?hl=en
Does anyone know of a way?  I'm okay with making a REST call as well if necessary.
Thanks!

Topics aren't supported in the classroom API. It's a known feature request, but not aware of any plans to add support for it yet.

Its a feature requested still
https://issuetracker.google.com/issues/70885100


How to signout from CLI

How can i signout supabse account from cli ?

Remove access token from the default keyring of your operating system.
For OSX it's Keychain, for Windows it's "Accessing Credential Manager" and most linux distros have their own "Passwords and Keys" apps. See<EMAIL_ADDRESS>for implementation details.
If not supported, it fallbacks to $HOME/.supabase/access-token file.

Thanks man, fixed. but why don't we have command like supabase logout ?

That sounds like a good addition. PRs welcome :)

@kamilogorek Are we storing anything other tha access token in this diretory ~/.supabase/access-token ?

@kamilogorek is there anything contains other than access token in this file ~/.supabase/access-token ?
Is it safe to delete this file while logout ?

Good catch, thanks! Fixed in #1700

@kamilogorek is there anything contains other than access token in this file ~/.supabase/access-token ?
Is it safe to delete this file while logout ?

No, just a token. And in keyring its scoped to a predefined key, so you don't need to do any existence checks if someone calls logout multiple times (other than standard go errors for removing missing file).


Salesforce does not download all results for large result set

For particularly large result sets, Salesforce will return multiple result IDs for a single batch.
However, in get_batch_results, only the first result ID is being returned. The code should utilize ET.findall to return a list of result IDs and download each of those to append to the output file.
I'm planning on submitting a PR for this in the next couple of days.

@dacort Sorry about this. I wrote the bulk of Salesforce.py. Most of my salesforce queries involve the salesforce version of joins and so I was never able to use/test batch results well.
Thanks for your desire to improve this module!

No problem @dlstadther! Happy to be able to contribute. :)

Just realized this creates a CSV file with multiple headers. This shouldn't be merged in yet.

Once things are fixed, i'll review once more


Alfred text expander not working properly

[x] I am on the latest Hyper.app version

[x] I have searched the issues of this repo and believe that this is not a duplicate

OS version and name: macOS Sierra 10.12.4

Hyper.app version: <IP_ADDRESS>4

Link of a Gist with the contents of your .hyper.js: ?

Relevant information from devtools (CMD+ALT+I on Mac OS, CTRL+SHIFT+I elsewhere): N/A

The issue is reproducible in vanilla Hyper.app: Is Vanilla

Issue
Alfreds Snippet/Text Expander doesn't work within Hyper. I have ;gs as a shortcut to replace with git status and it doesn't work within Hyper. The replacing sound plays, but it just leaves it blank. If I try 5-7 times it might work one of those times, but likely I have to manually type. I'm not sure if other text expander apps like aText and Text Expander work, but Alfred Snippets does not at least.

Reproduced. Keyword is deleted but snippet is not inserted.
@dubielzyk There is a work around if you set some aliases in your shell (like zsh git plugin does)

Since the release of 1.4 aText Snippet/Text Expander not longer works in hyper. aText works fine in other apps and pasting text into hyper with cmd+v works fine. The snippet fires and is deleted and it makes its replacement noise but the replacement text is not inserted.

This was fixed for a while but now in 2.0 text expanding paste the text 1 plus a bit of the string again. For instance, if the snippet ",ssh" were to inset "ssh<EMAIL_ADDRESS>it'll paste "ssh<EMAIL_ADDRESS>

@jtphelan I have exactly the same isse

Text Expander itself isn't working either for me. (macOS 10.13.4)


Fix a typo in io

Hi, thanks for your PR, and sorry for my late reaction. There only 1 search replace too many. ;)


exporting signal data

Hi, I'm a researcher studying Nanopore data.
I have two questions about bulkvis tool.

Can I export numeric signal data in .csv or other format which is visualized as a graph?
Can I select signal data in fast5 file by genomic position  that can be annotated with fastq files?

Thank you for reading my questions and please answer me.

Hi,

Our tool doesn't enable you to export data from fast5 files to csv. I'd recommend looking at the ont-fast5-api to do that.
Indirectly, yes. If you use the gen_bmf.py script you can create alignments that show up over the signal displayed by bulkvis. Alternatively, you can align your data and then select reads that you are interested in an search for them using their FASTQ description string, eg:@658814b5-1635-427e-8614-e8a798a9cd20 ch=121


Fix incorrect patch in zero.init

The code below has a problem where cls.__init__ in line 525 can be modified before assignment to _old_init. This could lead to an incorrect __init__ being backed up:
https://github.com/microsoft/DeepSpeed/blob/ffe0af23575c4f03a07408eacfc50b1a58781429/deepspeed/runtime/zero/partition_parameters.py#L524-L534
Test Case

import deepspeed
from torch import nn

class ModelA(nn.Module):
    def __init__(self):
        super().__init__()

class ModelB(ModelA):
    pass

original_init = ModelA.__init__

ds_config = {
    'fp16': {'enabled': False},
    'bf16': {'enabled': True},
    'zero_optimization': {
        'stage': 3,
        'offload_optimizer': {
            'device': 'cpu',
            'pin_memory': True
        },
        'offload_param': {
            'device': 'cpu',
            'pin_memory': True
        },
    },
    'gradient_accumulation_steps': 1,
    'gradient_clipping': 1,
    'train_batch_size': 1,
    'train_micro_batch_size_per_gpu': 1
}

with deepspeed.zero.Init(config_dict_or_path=ds_config, enabled=True, mem_efficient_linear=False, mpu=None):
    model_a = ModelA()
    assert ModelA.__init__ != original_init

assert ModelA.__init__ == original_init
assert ModelB.__init__ == original_init   #  Fails here. If not, please try several times since it depends on the order of modifications

A better solution is proposed to handle _init_subclass as well

Thank you @VeryLazyBoy for the great catch!
I think the issue is that we patch superclass's cls.__init__ when cls doesn't have its __init__. So I try another approach in this branch. Do you think if this works?
This is less intrusive as we do not set __init__ when cls doesn't have it.

@tohtana Yes! Your approach is less intrusive and much better. Let's go ahead with this new method. Should I close this merge request?

@VeryLazyBoy Thank you for your response!
Let me create a PR using my branch to make sure it works. Let's close this PR after all test pass with the PR.


Fails because of no reference to json-writer

> masa-scss-to-json scss-to-json.conf.js

.../node_modules/masa-scss-to-json/masa-scss-to-json.js:307
                writeJsonToFile(baseDir, outFile, variables);
                ^

ReferenceError: writeJsonToFile is not defined

Thank you for reporting this.
Fixed with v0.1.12


networkmanager-l2tp: 1.2.10 -> 1.2.12

Motivation for this change
https://github.com/nm-l2tp/NetworkManager-l2tp/releases/tag/1.2.12
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)

Using presently! :)

[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

I ended up writing the same patch while debugging a problem with my l2tp vpn so I validate the patch.

as a note to l2tp vpn users the l2tp plugin expects a relative path to exists in ipsec.secrets else it fails.
if (g_str_has_prefix (all_lines[i], "include ipsec.d/ipsec.nm-l2tp.secrets")) {
one way (the only) to work around the check is to add the path to
services.strongswan.secrets = [ "ipsec.d/ipsec.nm-l2tp.secrets" ];
but the strongswan modules only accepts absolute paths so until a proper fix upstream or in the nixos module you will have to tweak either yourself see https://github.com/nm-l2tp/NetworkManager-l2tp/issues/108


Pay-As-You-Go Calling Plan really required for shared calling?

On this page and on https://learn.microsoft.com/en-us/microsoftteams/shared-calling-setup and https://learn.microsoft.com/en-us/powershell/module/teams/new-csteamssharedcallingroutingpolicy?view=teams-ps it mentions assigning a pay-as-you-go calling plan.
Is it really required to use the kind of plan? It's not possible to assign a standard domestic calling plan with minutes included?
I understand for large organizations those minutes included might be insufficient when shared, but for small orgs it might be enough and it should be clarified on the docs if it really is necessary to opt for pay as you go.

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

ID: dae4f3dc-c617-d8b8-8a6b-bda47a6e9755
Version Independent ID: dae4f3dc-c617-d8b8-8a6b-bda47a6e9755
Content: Plan for Shared Calling - Microsoft Teams
Content Source: Teams/shared-calling-plan.md
Service: msteams
GitHub Login: @CarolynRowe
Microsoft Alias: crowe

Thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.

Hello @JMCA2
Did you get answer to your question?
I'm trying to configure Shared Calling, with a Domestic Calling plan, and It is not working for me.
thanks

@ArtemioPantoja We contacted Microsoft Support and after several days no response

@ArtemioPantoja  @scanum We received response from Microsoft support and they say only pay-as-you-go plan is supported, but their response is solely based on reading the docs...

@JMCA2, thanks for keeping me posted.
From my side, I opened a case with ms, they reviewed some logs we provided and they found out an error regarding funds to our account communications credits.
"phrase": "Error from CreateUsageRequest:\r\nBalance not found"
We will try funding those comm credits and see what happens. I'll let you know if I have any luck.
Btw, we are using a Domestic calling plan for the resource account.


Logout functionality is broken in the example project

I noticed that the "logout" handler in the example project doesn't work after upgrading to snap-1.0.
I found this out in a larger project where it fails the same way.  It however does work in the snap-templates default project.  In the snap-templates project, logout is able to logout the user and redirect to /.  In snaplet-sqlite-simple example project, the logout link just returns an empty reply from the server:
curl http://localhost:8000/logout
curl: (52) Empty reply from server

The code for the logout route is the same in both snap-templates and snaplet-sqlite-simple/example.  But snap-templates uses the JSON auth backend, so maybe that works differently.
I guess an exception is thrown somewhere but unfortunately it gets silently thrown away and not logged.
@sigrlami You haven't by any chance come across this?

Fixed by 4ad82c94ca258f1680600b45fd7f0c866b306eff

I have no idea why that omission didn't trigger a compiler warning though.

@nurpax interesting. No I didn't notice it, will check. I think it's because you're actually updating default data, not creating a new one.

I thought this would be creating a completely new AuthManager
    return AuthManager
      { backend = manager
      , session = sess
      , activeUser = Nothing
      , minPasswdLen = asMinPasswdLen authSettings
      , rememberCookieName = asRememberCookieName authSettings
      , rememberCookieDomain = Nothing
      , rememberPeriod = asRememberPeriod authSettings
      , siteKey = key
      , lockout = asLockout authSettings
      , randomNumberGenerator = rng
      }


Deep Learning of Local RGB-D Patches for 3D Object Detection  and 6D Pose Estimation

Hi:
Recently looking at your "Deep Learning of Local RGB-D Patches for 3D
Object Detection and 6D Pose Estimation" paper, where the network structure is not very clear. Is there any more detailed information?

What exactly is not clear? There is a figure depicting the whole architecture and some text that explains every layer.
Sent from my iPhone

On Nov 9, 2017, at 1:56 AM, zgq91<EMAIL_ADDRESS>wrote:
Hi:
Recently looking at your "Deep Learning of Local RGB-D Patches for 3D
Object Detection and 6D Pose Estimation" paper, where the network structure is not very clear. Is there any more detailed information?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@wadimkehl  input patch x(32x32x4): 4on behalf of what it means? rgb + depth this understanding is correct.What is the network output y structure?

Since it is an autoencoder, input and output have the same shape.

@wadimkehl  Can provide papers code, just look at the essay many places stumbled. If you can provide the code would be very much appreciated, my email<EMAIL_ADDRESS>


New functionality that can add the localhost IP address as a valid igress for DockerHosts

Should fix:
https://github.com/brooklyncentral/clocker/issues/134
https://github.com/brooklyncentral/clocker/issues/215

Thanks @Graeme-Miller have merged :frog:


Version bumps and remove probably extra dependencies

WHAT
Version bumps and remove probably extra dependencies
WHY
perfetto is a runtime dependency already, and now in android doesn't include.
https://github.com/android/nowinandroid/commit/a60687ae730e0ccd28db11bcab7f71dcca7318ce
HOW
Checklist :clipboard:

[x] Add explicit visibility modifier and explicit return types for public declarations
[x] Run spotless check
[x] Run tests
[x] Update metalava's signature text files

Test breakage from https://github.com/androidx/media/commit/097cdded3f77d24355e5a2b3b81ebf555844a25a


Timer to have state on/off

NOTE: For a feature to be created it has to be doable in the Amazon app because we are basically replicating the app for HA. If you can't find it in the app, we probably can't create it here.
Is your feature request related to a problem? Please describe.
Yes and No. The new update changed the "off" state of the timer entity from "unavailable" to "unknown" which  means I have to change my lovelace(that doesnt accept attritubes in condtions card) to match.
Describe the solution you'd like
If timer is running state is 'on'. If timer is not running state is 'off'.
Replace state attritube 'status' for 'start_time' or similar?
Describe alternatives you've considered
N/A
Additional context
As always thanks for a great integration!

The migration from timers to HA's new SensorDeviceClass.TIMESTAMP made it so Unavailable was no longer a valid response. I'll double check if there's any other option but we may be stuck.


Gc self improvement via her

we no longer dump the agent, and that thus we don't have the bug any more where the evaluation was done on the agent of the previous iteration

lgtm

we no longer dump the agent, and that thus we don't have the bug any more where the evaluation was done on the agent of the previous iteration


gnome-panel should recognize installed applets

Panel applets are being picked up from GNOME_PANEL_APPLETS_DIR environment variable in one place and a completely hardcoded path in another.
First, we will need to patch the latter manager to use an environment variable as well.
Second, we will need to do something similar to what MATE is doing. Or better, create gnome-panel-with-plugins derivation.
Originally posted by @jtojnar in https://github.com/NixOS/nixpkgs/issues/47451#issuecomment-452955745

@jtojnar I'd like to tackle this, do you have any pointers? We need to get it to pick up gnome-applets at least right?


Unexpected token ILLEGAL with function literal in template literal

Steps to reproduce
Attempting to parse this code causes an error:
`${function() { let {x} = y; }}`

This is a reduced test case from a real app. We were using a string like this to create the source code for a web worker.
Expected output
This should be able to parse fine. The code parses fine with other parsers and works fine in the Chrome Developer Tools console.
Actual output
I get this instead:
Error: Line 1: Unexpected token ILLEGAL

This appears to be because scanner saveState and restoreState do not save and restore the curlyStack array.
So when parsing in isLexicalDeclaration:
isLexicalDeclaration() {
    const state = this.scanner.saveState();
    this.scanner.scanComments();
    const next = this.scanner.lex();
    this.scanner.restoreState(state);
    ...
}

This lex can add a curly brace to the stack, and when the lex happens again re-adds a curly brace to the stack.
Making saveState and restoreState hold a copy of curlyStack gets this to parse properly.


CFS violates strict aliasing in SB and ES

GCC and Clang by default enable optimizations for strict
aliasing. This is a problem for CFS users because the way that CFS is
architected violates strict aliasing rules - for example, in SB's use
of ES memory pools.  GCC and clang can be tuned with the
-fno-strict-aliasing flag to prevent this from causing undefined
behavior.
Data Structures
For the sake of clarity, I will describe 2 data structures used in my
examples below here:
typedef union CFE_SB_Msg {
    /* \brief Base message type without enforced alignment */
    CFE_MSG_Message_t Msg;
    /* \brief Align to support Long Integer */
    long long int LongInt;
    /* \brief Align to support double. */
    long double Double;
} CFE_SB_Buffer_t;

CFE_SB_Buffer_t is a union of CFE_MSG_Message_t and the types with the
largest alignment requirements for the platform. CFE_MSG_Message_t is
a union of CCSDS_SpacePacket_t and a byte array for its serialized
representation.
typedef struct CFE_SB_BufferD {
    /* Links for inclusion in the tracking lists */
    CFE_SB_BufferLink_t Link;
    /* Actual MsgId of the content, cached here to avoid repeat */
    CFE_SB_MsgId_t MsgId;
    /* Current owner of the buffer, if owned by a single app. */
    CFE_ES_AppId_t AppId;
    /* Total size of this descriptor (including descriptor itself) */
    size_t AllocatedSize;
    /* Actual size of message content currently stored in the buffer */
    size_t ContentSize;
    /* Type of message content currently stored in the buffer */
    CFE_MSG_Type_t ContentType;
    /* If message should get its sequence number assigned from the route */
    bool AutoSequence;
    /* Number of active references to this buffer in the system */
    uint16 UseCount;
    /* Variably sized content field, Keep last */
    CFE_SB_Buffer_t Content;
} CFE_SB_BufferD_t;

I think it is pertinent to note that CFE_SB_Buffer_t Content is the
last field of CFE_SB_BufferD_t, since that may have bearing on the
common initial sequence rule of strict aliasing.
An example using CFE_SB_ReceiveBuffer
To see why this data structure is a problem with strict aliasing, I'll
use CFE_SB_ReceiveBuffer as an example:
CFE_SB_ReceiveBuffer takes a pointer to a pointer to CFE_SB_Buffer_t,
BufPtr, whose value is *BufPtr, and a queue identifier, PipeId.
CFE_SB_ReceiveBuffer retrieves a buffer from the OSAL queue associated
with PipeId, calling OS_QueueGet with CFE_SB_BufferD_t BufDscPtr
as its data parameter.
OS_QueueGet internally uses OS_QueueGet_Impl - for examle, the
posix version in file
osal/src/os/posix/src/os-impl-queues.c. OS_QueueGet_Impl calls
mq_receive, using data (CFE_SB_BufferD_t BufDscPtr). Now we must
examine whence comes data, via CFE_SB_TransmitMsg.
How Messages are stored in SB
CFE_SB_TransmitMsg is called with a pointer to a structure whose
first member is CFE_MSG_Message_t - i.e. a struct whose first member
is either CFE_MSG_CommandHeader_t or
CFE_MSG_TelemetryHeader_t. Encoded in this data is the total length
of the message, which extends beyond CFE_MSG_Message_t. In order to
send this message, SB must acquire a large enough buffer from the
memory pool using CFE_SB_GetBufferFromPool.
CFE_SB_GetBufferFromPool calls CFE_ES_GetPoolBuf. The memory in
this pool ultimately derives from a global variable
CFE_SB_Global_t CFE_SB_Global, in its CFE_SB_MemParams_t Mem member,
in that member's
CFE_ES_STATIC_POOL_TYPE(CFE_PLATFORM_SB_BUF_MEMORY_BYTES) Partition
member. CFE_ES_STATIC_POOL_TYPE is a macro defined in
cfe_es_api_typedefs.h which is a union of array of uint8 and
CFE_ES_PoolAlign_t, which is a union of void*, long long int,
and long double.
All this to say that the backing buffer is a byte array. I should at
this point stress that by the standard, uint8 and char are not
equivalent - and unsigned char and signed char are BOTH distinct
from char. This has important ramifications for the particulars of
the strict aliasing rule.
Once CFE_SB_TransmitMsg acquires its backing buffer from the memory
pool, it copies the message passed to it into a BufDscPtr, and calls
CFE_SB_BroadcastBufferToRoute with that
BufDscPtr. CFE_SB_BroadcastBufferToRoute in turn ultimately calls
OS_QueuePut with that data. OS_QueuePut calls OS_QueuePut_Impl,
which calls mq_timedsend - with the memory pool data that is a byte
array.
Violation of Strict Aliasing
CFE_SB_ReceiveBuffer assigns to *BufPtr the address of
BufDscPtr->Content., which has been obtained from OS_QueueGet, and
resides in SB's memory pool as a portion of a byte array. When the
caller gets this data, it's represented as a pointer to a
CFE_SB_Buffer_t - but really is an arbitrary location in a buffer
array in SB. There is a subtle problem with this even before the
caller casts it to another type: it already violates strict aliasing.
Per C99 (WG14/N1256, ISO/IEC 9899:TC3, September 7, 2007), section 6.5.7:

An object shall have its stored value accessed only by an lvalue
expression that has one of the following types: 76
-- a type compatible with the effective type of the object,
-- a qualified version of a type compatible with the effective type
of the object,
-- a type that is the signed or unsigned type corresponding to the
effective type of the object,
-- a type that is the signed or unsigned type corresponding to a
qualified version of the effective type of the object,
-- an aggregate or union type that includes one of the
aforementioned types among its members (including, recursively, a
member of a subaggregate or contained union), or
-- a character type.
76 The intent of this list is to specify those circumstances in
which an object may or may not be aliased.

As mentioned previously, a uint8 array (unioned with void* and
largest system types) is not a CFE_SB_Buffer_t or a
CFE_MSG_Message_t, and is not char. The question becomes, is it
acceptable when the primary header is defined as a byte array below
its type as a structure? I don't believe this is allowable because it
would subvert the type system too much.
It would be completely fine to only use these buffers to transmit and
receive data into local copies - but there are also "zero-copy"
versions of these functions whose use would be rendered
useless by that paradigm, and incur a performance penalty for
additional copies. It's frequently noted in discussions related to
strict aliasing that when the compiler sees a memcpy where type
punning is desired, it will eliminate that: I doubt that optimization
is easy to perform with the level of indirections present in CFS and
OSAL.
A problem indisputably arises where the CFE_SB_Buffer (with data)
stored in the memory pool is accessed via a pointer cast to another
type - e.g. some command structure with additional payload data.
Final observations and conclusions.
SB is not the sole user of ES Memory Pools, and the pattern of using
byte arrays for various types is a common pattern in flight software
in the CFS ecosystem. I think it is prudent to enable the
-fno-strict-aliasing flag in all CFS modules, OSAL, PSP, and all
apps, to mitigate undefined behavior arising from violating type based
aliasing.
Additional Reading
The Strict Aliasing Situation is Pretty Bad
What is the Strict Aliasing Rule and Why do we care?
gcc may_alias attribute

Keep in mind the intent of the aliasing rules here.  If there were no rules, then any data "write" could change the value of any other data.  This means that the optimizer cannot hold the value of some object in e.g. a register - if any assignment can change any value, then it constantly has to actually [re-]read the value from memory every time it needs it.
The aliasing rules aim to pose some limitations on that based on type - that is, knowing that only certain types of data writes can change a value, it can rely on cached copies of values (again, likely in a CPU register or similar) and not have to go to main memory as often.
Notably -- the compiler/optimizer doesn't necessarily care how you came up with the address of some object in memory.  The point is, once you have identified the object as a given type and started using it as that type, that you only access it through pointers of the same (or compatible) type for the lifetime of the object.  I don't believe the pools are violating this, because although the pool memory was allocated as a uint8 and the address(es) were calculated using byte offsets, once an address is determined, it casts this to the intended type, then initialized as that type, and from thereon is only accessed as that type or via a compatible type.

have you noticed any incorrect behavior when compiled with that option?
I have not. I think currently analysis fails because of the amount of indirection and SB and ES being separate modules. I think the tooling in general is insufficient because this is a very difficult problem to handle.

specific case in the flow where type-punning (via pointer casting) is done
In CFE_EVS_ProcessCommandPacket, in cfe_evs_dispatch.c:

        case CFE_EVS_SEND_HK_MID:
            /* Housekeeping request */
            CFE_EVS_SendHkCmd((const CFE_EVS_SendHkCmd_t *)SBBufPtr);
            break;

However, that data is not accessed.
In CFE_EVS_ProcessGroundCommand:
        case CFE_EVS_ENABLE_EVENT_TYPE_CC:

            if (CFE_EVS_VerifyCmdLength(&SBBufPtr->Msg, sizeof(CFE_EVS_EnableEventTypeCmd_t)))
            {
                Status = CFE_EVS_EnableEventTypeCmd((const CFE_EVS_EnableEventTypeCmd_t *)SBBufPtr);
            }
            break;

In CFE_EVS_EnableEvntTypeCmd in cfe_evs_task.c:
    const CFE_EVS_BitMaskCmd_Payload_t *CmdPtr = &data->Payload;

This is accessing the data in the uint8 array that's stored in an offset in the ES memory pool in SB. This doesn't obey common initial sequence bcasuse it comes from the BufDscPtr, which has SB_Buffer_t as its last member (and must because of the variable data which follows it, which is not described by a type other than the raw byte array).

The only thing I can think of here is related to the way that the pools are managed, in that they use uint8 internally where it could be more correct to use char perhaps?
I think using char is one necessary step, to keep using strict aliasing. I believe the other part is that for SB, buffers and buffer descriptions must be implemented to have separate queues and pools, so the common initial sequence isn't violated... but I will admit, the rules are fuzzy to me here, so that I'm not sure that approach is correct either.

Keep in mind the intent of the aliasing rules here. If there were no rules, then any data "write" could change the value of any other data. This means that the optimizer cannot hold the value of some object in e.g. a register - if any assignment can change any value, then it constantly has to actually [re-]read the value from memory every time it needs it.

I believe that, but I also believe that the current way type based aliasing analysis is handled by gcc is too aggressive. Linus Torvalds has this position, and it's why the linux, OpenBSD, and FreeBSD kernels are compiled with -fno-strict-aliasing.

I don't believe the pools are violating this, because although the pool memory was allocated as a uint8 and the address(es) were calculated using byte offsets, once an address is determined, it casts this to the intended type, then initialized as that type, and from thereon is only accessed as that type or via a compatible type.

I don't think that is correct. I believe the effective type is in fact a uint8 array, and that only pointers acquired via malloc (which itself cannot be implemented in strictly conforming C) may acquire an effective type using that kind of mechanism.

Minimal example on godbolt where icc is available: https://godbolt.org/z/183oKP483
icc considers this practice to violate aliasing rules. gcc and clang do not report it as violating the rules.

Minimal example on godbolt where icc is available: https://godbolt.org/z/183oKP483 icc considers this practice to violate aliasing rules. gcc and clang do not report it as violating the rules.

I tend to agree with gcc/clang here.  I don't see this as violating the rules, at least in the code that is directly in the example.  However, if one were to access the buffer directly (as uint8s) and also access it through the Object* pointer, then it would violate the rules.  But the simple promotion of a Header* to an Object* (which has a Header as the first element) should not violate the rules, in and of itself.  Otherwise OO concepts would be impossible.

https://godbolt.org/z/Y48Kd4ohT
I didn't have the right flags to make gcc complain.
<source>: In function 'main':
<source>:26:33: error: dereferencing type-punned pointer might break strict-aliasing rules [-Werror=strict-aliasing]
   26 |     Object* object1 = (Object*)(&record1->header);
      |                                ~^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Compiler returned: 1

I think the OO stuff only works if you take a union of everything whose first member is Header. I'm not sure what vtable implementations look like in C.

gcc actually does complain about it, when called with the flag -Wstrict-aliasing=1 or -Wstrict-aliasing=2. By gcc's man page, 1 is the most aggressive, and least accurate, 2 is aggressive and less accurate, and 3 has the fewest false positives and false negatives. As noted in the gist (What is the Strict Aliasing Rule), it is possible to have aliasing violations that are not caught by the compiler (https://wandbox.org/permlink/dwd9jhy53AF7a2D0 line 15 is not caught unlike 9 and 10). I don't think it's good enough to simply rely on the compiler to tell us when we're right or wrong, because compiler vendors are under no obligation to warn about any and all undefined behavior.
Clang does not properly implement the strict aliasing warnings despite allowing the flags (https://github.com/llvm/llvm-project/blob/main/clang/test/Misc/warning-flags-tree.c#L16). It should also be noted that clang's user manual claims that -fno-strict-aliasing is the default (https://clang.llvm.org/docs/UsersManual.html), but I think that's probably a case of stale documentation.
https://gustedt.wordpress.com/2016/08/17/effective-types-and-aliasing/
A member of WG14 states in this blog post that character arrays must not be reinterpreted as objects of other types. This confirms what I understand as the effective type of the memory pool in ES as being a uint8 array.
https://godbolt.org/z/M9GW3zs7z
gcc with -Wstrict-aliasing=2 consistently warns that the pattern of casting the record's header to an arbitrary object type might break strict aliasing rules. It is also possible to blatantly violate aliasing without a warning being issued.
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute
https://clang.llvm.org/docs/AttributeReference.html#malloc
Maybe using attribute malloc would be appropriate, since the way buffer descriptors work is analagous to the metadata prefixing pointers returned by malloc?
Another approach is that CFE_SB_Buffer_t, or a wrapping type, could be a union of every message type that uses it, and that is the type stored in the memory pool. This would be difficult to maintain but technically correct and, as I understand it, not violating strict aliasing. There is a very significant downside to this approach in that memory use could explode.

Note that the message generated by gcc is this:
dereferencing type-punned pointer might break strict-aliasing rules

With the operative word here being "might".  They are just flagging something that could be wrong, but the analysis to determine if it is actually wrong or not must be done by the programmer, not the compiler.
The reality is that all access to the header fields is still done through an object of type struct Header and thus not breaking the rules.  It would only break the rules if you wrote to one and read from the other, while expecting to see the changes from the previous write.
An important thing to note is that strict (pedantic?) adherence to some of these rules would result in highly inefficient and/or impossible to maintain code.  There is constant friction between standards writers, compiler developers, and software developers to find a happy middle ground between stuff that's possible and stuff that's safe and stuff that's efficient.
While one could argue that simply allocating a block of memory as uint8 (or even char) and then using it as a different type is violating the strict sense of the aliasing rules, I've never come across a compiler or system for which it didn't work correctly/as expected, provided that it was never actually accessed as a uint8 but only accessed via the intended data type.  In contrast, I have definitely come across issues where code did not behave as expected, and it was tracked down to a type-punned pointer, but in all those cases the software was mixing reads and writes to the different pointer types and expecting to see the change reflected in the other one (the alias).  But as long as the code only accesses the object through one type at a time, it always works.

I'll preface this by saying that I don't think any compiler today is doing anything to break the expectations of CFS as it is written, and that I doubt it will be a problem for some time. I will also say that I would prefer the standard to be written in such a way that it is unambiguous that static byte arrays may be treated as storage for objects.
I am being pedantic because my perception is that compiler developers favor being as pedantic as possible, and sometimes even disregarding the standard in favor of optimizations:
https://gcc.gnu.org/legacy-ml/gcc/2010-01/msg00263.html

Having said all this, the original poster is correct that GCC doesn't
implement C99 aliasing as written in the standard regarding unions.  We
don't do so because we determined that this can't possibly have been the
intent of the standard as it makes type-based aliasing relatively useless.

The reality is that all access to the header fields is still done through an object of type struct Header and thus not breaking the rules

I think this is true in SB and MSG inspecting a message returned by CFE_SB_ReceiveMessage, but when that message is used after casting it, it breaks the rules since it doesn't obey any common initial sequence and ES/SB has no information about the type written into the array at that location, in the bytes beyond the CFE_SB_Buffer_t Content member of the buffer file descriptor. I gave an example previously of EVS casting to const CFE_EVS_EnableEventTypeCmd_t *. I actually should have noted SB itself in cfe_sb_task.c dereferences a buffer pointer cast to CFE_SB_EnableRouteCmd_t *. I don't think there is any reading of the aliasing rules in which this is legal behavior, regardless of the lack of visible compiler complaints.
The problem with relying on code doing what has been observed, which violates rules, is that the behavior can be legally changed by future compiler versions.

The problem with relying on code doing what has been observed, which violates rules, is that the behavior can be legally changed by future compiler versions.

I don't think so.  Such a change would break every call to e.g. read() / write() or many other system libraries that pass objects via void pointers or an opaque memcpy().   There is a massive amount of historical precedent for code like this in C, and the compiler authors can't diverge that much from established paradigms over 40 years.
This is actually part of the reason for using C in the first place, is that it gives you low(-ish) level control over how and where your objects appear in memory.  If they broke that for whatever reason, they'd have to give the resulting language a new name, like Rust or something.  It wouldn't be C anymore.

Functions like read and stdlib calls like memcpy get special privilege first by virtue of being implemented through system calls. Also for memcpy, it's completely fine to alias any object to (not from) a char *. The standard made this part of the rules because it would break everything. The chief problem here is going from a byte array to an object.
memcpy is implemented partially in assembly. Using the i386 path in glibc as an example, it invokes macros for BYTE_COPY_FWD and PAGE_COPY_FWD, which wraps WORD_COPY_FWD. These macros are implemented as assembly, which the compiler can't treat with the same semantic analysis as if they were written normal C expressions.
https://github.com/lattera/glibc/blob/master/string/memcpy.c
https://github.com/lattera/glibc/blob/master/sysdeps/i386/memcopy.h#L26
read, at least on linux, is implemented as a system call, and linux itself is built with the -fno-strict-aliasing flag<EMAIL_ADDRESS>I can't speak too much to exactly how the posix syscalls are implemented in VxWorks and RTEMS since my experience with them is much more limited, but I would suppose that they're pretty careful about avoiding UB.

If they broke that for whatever reason, they'd have to give the resulting language a new name, like Rust or something. It wouldn't be C anymore.
I appreciate the joke - and I'll take the opportunity to mention that rust is currently a no-go for CFS and flight software in general because of a lack of first class support for platforms that aren't Linux, OSX, or Windows on arches that aren't x86 or ARM. There's also problems about how panics work and some other concerns, but suffice it to say that it's a major engineering effort to make rust amenable to flight software environments.


Fixed the secret-decoder to handle double quotes and comments at the end

Multiple changes required for Splunk and WU., known bug-fixes.


Webinar Example GPT_Tank

Description
A new example which showed in the webinar about GPT integration to Webservices is created.
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update

How Has This Been Tested?

[ ] Unit Tests
[x] Attached examples

Test Configuration:

RFEM version: 6.06.0011
Python version: 3.10.11

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Please re-open this PR? No code review has been done.


Fix of datagram socket factory

This is a rebase of #77 (thanks to @Savar and sorry for the delay).
I should write an integration test for the DatagramSocketFactory, but it is fairly clear that the current implementation is broken.

:+1:


feat: create component for storybook Markdown

E.g. Chips page https://style.monday.com/?path=/docs/data-display-chips--clickable in https://github.com/mondaycom/monday-ui-react-core

Background color should have value of var(--sb-primary-background-color)
To test try to render this component in monday-ui-react-core storybook (cause vibe-storybook-components storybook currently doesn't support theming) - you can clone both projects locally and do yarn link or npm build && npm pack + npm install *path to packed archive*

Hi @SergeyRoyt could you please assign this issue to me

Hey, @avibiradar100 !
It's yours, good luck!

@avibiradar100 if you are still willing to take the issue, let me know 🙏
Otherwise it's ready for anyone willing to take it

Hey @SergeyRoyt  Sry,  you can unassign it

Hi, I would like to take it

Hey, @Mila2999 !
Thanks! It's yours, good luck ;)

HI @SergeyRoyt, I am trying to understand what the component should do.
I created this component
import { FC } from 'react';
import cx from 'classnames';

type MarkdownRenderProps = {
  children: string;
  className: string;
};

const MarkdownRender: FC<MarkdownRenderProps> = ({ children, className }) => {
  return (
    <div className={cx(className)} style={{ backgroundColor: `var(--sb-primary-background-color)` }}>
      {children}
    </div>
  );
};
export default MarkdownRender;

the component should only change the background color?

Ok I understand, thanks @SergeyRoyt


fix(connection_pool.cr): only yield cnx if it exists and not closed

Fix clear side of https://github.com/PlaceOS/staff-api/issues/106

the recovery testing steps:

launch an app that uses clear and connects to a database
test the api is working
restart the database container
test the api is working

current result:

connection error is raised once after container restarts
afterwards connection is re-established