database.runTransaction(...) callback sometimes gets called more than once

Environment details

OS: Mac
Node.js version: 7.10.1
npm version: 4.2.0
@google-cloud/spanner version: 0.8.1

Steps to reproduce

Start transaction on a same database, table, and rows with multiple processes (This is to create concurrent read/writes)
Wait and see until some callbacks get called more than once.

NOTE: It seems that this issue occurs when we have concurrent transactions targeting the same table and rows.
Thank you in advance!

hey @voltrue2, what you are describing is actually happening by design. Sometimes when the same table/rows are being modified by different transactions the server will send an ABORTED signal to one of the transactions indicating that it must be rerun in its entirety. The node client will then do that for you by executing the callback again.
If this is something you want to opt out of, I would suggest taking a look at Database#getTransaction, which will give you absolute control over the Transaction object and the client library will not rerun anything in the event of an aborted error.

Hi @callmehiphop, thanks for the swift answer.
I do have another question, though. When I look at my transaction log, a "retry" of a transaction seems to happen after a transaction commit of the same transaction.
Also the transaction commit does not seem to fail.
I am assuming that if the transaction has to be rerun, the commit should also failed?
Thanks!

Commits aren't the only requests that can fail with an aborted error, it is possible for any request that reads data to fail as well.

So is there a reason for a commit to successfully commit and yet the transaction aborts right after that?
This seems to be what is happening to me.
Cheers

No, that sounds like it could be a bug. Would you mind putting together some code that reproduces what you're seeing?

Hello,
Sure thing!
Below is a very simple sample that seems to demonstrate what I have seen.
The number of rows in items table and the value of count column of counter table should match, but they don't.
If you uncomment out the block of code in _onTask, it will prevent the multiple calls of the same transactions and it seem to solve the issue (We really lose throughput by doing this though):
'use strict';

process.env.GOOGLE_APPLICATION_CREDENTIALS = 'google_credentials.json';

const crypto = require('crypto');
const Spanner = require('@google-cloud/spanner');
const spanner = Spanner({ projectId: 'gcp-kiban-verification' });
const instance = spanner.instance('kiban01');
const db = instance.database('no-takahashi');
const counterId = uuid();

/*
CREATE TABLE counter (
	counterId STRING(32) NOT NULL,
	count INT64 NOT NULL
) PRIMARY KEY (counterId);

CREATE TABLE items (
	id STRING(32) NOT NULL,
	counterId STRING(32) NOT NULL
) PRIMARY KEY (id, counterId);

The value of count of counter table with the matching countId in
should match the number of rows in items table
The issue that I am seeing is that they go out of sync and it seems the cause of it
is the callback of transaction being called multiple times...
* */

for (var i = 0; i < 10; i++) {
	setTimeout(operation, 1);
}

// start transaction -> select -> update -> insert -> end transaction
function operation() {
	var id = uuid();
	var tasks = [
		startTransaction,
		getCountForUpdate,
		updateCount,
		insertItem,
		endTransaction
	];
	var transaction;
	var count;

	runTasks(tasks, done);

	// callback of this gets called more than once...
	function startTransaction(next) {
		console.log('start', id);
		db.runTransaction(function (error, _transaction) {
			if (error) {
				return next(error);
			}
			transaction = _transaction;
			next();
		});
	}

	function getCountForUpdate(next) {
		var query = {
			sql: 'SELECT count FROM counter WHERE counterId = @id',
			params: { id: counterId }
		};
		transaction.run(query, function (error, res) {
			if (error) {
				return next(error);
			}
			if (!res.length) {
				count = 0;
			} else {
				count = parseInt(res[0][0].value.value);
			}
			next();
		});
	}

	function updateCount(next) {
		console.log('update', id);
		var data = [
			{ count: count + 1, counterId: counterId }
		];
		transaction.upsert('counter', data);
		next();
	}

	function insertItem(next) {
		console.log('insert', id);
		var data = [
			{ id: id, counterId: counterId }
		];
		transaction.insert('items', data);
		next();
	}

	function endTransaction(next) {
		console.log('end', id);
		transaction.commit(next);
	}

	function done(error) {
		if (error) {
			console.error('error', error, id);
			return;
		}
		console.log('finished', id);
	}
}

// we could use async library instead here...
// the point is to not use Promise (I have not tested Promise for this behavior)
function runTasks(tasks, cb, _index) {
	if (!_index) {
		_index = 0;
	}
	var task = tasks[_index];
	if (!task) {
		return cb();
	}
	var bind = {
		tasks: tasks,
		cb: cb,
		_index: _index
	};
	task(_onTask.bind(bind));
}

function _onTask(error) {
	// this prevents callback to be executed more than once
	/* we allow callback to be executed more than once to see this behavior
	if (this._called) {
		return console.log('***Error: CallbackAlreadyCalled');
	}
	this._called = true;
	*/
	if (error) {
		return this.cb(error);
	}
	runTasks(this.tasks, this.cb, this._index += 1);
}

// UUID version 4 as a string
function uuid() {
	var rand = crypto.randomBytes(16);
	rand[6] = (rand[6] & 0x0f) | 0x40;
	rand[8] = (rand[8] & 0x3f) | 0x80;
	return rand.toString('hex');
}

@callmehiphop
I know this is a closed issue, but is there any update on this?
I have also contacted Google support on this issue and the support said that it seems to be a bug in the client library.
It would be great, if we can move forward with this. Should I reopen this issue?
Cheers!

@voltrue2 sorry, I've been a little sidetracked. So after going through your code, I think what you are seeing is the expected behavior. I think @vkedia can elaborate a bit more, but I'm fairly certain trying to simultaneously update the same field through multiple transactions will cause aborted errors for all but 1 transaction.
You could probably work around this by either queuing transactions that you expect conflicts with or switching from runTransaction to getTransaction and manually retrying ABORT errors.

If the transaction fails with ABORTED then the callback would get invoked again. But I think @voltrue2 is claiming that the callback gets executed again even though the commit succeeded. Why would that happen?
Also why would the count and number of items go out of sync? @voltrue2 is updating them both in the same transaction, so they should never be out of sync unless there is a bug in the client library that is causing those to be committed in separate transactions.

But I think @voltrue2 is claiming that the callback gets executed again even though the commit succeeded.

@vkedia Initially that is how I interpreted this issue as well, however after running the code he was kind enough to provide for us, I believe the issue is that he runs the same transaction in parallel. A simpler example of what is happening looks like this:
for (let i = 0; i < 10; i++) {
  setTimeout(runTxn, 1);
}

function runTxn() {
  database.runTransaction(function(err, txn) {
    // a read call
    // an upsert call
    transaction.commit(function(err) {
      // done!
    });
  });
}

So when that runs the first transaction is successful, but every subsequent transaction needs to be retried - which I believe is the correct behavior.

But that does not explain why are the two tables going out of sync?

But that does not explain why are the two tables going out of sync?

@vkedia truthfully I'm not entirely sure why this is happening, but this is what I'm seeing:

10 transactions fire off, each trying to read and then increment a counter.
There are no preallocated sessions, so 10 create session requests are sent concurrently

The first session is returned from the server within 70ms
The second session is returned from the server within 250ms
All remaining sessions are returned from the server within 315ms

Likely because of the response times, the first 3 transactions commit on the first attempt, putting the counter value to 3.
The other 7 transactions receive an aborted error on commit.
All 7 transactions request the counter value and the server returns 2 for each request.
All 7 transactions attempt to upsert the counter value to 3
All 7 transactions commit without receiving an abort error.

The mismatch comes because we are expecting each transaction to have incremented the counter once, but in fact it was only incremented correctly the first 3 times. This leads me to believe it's not the clients fault, as I would expect the server to

return the correct counter value on the retry requests
abort n-1 transactions on each retry.

Interesting. There are couple of things fishy here.
In step 5 server should be returning 3 for each request and not 2. In step 7 all transactions should not commit successfully. This leads me to believe that there is some bug around sending transaction ids. Maybe when we retry the transaction, for reads we end up not sending the correct transaction id or we ask it use an implicit transaction or something.
This definitely looks like a bug in the client library and pretty critical one at that. Can you please dig in further and see what is going on? You can try to print each grpc request and then compare what are the transaction ids being sent in each request.

@vkedia so I've been looking into this and it appears that the client is generating a new transaction id after an aborted error.
The raw request looks like this (I stringified the txn id for readability).
{
  "session": "projects/grape-spaceship-911/instances/gcloud-tests-instance-00941e10/databases/gcloud-tests-database-00944520/sessions/AIwTQWLDqK9n7qbZi_wG2tGQOEJUTihO8TY-t_XGVLryQr5smvcIjlsOkqF_",
  "mutations": [
    {
      "update": {
        "table": "counter",
        "columns": [
          "count",
          "counterId"
        ],
        "values": [
          {
            "values": [
              {
                "stringValue": "2"
              },
              {
                "stringValue": "d93990c8e485422ba262bc89735e7443"
              }
            ]
          }
        ]
      }
    },
    {
      "insert": {
        "table": "items",
        "columns": [
          "counterId",
          "id"
        ],
        "values": [
          {
            "values": [
              {
                "stringValue": "d93990c8e485422ba262bc89735e7443"
              },
              {
                "stringValue": "87ce4248fb734f89aa40851be3b0007a"
              }
            ]
          }
        ]
      }
    }
  ],
  "transactionId": "AIwTQWJ6b4kIjn_5b40UatWQ6lOYb0mGzjx9rA"
}

Is there anything that appears out of place to you? I've compared it to the proto file and I believe this is the correct format.

This looks ok. Can you also see what was the transactionId used in the query request made in this transaction. That should be the same as here. For each transaction and each retry we need to make sure that same transaction id is used for the query and the commit. And that transaction id should be different from all other transactions.
Generating new transaction id for each retry is the correct behavior.

@vkedia @voltrue2 so after some more investigating, I just realized there was an error with the reproduction code that prevented it from re-querying the counter (😢). If I refactor the runTasks function to the following
  function runTasks(tasks, cb) {
    var task = tasks[0];

    if (!task) {
      return cb(null);
    }

    var config = {
      tasks: tasks.slice(1),
      cb: cb
    };

    task(_onTask.bind(null, config));
  }

  function _onTask(config, error) {
    if (error) {
      return config.cb(error);
    }

    runTasks(config.tasks, config.cb);
  }

Everything works as expected and the counter ends up getting set to 10, meaning the tables do not fall out of sync.

Makes sense. Thanks for getting to the bottom of this.
On Wed, Dec 6, 2017 at 7:24 PM, Dave Gramlich<EMAIL_ADDRESS>wrote:

Closed #46 https://github.com/googleapis/nodejs-spanner/issues/46.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/googleapis/nodejs-spanner/issues/46#event-1376134952,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATdef1bqSr_kbQ1JTDEDwdi4uhRzOM4gks5s91pTgaJpZM4QrDGs
.

@callmehiphop Thank you for looking into it!


Pokemon/Moves: Columns don't sort correctly

Power, PP and Level columns do not sort correctly.

Resolved with:
https://github.com/CC-MN/poketdex/pull/13/commits/97288f95bfd9f89dea1c3050e5feb6f3ae0d2cf1


[dsp] optimize instrument processing

with the new consolidated instrument, there are numerous parts of instrument and voice processing that can be trimmed off now

47670dfa6e3b03e965ca94d85af6c10ac204734d

closing this as the most critical parts have been fixed


ci: add schemathesis github actions workflow

Hi,
this is a suggestion for you, if you want to keep testing the API with schemathesis.
I used their GitHub action in this PR. You can trigger this workflow manually through the actions tab, or for example run the API tests, when a future PR changes api.yaml.
But feel free to ignore this. The config of schemathesis would need some more work to ignore things you dont care about. And also schemathesis does not handle xml out of the box. It prefers JSON APIs.
You would need to add a custom python xml serializer to test the endpoints that consume xml payloads.
But this might be a first step in the direction of automatic API testing.
What do you think?
Further reading: https://dzone.com/articles/schemathesis-property-based-testing-for-api-schema

Hi @afuetterer,
this is a good and highly appreciated initiative. An extensive test suite is one of the things the dracor-api is still missing. However at the moment we do not automatically deploy changes from GitHub to any of the DraCor environments. So there is no guarantee that for instance staging.dracor.org would actually run the code that the api.yaml in GitHub is supposed to document. Thus the action could fail even though the code if deployed would work without problems.
One solution to this problem could be to have the action set up a test instance of an eXist database with a current build of the dracor-api installed, against which schemathesis is then run.
An alternative would be to implement continuous deployment first and then run the tests against an automatically provisioned development or staging system.
I'd be happy to help with or review changes to this pull request that work towards the first option or to see additional PRs preparing the second way of doing it.

Hi @cmil,
thank you for the encouragement. I did not want you to merge this right away and run it as part of CI. So I marked this PR as draft now.
I just did not want to throw away the API testing workflow after the workshop in case you need it later.
Yeah, sure, if there is no CD in place, it makes no sense to run the tests against the staging server's API. I added the manual trigger for you to test this workflow.
Schemathesis is written in Python and integrates nicely with flask, django and fastapi services, that's the reason I used it before. But of course there are other ways to test the API: e.g. dredd, cypress or postman.
And yes, if it would be possible to spin up the api in CI with minimal data you could run the tests against localhost.
What do you think?

@afuetterer thanks! Yes, let's keep the PR around and we can get back to it when we find time to work on improving CI/CD.

Apparently this PR got closed when we deleted the v1 branch after merging which was not intentional. @afuetterer maybe you can rebase your schemathesis branch onto the current dracor-org main branch.


Create devcontainer.json

This need some context and discussion.
So it's this https://code.visualstudio.com/docs/devcontainers/create-dev-container
Why is this the right config for OkHttp, should it have some gradle configuration?
Can you point to similar projects that have this config?

Why is it this and not https://github.com/jenkins-infra/plugin-health-scoring/blob/devcontainer/.devcontainer%2Fdevcontainer.json


Initialization command directly reports an error

I am interested in helping provide a fix!
No
Which generators are impacted?

[X] All
[ ] Angular
[ ] HTML
[ ] Preact
[ ] Qwik
[ ] React
[ ] React-Native
[ ] Solid
[ ] Stencil
[ ] Svelte
[ ] Vue
[ ] Web components

Reproduction case
https://mitosis.builder.io/playground
Expected Behaviour
normal operation
Actual Behaviour
E:\mitosis>npm create @builder.io/mitosis@latest
所在位置 行:1 字符: 13

pnpm create @builder.io/mitosis@latest

        ~~~~~~~~

无法使用展开运算符“@”以在表达式中引用变量。只能将“@builder”作为命令的参数。要在表达式中引用变量，请使用“$builder”。
+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : SplattingNotPermitted
Additional Information
No response

I can't really read or understand the log you provided. is this coming from pnpm create? is there anything else you can provide?


Inter section and block spacing

Fix #114
Test URLs:

Before: https://main--bevespi--hlxsites.hlx.page/
After: https://114-section-spacing--bevespi--hlxsites.hlx.page/
Test: https://114-section-spacing--bevespi--hlxsites.hlx.page/copd-treatment
Test: https://114-section-spacing--bevespi--hlxsites.hlx.page/how-to-use-bevespi-inhaler

On the second test page https://114-section-spacing--bevespi--hlxsites.hlx.page/how-to-use-bevespi-inhaler, the background image for the greyed background is not displayed. Not sure if is related to document writing or is from css selector

On the second test page https://114-section-spacing--bevespi--hlxsites.hlx.page/how-to-use-bevespi-inhaler, the background image for the greyed background is not displayed. Not sure if is related to document writing or is from css selector

It was actually not defined. Partially tracked :) in an open issue to fix section bckground images in general: https://github.com/hlxsites/bevespi/issues/137


Feature/move unittests into tests

Move data from UnitTests directory into tests, where it belongs.
Requires a change in Oskar repository too to work.

Obsoleted.


Hard code an NCRC review

Don't display the link back to the original source since there's no URL
Assume there will be a UUID
Assume that we have a usable date
Do not typeset the content (missing sup, sub, italic etc)
Introduce sections for each section of the content
Take an example row from https://docs.google.com/spreadsheets/d/1tDO5yci19_jRsUQY9uAkvga3OY9Jblky2yhknrN1Cww/edit#gid=0
Keep it only on staging
Populate editorial community page content from https://ncrc.jhsph.edu/what-we-do/

Refactor

[ ] Make templateListItem take a ReadonlyNonEmptyArray.

Hard-coding https://ncrc.jhsph.edu/research/robust-spike-antibody-responses-and-increased-reactogenicity-in-seropositive-individuals-after-a-single-dose-of-sars-cov-2-mrna-vaccine/ (review of https://doi.org/10.1101/2<IP_ADDRESS>50653)

Example at row 2780 of https://docs.google.com/spreadsheets/d/1tDO5yci19_jRsUQY9uAkvga3OY9Jblky2yhknrN1Cww/edit#gid=0 has a different version of the final_take column (perhaps outdated) with respect to https://ncrc.jhsph.edu/research/robust-spike-antibody-responses-and-increased-reactogenicity-in-seropositive-individuals-after-a-single-dose-of-sars-cov-2-mrna-vaccine/ which adds available as a preprint and thus not yet peer reviewed.


skip valid authorizations

Authorizations that already have a status of "valid" do not need
to be validated again (until the authorization expires).
Skipping these authorizations makes it possible to obtain certificates
for domains for which a dns-01 validation is still valid, as
acme_tiny is unable to re-validate them. (The alternative would be
to wait up to a month until the authorization expires, or use a
different acme client.)

I stumbled on this when I got the same error as mentioned in #247.
I had previously requested a certificate for "example.com" and "*.example.com" using a different client.
Now I wanted to request a new certificate for "example.com" and "www.example.com" with acme_tiny.
Since the "example.com" authorization was still valid (and had previously been performed with dns-01 challenge),
acme_tiny was unable to re-validate it.
This small change simply skips any authorizations that are still currently valid.

Something like this is needed. I'm currently working on a CI that tests something that uses acme-tiny (it uses Pebble as a CA server), and I created two certs, one for example.org, the second for example.org and example.com, and creating the second cert errors out because the challenge for example.org was already valid.
Parsing account key...
Parsing CSR...
Found domains: example.com, example.org
Getting directory...
Directory found!
Registering account...
Already registered!
Creating new order...
Order created!
Verifying example.org...
example.org verified!
Verifying example.com...
Traceback (most recent call last):
  File "/root/ansible_collections/community/crypto/tests/output/.tmp/output_dir/acme-tiny", line 210, in <module>
    main(sys.argv[1:])
  File "/root/ansible_collections/community/crypto/tests/output/.tmp/output_dir/acme-tiny", line 206, in main
    signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact)
  File "/root/ansible_collections/community/crypto/tests/output/.tmp/output_dir/acme-tiny", line 158, in get_crt
    _send_signed_request(challenge['url'], {}, "Error submitting challenges: {0}".format(domain))
  File "/root/ansible_collections/community/crypto/tests/output/.tmp/output_dir/acme-tiny", line 73, in _send_signed_request
    return _do_request(url, data=data.encode('utf8'), err_msg=err_msg, depth=depth)
  File "/root/ansible_collections/community/crypto/tests/output/.tmp/output_dir/acme-tiny", line 59, in _do_request
    raise ValueError("{0}:\nUrl: {1}\nData: {2}\nResponse Code: {3}\nResponse: {4}".format(err_msg, url, data, code, resp_data))
ValueError: Error submitting challenges: example.com:
Url: https://acme-simulator:14000/chalZ/2jCPCyXAyGa1_K09b_mvai-VK5wPSiYqAg5SGSQgLz0
Data: b'{"protected": "eyJ1cmwiOiAiaHR0cHM6Ly9hY21lLXNpbXVsYXRvcjoxNDAwMC9jaGFsWi8yakNQQ3lYQXlHYTFfSzA5Yl9tdmFpLVZLNXdQU2lZcUFnNVNHU1FnTHowIiwgImFsZyI6ICJSUzI1NiIsICJub25jZSI6ICJSVTBpem9mRWlDRFE4TzJkcG82TXFnIiwgImtpZCI6ICJodHRwczovL2FjbWUtc2ltdWxhdG9yOjE0MDAwL215LWFjY291bnQvMSJ9", "payload": "e30", "signature": "DGFQivQc742deu2aAxoQvsVjKDMyHCuZokVew9A8bjJRcRfqwwbOhGRp6idbYcYjGCYe2AVq-i0sdLVjW_SrhuFtrU9jWboSwDUoDKE211vXztitFtPVKkZksHjGeVATxxsqrZYiPj1z-05EUtR4vTp6uL-CiJlZ_sdavoLWxVe7yYUvhDZ5Ah-dMrh4FqrqPrcA-qCXQcAfZem6YaOrkJP6aUFtkHPesybVXIcCTwYKnuJgtT30xs4t6lmhXlxoBLzFRBEIIEHSM-r6osU5jZ7JK-W0n_dOk9ip7iN3jesS4cbqsoMjuTnwtgeYHvBXduhaYL1ovB3Gm9C49fUQpg"}'
Response Code: 400
Response: {'type': 'urn:ietf:params:acme:error:malformed', 'detail': 'Cannot update challenge with status valid, only status pending', 'status': 400}

This is without this patch. (I had to do some monkey-patching to disable cert validation etc., so the line numbers are off.)
When applying this patch, it works fine.

Had the exact same problem (domain previously validated with a DNS challenge as part of a separate cert acquired, and then couldn't validate it with acme-tiny using a HTTP challenge). It worked great after applying this change! ❤


v6: InvalidWebhookError: No HTTP webhooks registered for topic products/update

Issue summary
Trying to migrate from v5 to v6. Updated code as per guide.
Webhooks are registered for topics such as PRODUCTS_UPDATE
but shopify.webhooks.process() gives
InvalidWebhookError: No HTTP webhooks registered for topic products/update
Looks like products/update got forgotten to be handled as PRODUCTS_UPDATE internally?
If we do the registration wrong, at least the error message should reference to correct topic.
Checklist

[x] I have described this issue in a way that is actionable (if possible)

Hi again! This error is thrown when the library can't find the handler to call for a specific topic, as you mentioned. Just to make sure the set up is correct here, are you adding a handler for that topic, as per https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#changes-to-webhook-functions?
I assume your call looks like this?
await shopify.webhooks.addHandlers({
  PRODUCTS_UPDATE: {
    deliveryMethod: DeliveryMethod.Http,
    callbackUrl: shopify.config.webhooks.path,
    callback: () => { /* ... */ },
  },
});

If we do the registration wrong, at least the error message should reference to correct topic.

That makes sense. products/update is the format Shopify passes the topic in, but we do translate it to PRODUCTS_UPDATE internally to match the GraphQL API. We should log the translated topic here.

Hi & thanks,

are you adding a handler for that topic,

Yes, when the app starts, similar to your code example
shopify.config.webhooks.path doesn't exist, so using
let handlers2 = {
        PRODUCTS_UPDATE: {
            deliveryMethod: 'http',
            callbackUrl: `https://pastebin.com`,
            callback: () => { console.log('test PRODUCTS_UPDATE') },
        }
    }

    console.log('handlers2', handlers2)
    await shopify.webhooks.addHandlers(handlers2)
    const topicsAdded = shopify.webhooks.getTopicsAdded()
    console.log('topicsAdded', topicsAdded)

gives
handlers2 {
  PRODUCTS_UPDATE: {
    deliveryMethod: 'http',
    callbackUrl: 'https://pastebin.com',
    callback: [Function: callback]
  }
}
topicsAdded [ 'PRODUCTS_UPDATE' ]

Note that these webhooks are created with v5 and show properly when listed.
¯_(ツ)_/¯

Ok, it turns out that handler.callbackUrl !== request.url, one has the hostname, the other doesn't. I'll figure out why.
Having a log.debug here, for each condition in turn when it doesn't matched, would have helped:
https://github.com/Shopify/shopify-api-js/blob/0d19fe28be91987d5440d4efde15293263afe9c3/lib/webhooks/process.ts#L62

I've updated my comment:
Even if it would include a host a hostname, might not the same as handler.callbackUrl or
shopify.config.hostName, eg localhost vs ngrok, or different hostnames for oauth and webhook processing, or having a proxy in front of many webhook processing servers (with different hostnames).

I think URLs or even delivery methods shouldn't be compared. Just process the webhook, please , as in v5.
Just comparing paths won't work either, as our development has a webhook processing service with a random path, which forwards to localhost/fixed/path.
I'm sure there are some valid production cases where paths could differ too, eg proxy in front.


Entity config variables

Add gettable and settable variables / state to entity config.
Example config:
(
    // Initialize variables.
    // Every variable must be initialized before it can be used.
    variables: {
        "is_shooting": false,
        "health": 0,
        "some_future_value": null,
        "name": "MyEntity",

        // It would be cool if we could initialize values
        // with a value from the object's props.
        // This should error if the object didn't receive that prop.
        "prop_z": Prop("z"),
    },

    // Variables can then be accessed in event/actions.
    // Can be read to use in `If` expressions.
    // Can NOT (yet) be used in action fields.
    events: {
        // Get a variable value with `GetVar` expression.
        Interval(500): If((
            if: Equal(
                GetVar("is_shooting"),
                true,
            ),
            then: Echo("Is shooting!"),
        )),

        // Set a variable value with `SetVar` action.
        // The value to set is an expression.
        OnKeyDown(PlayerShoot): SetVar("is_shooting", true),
        OnKeyUp(PlayerShoot): SetVar("is_shooting", false),

        // Update the "health" variable with the `Health` expression.
        Interval(100): SetVar("health", Health()),
    },
)

Working entity config variables on master.
Example config:
(
    components: [
        // This component has to be given before variables can be used.
        VariableRegister({
            // Can optionally set default variables here.
            // If not set, all variables will default to `Null`,
            // when used the first time.
            "my_variable": Null,
            "my_number": 4.20,
            "some_boolean": false,
        }),
    ],

    events: {
        // `If`, `Echo`, and some other actions now take a new `Expression` value.
        // I still need to document this properly.
        //
        // The `Var(variable_name)` expression returns the given variable value.
        // This can be used here to pass the expression value of the variable to
        // the `Echo` action to print that value to the terminal.
        Init: Echo(Var("my_number")),

        Interval(1000): Group([
            Echo(Var("some_boolean")),

            // This new `VariableAction` action currently only has the `Set` action.
            // It takes two arguments, the variable name as a string and the value
            // to set the variable to as an expression.
            VariableAction(Set(
                "some_boolean",
                // Expressions are powerful.
                // They can be literal values (strings, numbers, booleans, and null),
                // they can be operations (`Not`, `And`, `Or`, or mathematical operations like `Add`, `Sub`, etc.),
                // or they can evaluate to a value from an entity's component or variable (`Var`, `Health`, `Velocity(Axis)`, etc.).
                Not(Var("some_boolean")),
            )),
        ]),
    },
)

See documentation comments and available syntax for expressions:
https://github.com/Noah2610/deathfloor/blob/c266806818403a942498514c03546a663e9867f9/src/expression/mod.rs#L1
https://github.com/Noah2610/deathfloor/blob/c266806818403a942498514c03546a663e9867f9/src/expression/value.rs#L4
https://github.com/Noah2610/deathfloor/blob/c266806818403a942498514c03546a663e9867f9/src/expression/operation.rs#L5
https://github.com/Noah2610/deathfloor/blob/c266806818403a942498514c03546a663e9867f9/src/expression/component_value.rs#L8


HDDS-5369. Cleanup unused configuration related to SCM HA

What changes were proposed in this pull request?
SCM HA uses config from SCMHAConfiguration, removing unused config related to SCM HA Ratis config in SCMConfigKeys.java
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5369#
How was this patch tested?
Tested Manually

+1 LGTM.
I see few more issues with SCMHAConfiguration, let me open a new Jira for that.

Thank You @aryangupta1998 for the contribution.

Opened new Jira https://issues.apache.org/jira/browse/HDDS-5391 for fixing other issues.


Loss calculation error

https://github.com/huggingface/pytorch-pretrained-BERT/blob/982339d82984466fde3b1466f657a03200aa2ffb/pytorch_pretrained_bert/modeling.py#L744
Got ValueError: Expected target size (1, 30522), got torch.Size([1, 11]) at line 744 of modeling.py. I think the line should be changed to masked_lm_loss = loss_fct(prediction_scores.view([-1, self.config.vocab_size]), masked_lm_labels.view([-1])).

Hi Jian, can you give me a small example showing how to get this error?

Hi Thomas! I modified the code in your README.md for an example:
from pytorch_pretrained_bert.modeling import BertForMaskedLM, BertConfig
from pytorch_pretrained_bert import BertTokenizer
import torch

model = BertForMaskedLM.from_pretrained('bert-base-uncased')

# Tokenized input
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
text = "Who was Jim Henson ? Jim Henson was a puppeteer"
tokenized_text = tokenizer.tokenize(text)

# Mask a token that we will try to predict back with `BertForMaskedLM`
masked_index = 6
tokenized_text[masked_index] = '[MASK]'

# Convert token to vocabulary indices
indexed_truths = tokenizer.convert_tokens_to_ids(tokenized_text)
indexed_tokens = tokenizer.convert_tokens_to_ids(tokenized_text)

# Convert inputs to PyTorch tensors
tokens_tensor = torch.tensor([indexed_tokens])
indexed_truths_tensor = torch.tensor([indexed_truths])

# Evaluate loss
model.eval()
masked_lm_logits_scores = model(tokens_tensor, masked_lm_labels=indexed_truths_tensor)
print(masked_lm_logits_scores)

Thank you, you are right, I fixed that on master. It will be in the next release.


📚  Update stability-support.md

Problem Statement
GCP Secret Manager compatibility with MetadataPolicy is not reflected in the Stability support page.
Simple update on docs
Checklist

[ ] I have read the contribution guidelines
[ ] All commits are signed with git commit --signoff
[ ] My changes have reasonable test coverage
[ ] All tests pass with make test
[ ] I ensured my PR is ready for review with make reviewable

This scaleway test here seems to be bad-flaky 🤔 not the first time it fails with no obvious reason
Summarizing 1 Failure:
  [FAIL] [scaleway] sync secrets [It] [common] should find secrets by name using .DataFrom[] [scaleway]


Version Control guide on Github

Basic Information
A tutorial for version management while using Github. (Feels free to skip this issue if you're familiar with it already)
Other Information
I found this tutorial very useful for Github version control since we are all working on the same repo and it is very likely to mess up the files since there might be many people working on a file at the same time.
https://ourcodingclub.github.io/tutorials/git/
** Main points**

"always Pull before you Push"
"be aware that if there are other people that have committed to the repository, reverting will also undo all of their work, as reverting refers to the repository as a whole, not just your own work in it."
Sync and interact with your repository through the command line

I think something good to point out here is that each issue will be on a separate branch

I think something good to point out here is that each issue will be on a separate branch

Oooh I see the meaning of that just now

Yeah,
This is basically what that looks like

Each issue is assigned to a branch, and the issue has an assigned pull request that goes in eg. #13  #2


HADOOP-16220. Add findbugs ignores for unjustified issues during upda…

…te to guava to 27.0-jre in hadoop-project

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
41
Docker mode activated.

_ Prechecks _

+1
@author
0
The patch does not contain any @author tags.

_ trunk Compile Tests _

+1
shadedclient
817
branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1
whitespace
0
The patch has no whitespace issues.

+1
xml
1
The patch has no ill-formed XML file.

+1
shadedclient
801
patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1
asflicense
26
The patch does not generate ASF License warnings.

1790

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-665/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/665

Optional Tests
dupname  asflicense  xml

uname
Linux df0404704897 4.4.0-138-generic #164~14.04.1-Ubuntu SMP Fri Oct 5 08:56:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / 7dc0ecc

maven
version: Apache Maven 3.3.9

Max. process+thread count
339 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-665/1/console

Powered by
Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

+1, thanks @bgaborg


Additional Requirements?

I found several things not called out here that in my environment needed to be modified. Hopefully this helps someone.
ADK needs to be installed on the new passive site server. In this article and the prerequisite for installing a primary site server it's not specified. The prerequisite check does show this but it would be nice to have it documented so we can install it before we get to that step.
I could not get the "SQL Server sysadmin rights" prerequisite to pass until I enabled SSL3.0 TLS 1.0 and TLS 1.1. In my environment we had these all disabled. There was no indication within the prerequisite check that was the issue. I was receiving errors in the event viewer "A fatal error occurred while creating a TLS client credential. The internal error state is 10013." Most likely I enabled too much in a shotgun blast attempt to resolve it but it certainly wouldn't pass with just 1.2 enabled for me.
Additionally I needed to give the active primary site server's machine account admin rights on the content library server. Before doing this (and with having full rights on the file share) I was receiving errors that the share was unreachable. This might be a specific limitation I have in my environment and there might be a better way to resolve this.

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

ID: 0c416209-7476-14b2-a60b-9f3477dc79be
Version Independent ID: 765534af-f933-c768-0994-fa8d0a5712a0
Content: Site server high availability - Configuration Manager
Content Source: sccm/core/servers/deploy/configure/site-server-high-availability.md
Product: configuration-manager
GitHub Login: @aczechowski
Microsoft Alias: aaroncz

@SCCMWalker thanks for sharing this feedback! It's probably good to be more explicit on these requirements; right now it's implicit to configure the passive mode server like any new site server. Same with the content library server.
As for the TLS 1.2 issue - I suggest filing that as product feedback. I think that engineering should investigate that, I would expect this feature to work with only TLS 1.2 enabled.

Thanks for the quick feedback. I will try and do the product feedback today.
It would be nice to be able to use this page and the pages linked as a guide but without having all the information it requires a lot of tribal knowledge and stopping to search for steps not called out here and on linked pages.  This made the process a bit longer than needed, if the ADK for instance had been called out as a prerequisite in the "prerequisites for setting up a primary site" documentation I would have done that while waiting for other steps to finish, such as the remote content manger transferring over to a new DFS.
Just my two cents on the subject. I appreciate what you and the rest of the MS team are doing for the SCCM product and I am very excited to get this up and running in production.

Made revisions to this article and included this feedback, so closing this issue. The changes should publish later today or tomorrow morning at the latest.


Todo: Ban info command

The output of c!debug bans <user> but pretty with an embed

Could also have mute info potentially, the embed for that one already exists for modmail

Could also have mute info potentially

Were you thinking of having mute info shown in the same response as ban info here? You think just throwing the two embeds into the same response is okay (vs one embed with the data for both)?
Is c!debug banstatus <user> okay, to match c!debug mutestatus? Or did you want it to be a non-debug command?

I meant separate command but combining them is honestly also fine.

I was leaning towards separate commands too tbh. So maybe like /banstatus and /mutestatus, with embeds similar to what we currently have with c!debug mutestatus?

Sounds good


[DOCFIX] [branch-1.3] Improve MapReduce/HBase doc

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11600/
Test PASSed.


[Bug][DataProxy] Caught IllegalStateException: No tube service url specified

What happened

What you expected to happen
start with winning, to reminder register new cluster
How to reproduce
start dataproxy with tube MQ
Environment
No response
InLong version
master
InLong Component
Other for not specified component
Are you willing to submit PR?

[X] Yes, I am willing to submit a PR!

Code of Conduct

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

I meet, how to solve it?


Differences between npm run build: dev and webpack --progress --color

Hello,
I would like to know the difference between executing the following commands:
npm run build:dev
webpack --progress --color
I have already made different changes in the template and it is strange that if I run npm run build: dev errors are presented, but if I run webpack --progress --color everything compiles correctly
Oh and another thing, do you know how to interpret npm-debug.log?
Because I always seem to write a generic error message and I do not find clues about my error ...
Thank you very much

If you're running webpack in your command line, it's because you have it installed globally and it could be some older version that doesn't understand the config and such properly so it thinks everything is ok. The repo comes with webpack as a dependency so anything ran via scripts through npm/yarn comes from the ./node_modules locally.  Hope that helps explain it a little more!
Anything else feel free to ask! I'll close this one out for now.

Hi Mark !!
You are right, thank you so much.


Does not save config to server

The config reads from the server but does not save the config to the server
None of the 3 buttons (, ,  ) work.
Haproxy-wi goes into a pensive state
Version v<IP_ADDRESS>

Check HAProxy-WI logs and httpd error logs

Strange address in the end of the sting

The problem is not solved. Everything works - statistics, map, etc... But the most important thing for which everything was started - editing configs - does not work.
Here is the haproxy-wi log

And here is the log on the haproxy side
The session opens but does not close.
июл 03 09:34:06 acs-haproxy2 sshd[18126]: Accepted password for asutp from <IP_ADDRESS> port 42162 ssh2
июл 03 09:34:06 acs-haproxy2 sshd[18126]: pam_unix(sshd:session): session opened for user asutp by (uid=0)
июл 03 09:34:06 acs-haproxy2 systemd-logind[782]: New session 90 of user asutp.
июл 03 09:34:06 acs-haproxy2 systemd[1]: Started Session 90 of user asutp.

Try understand why timeout happens

Oh, I didn’t want to go into your source. -( Well, ok, I'll go dig.

Maybe there isn't need permission. Is the user has sudo?

To funct.py file
To function ssh_command
Added debug line
logging('localhost','ssh.exec_command:' + command, haproxy=1)
stdin, stdout, stderr = ssh.exec_command(command, get_pty=True)

and a hundred I see?
Jul 03 13:52:48ssh.exec_command: sudo haproxy -q -c -f /tmp//2020-07-03.13:52:47.cfg&& sudo mv -f /tmp//2020-07-03.13:52:47.cfg /etc/haproxy/haproxy.cfg from
Of course, nothing will work!

Does it work now?

Need to remove the extra slash - '\'
The sudo command requires a password - need to pass it additionally.
if haproxy is running on ubuntu (in my case) you need to replace everything
sudo systemctl reload haproxy -> sudo service haproxy reload

I'll do it after the weekend

Just create sudo user without password...
And Ubuntu has systemd too, if it not very old one of course

Just create sudo user without password...

My colleagues will tell me - are you a fool? -)

And Ubuntu has systemd too, if it not very old one of course

That yes. You can leave it that way.

Why fool? How are you want to use password in not interactive program? Send it via echo?
I mean not user without password, I mean sudo without password

It's a decrease in security anyway.
This will have to insist on all haproxy servers. And maintain it in the future.
It is absolutely easy to write two lines of code and pass the password.
I already checked it out. -)

If you will use a ssh key, should you enter password too?

That's why he's ssh key so he won't ask for the password.
But my haproxy-wi ssh key authorization didn't work either.


Fix deletion of clusterrole for seed nginx ingress

/area control-plane
/kind bug
/priority critical
What this PR does / why we need it:
We previously renamed the clusterrolebinding and clusterrole
from nginx-ingress to gardener.cloud:seed:nginx-ingress in
order to avoid a name clash with existing clusterroles.
Done with https://github.com/gardener/gardener/pull/3337
Before this commit the deletion flow still used the old name.
With this commit the correct clusterrole gets deleted.
Release note:
NONE

cc @rfranzke

cc @rfranzke

/cc @ialidzhikov

/cc @ialidzhikov

Cherry-picked into release-v1.15 branch with 93988b8b203933134ba3a794c7a7b7922c98f050.

Cherry-picked into release-v1.15 branch with 93988b8b203933134ba3a794c7a7b7922c98f050.


Can't compile on windows

I found jisp can't compile on window.(win7)
Is there any one same with me?
When I command jisp -c <file>,then it hold on, nothing can done.

Turned out to be because of a typo in command.jisp. Published an update. Please try 0.3.3 and see if it fixes your problem.

Also, please be aware that compilation may fail if the source file contains invalid symbols, which is particularly likely if it's created by Notepad. Make sure to use a sensible editor like Sublime Text or Notepad++.

After update, it can work.
By the way , I like jisp. I think it more better than clojurescript. cljs is too heavy.
Look forward to 0.4.0.
^_^

Glad this helped, and glad you like it. :)


Get the pretrained models files

Hi, is there somewhere the models in their npz format are still available ?
Thank you.

Thanks for the report.
Fixed via https://github.com/wkentaro/fcn/commit/37279b82c55c135e76de041e29a5571966963cb5


[Flow] Show new updates on the feed without refresh

use web sockets for this

Need to wait on refactor for further development

Closing this feature as it's really too low prio and a nice-to-have.


30% performance increase

Hey,
saw there was a .Net port of QOI and got curious about the new performance things that .net standard has.
Use Span for readonly array access and it has a lower overhead (funnily enough not all places where there was an array had a benefit from Span)
Some aggressive in-lining means that small methods don't add a new stack frame and improves performance at the expense of assembly size (but the amount of usages in this case don't make a huge difference to size)

Minor changes

split the rgba and rgb code so that there are no redundant checks inside the loop which reduces branching (and cuts down on some CPU work). This does give about a 5-7% improvement but it does massively increase the size of the code and makes some duplicate code so I can understand not wanting this part of the change.

Using the two benchmarks in the PR I submitted ( https://github.com/NUlliiON/QoiSharp/pull/8 ):

Method
Mean
Error
StdDev
Gen 0
Gen 1
Gen 2
Allocated

QoiEncoding
5.887 ms
0.0168 ms
0.0149 ms
101.5625
101.5625
101.5625
729 KB

and

Method
Mean
Error
StdDev
Gen 0
Gen 1
Gen 2
Allocated

QoiDecoding
4.049 ms
0.0175 ms
0.0155 ms
203.1250
203.1250
203.1250
2 MB

Yeah the rgb split is a little extreme but when I did it I got a good 10% improvement in decode which made me do it in encode and that was 5%.


Only set Reference's innerRef to null when unmounting

Without this, the reference is set to null for every render, making
it mostly unusable.

Thanks!

@FezVrasta can you please publish a new version with this change ? Faced an issue regarding this, then realized this fix was not yet published.


[Specific device] Phone number gets cut on search bar when user enter any phone number on search bar in Send page

Frequency: 100%
Repro on build version: Android Internal Build V1.9.2(1004294334)
Does not repro version Test Flight Build V1.9.2(44)
Repro on devices: Samsung A20S (10)
Does not repro devices iPhone 8(14.2), iPhone 12 (14.2), Samsung M30(10)
Testing Account:<PHONE_NUMBER> / Backup Key
Repro Steps:

Launch the application and login with a test account.
Tap on send button
Enter any phone number
Observe
Current Behavior:  Phone number gets cut on search bar.
Expected Behavior:  User should able to see the full phone number without any cut.
Impact: User not able to see the full phone number .
Attachment: PhonenumberCuts

Hey @MuckT, We have verified the above issue on Latest android internal build V1.28.1 & observed that the issue is fixed now.
Phone number does not get cut when user enter any phone number on search bar on send page.
Hence We are closing this issue.
Devices: Google Pixel XL (10.0), Samsung Galaxy M40(10.0)
Attachment: Phone number issue.jpg
Thanks..!!


GHA CI: add commit hash to artifacts filename

Projects that can be referenced:
https://github.com/qwerttvv/Player
https://github.com/zhongfly/mpv-winbuild
Update: I looked into another project I am familiar with and explored based on their workflow files and it looks good. I will create a pull request.

Why add commit hash to the file name? You can see commit on GHA webpage, and locally, you can use Ikkoku --version to view the commit hash.

@MIRIMIRIM
I thought about it and it seems that my previous description was not very clear. I want to add the commit hash only for the packaged archive file name (similar to the binary file in Releases), not the executable file itself. Is this something you misunderstood?

No misunderstanding, as I download and delete the packages afterward, so...


add missing certificate bit to examples' settings.rons

restore original examples behaviour of using the certificate pem files, by adding the required bit to settings.ron for examples

Thanks for the effort; I had already changed it on my migration branch though!


Fix winget releaser workflow

Fixes https://github.com/Klocman/Bulk-Crap-Uninstaller/issues/642

Changes:

Change job runner from windows-latest to ubuntu-latest (runs faster)
Update vedantmgoyal2009/winget-releaser@v2 to vedantmgoyal9/winget-releaser@main
Fix version extraction to properly pad to 4 components (v5.8.1 now turns to <IP_ADDRESS> instead of <IP_ADDRESS>.0)
Update deprecated set-output command

[!IMPORTANT]
Before merging this:

Ensure WINGET_TOKEN has the public_repo scope.

The action has been failing since https://github.com/Klocman/winget-pkgs is very outdated. Please sync the fork and install Pull on the fork to ensure that it is constantly updated.

Works:

https://github.com/microsoft/winget-pkgs/pull/191254


How do should we Watch Deep in Vue.js?

NOTE: All 1st-time contributors should know Topic approval and PR submission does NOT guarantee your Topic/Article will be published. Our team of Peer Reviewers and Content Moderators will review all PRs that come in to make sure they adhere to the standard of quality we expect from the EngEd community.
We expect all community memebers to go through provided examples, resources, and previously published material before submitting content. As a rule of thumb, please only submit articles (pull requests) that are complete, formatted correctly, and include a fully polished article (ready to be published and error free).
All revisions and edits should be completed on your own forked repo (as to not take up room in the queue). Any PR that is submitted incomplete (meaning not ready to be published as is) will be closed. A PR being closed does NOT mean the article can not be published (or fixed) it simply means that the edits, revisions, and fixes will happen outside of the queue.
NOTE: Any topic suggestion copied/taken/modified from YouTube may Lead to a permanent ban from the community.
Topic Suggestion
Enter topic suggestion here...
Pre-submission advice
By following all our pre-submission advice and reviewing our Resources folder, you will maximise your chances of your topic being approved.
We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner.
Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for an articles to be reviewed and/or published (subject to vary depending on volume and/or backlog of articles).
Be sure to visit our Resources Page for tools, resources, and example articles that will help you propose and write a successful article.
Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)
We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.
Writing sample(s):
Include any links or writing samples - to help our team better gauge your writing quality.
Proposal Submission
Proposed title of article
How do should we Watch Deep in Vue.js?
Use keyword research to improve your article's SEO.
Proposed article introduction
When dealing with forms in most MVC applications, we may sometimes find ourselves in a position to watch for changes that are taking place. For instance, when a user clicks on a form input field, we may want to fire an event. How do we achieve this?
We have to keep in mind that other frameworks such as Angular easily fire these events using the dirty methods which are shipped with the framework, however, this is not the case with Vue 3.
In this tutorial, I'll teach you everything you need to know about the Vue techniques of watching over the nested forms and fire an event when these actions occur in ES2015.
Key takeaways

The concepts of form bindings in Vue 3.
The events handling on forms.
How to watch over changes on the form input and how to fire the required events.

Article quality
How is your article unique? Tell us what makes your approach different from similar articles that have published on the same topic?
Is yours more in-depth? Does it cover additional topics? Do you provide handy tips or anecdotal advice?
References
Please list links to any published content/research that you intend to use to support/guide this article.
Conclusion
Finally, remove the Pre-Submission advice section and all our blockquoted notes as you fill in the form before you submit.
We look forwarding to reviewing your topic suggestion.
Templates to use as guides

How To Guide Template
Software Review Template
Tutorial Template

Seems like a helpful topic. Let's ensure that it adds value to the community. Thanks


Execution Result Buttons

Each example gets a button which display its return value when executed in the corresponding method. When clicked, the result can be inspected.

Follow ups: Methods which return the receiver should display 'self'

Pull Request Test Coverage Report for Build 393925013

46 of 68 (67.65%)  changed or added relevant lines in 15 files are covered.
12 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.3%) to 68.603%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/Babylonian-UI.package/BPExamplesMorph.class/instance/createAndAddNewExampleFrom..st
0
1
0.0%

packages/Babylonian-Core.package/BPTrace.class/instance/executionResult..st
0
4
0.0%

packages/Babylonian-UI.package/BPExampleMorph.class/instance/step.st
0
4
0.0%

packages/Babylonian-UI.package/BPExampleMorph.class/instance/setExecutionResultButtonContentForTrace..st
0
6
0.0%

packages/Babylonian-UI.package/BPExampleMorph.class/instance/executionResultAsString..st
0
7
0.0%

Files with Coverage Reduction
New Missed Lines
%

packages/Babylonian-Core.package/BPExampleExecutionInterrupted.class/instance/trace..st
4
0%

packages/Babylonian-Core.package/BPTrace.class/instance/recordedException.st
4
0%

packages/Babylonian-Core.package/BPTracer.class/instance/traceError..st
4
0%

Totals

Change from base Build 393913967:
-0.3%

Covered Lines:
3721

Relevant Lines:
5424

💛  - Coveralls

@codeZeilen

what do you mean with comments are inline? i just corrected a typo in the existing one


fix: prevent error in service worker environment

In Chromium extensions under Manifest Version 3, the project throws an error:

This is because in service workers, window is not defined, so isBrowser is false, but process is also not defined by default.
This could not be fixed by webpack's DefinePlugin because of the optional chaining; the optionally-chained expression actually gets transpiled to something quite different in the built package - typeof process?.env?.TXWRAPPER_METADATA_CACHE_MAX !== 'undefined' becomes typeof ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.TXWRAPPER_METADATA_CACHE_MAX) !== 'undefined', which DefinePlugin can't parse.
Currently in Talisman as we transition to MV3 we're dealing with this by monkey patching a process global variable into the service worker, however we'd like to avoid this if possible.

@chidg Just needs yarn lint:fix ran on it.

Thanks for the quick review and merge!


Model "Survey_model" ?

Hi Martijn !
Thanks for your first contribution ! Really good idea ;-)
By the way, your code call a "Surver_model" that is not available in the repo. I think this is not a big deal, but i can't understand how things work without understand what is the job of "$this->Survey_model->is_live_survey()" (#104 from manifest.php Controller).
Have a good day !
S.

Hi Stephane,
Thanks for the feedback! I should have removed this reference as it is
specific to the application I developed it for. I have done so now and
pushed the changes to GitHub.
I am using a wildcard subdomain in my application and
Survey_model->is_live_survey() just basically checks whether the subdomain
exists (&& is live/public).
Cheers,
Martijn
On Mon, Feb 20, 2012 at 4:06 AM, Stphane <
<EMAIL_ADDRESS>
wrote:

Hi Martijn !
Thanks for your first contribution ! Really good idea ;-)
By the way, your code call a "Surver_model" that is not available in the
repo. I think this is not a big deal, but i can't understand how things
work without understand what is the job of
"$this->Survey_model->is_live_survey()" (#104 from manifest.php Controller).
Have a good day !
S.

Reply to this email directly or view it on GitHub:
https://github.com/MartijnR/Manifest-Builder/issues/2

--
LinkedIn - www.linkedin.com/in/martijnvanderijdt/
Aid Web Solutions - www.aidwebsolutions.com


wrong example in text alignment section for card

There is a wrong example in 'text alignment' section for "card" in the documentation website. I think it's for 'floated content'.

Dear @smShakil,
Kindly raise any issues with Documentation in our Docs Repo: Semantic-UI-Docs with a use-case.
Thanks.

Hi, no need to open another issue, I’ll open a PR today.


Preselected value causing error

Prefilled result is passed to the template as a string not an object
So we need to add a check to see if is an object else use the string
Which fixes https://github.com/alphagov/accessible-autocomplete/issues/383

I think this is indeed the right place to be thinking of a fix, since the 'undefined' value was always in the list but the thing that has changed upstream is when the menu opens.

I think if we remove the test example here and add a CHANGELOG entry we'll be able to ship this next week.
Ideally we'd have a test but not sure that's easy on this repository.

Hmm testing this there's some really weird behaviour where the menu will never close after first focusing it with a mouse.
Wondering if we should slow down and try to clarify the menu behaviour upstream, or if this is still a good fix to roll out...

Actually it's still erroring on 'blur'.
Tip for anyone else who wants a good JavaScript error stack trace

run npm run build
run npx http-server
go to http://<IP_ADDRESS>:8080/examples/

For some reason the dev build stack traces swallow the original location so it's hard to know what has broken.

I've figured it out, the inputValue template needs to handle this change in data structure too.
I wonder if there's a sensible way to fallback if these templates fail upstream, maybe to fallback to not templating?

I think for now we'll go with the downstream fixes, but if this comes up again for other users downstream, we can do something like this upstream:
templateSuggestion (value) {
    const suggestionTemplate = this.props.templates && this.props.templates.suggestion
    var templatedSuggestion
    // Check that the template is a function that we can use
    if (typeof suggestionTemplate === 'function') {
      templatedSuggestion = suggestionTemplate(value)
    }
    // Check that the templated value is not undefined
    return typeof templatedSuggestion !== 'undefined' ? templatedSuggestion : value
  }

Nice one Nick, just tried it out and its working 🙌


Added azure devops icon

Please create an open directory as well (in foldersOpen)

Please create an open directory as well (in foldersOpen)

@mallowigi All set! I've added the additional icon. Thank you for pointing that out.


Support For Smart Plug H5086

Support For Smart Plug H5086 please. Thank you!
From Log:
[7/22/2024, 2:28:39 PM] [Govee1] [GoveePlug1] is not currently supported, do create a Github issue with the following info:
{"device":"3C:C3:60:74:F4:BC:0F:3C","deviceName":"GoveePlug1","model":"H5086","httpInfo":{"groupId":0,"device":"3C:C3:60:74:F4:BC:0F:3C","sku":"H5086","spec":"","versionHard":"1.02.00","versionSoft":"1.00.24","deviceName":"GoveePlug1","deviceExt":{"deviceSettings":"{"wifiName":"Bob","address":"60:74:F4:BC:0F:3D","bleName":"GVH50860F3D","topic":"GD/6cfe4bec6692fc1e3ec93cd44d0ffc4e","wifiMac":"60:74:F4:BC:0F:3C","pactType":1,"pactCode":1,"wifiSoftVersion":"1.00.24","wifiHardVersion":"1.02.00","ic":0,"secretCode":"Z2zP21sToJM=","boilWaterCompletedNotiOnOff":1,"completionNotiOnOff":1,"autoShutDownOnOff":1,"sku":"H5086","device":"3C:C3:60:74:F4:BC:0F:3C","deviceName":"GoveePlug1","versionHard":"1.02.00","versionSoft":"1.00.24","playState":false}","lastDeviceData":"{"online":false}","extResources":"{"skuUrl":"https://d1f2504ijhdyjw.cloudfront.net/sku-img/30618491c95bab32822318b89c92ae62-add_list_type_device_5086.png\",\"headOnImg\":\"https://d1f2504ijhdyjw.cloudfront.net/sku-img/a83b02799483139a7b4f61d9984886f7-new_h5086_pics_device_1.png\",\"headOnImgNew\":\"\",\"headOffImg\":\"https://d1f2504ijhdyjw.cloudfront.net/sku-img/94daf8d493a64a7ff592de961c123205-new_h5086_pics_device_1_close.png\",\"headOffImgNew\":\"\",\"ext\":\"\",\"ic\":0}"},"pactType":1,"pactCode":1,"share":0,"deviceId":22584584,"gidConfirmed":false,"goodsType":195,"attributesId":0,"supportScene":0}}

Hi @fwunder please update to the beta version of the plugin to see if this device logs scene codes to the homebridge log.
Note that even though the switch will be visible in homekit, it won’t work controlling the actual device (nor will it show the correct status)

Thanks Ben,
I have attached log after restart with bet version.
￼

On Jul 22, 2024, at 4:54 PM, Ben @.***> wrote:
Hi @fwunder https://github.com/fwunder please update to the beta version of the plugin to see if this device logs scene codes to the homebridge log.
Note that even though the switch will be visible in homekit, it won’t work controlling the actual device (nor will it show the correct status)
—
Reply to this email directly, view it on GitHub https://github.com/bwp91/homebridge-govee/issues/842#issuecomment-2243797387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU75AWURC3SM345YWFXTLZNVWP5AVCNFSM6AAAAABLI3VRT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTG44TOMZYG4.
You are receiving this because you were mentioned.

[7/22/2024, 6:06:32 PM] [Govee1] Initializing Govee platform...
[7/22/2024, 6:06:32 PM] [Govee1] Initialising plugin v10.9.3-beta.6 | System darwin | Node v20.10.0 | HB v1.8.4 | HAPNodeJS v0.12.2...
[7/22/2024, 6:06:32 PM] Loading 3 accessories...
[7/22/2024, 6:06:32 PM] [Govee1] Plugin initialised. Setting up accessories....
[7/22/2024, 6:06:32 PM] [Govee1] ******************************************************************************************
[7/22/2024, 6:06:32 PM] [Govee1] You are using a beta version of the plugin - you will experience more logging than normal.
[7/22/2024, 6:06:32 PM] [Govee1] ******************************************************************************************
Setup Payload:
X-HM://0024GHLCBAF84
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ 597-21-291 │
└────────────┘

[7/22/2024, 6:06:32 PM] Homebridge v1.8.4 (HAP v0.12.2) (Homebridge 8B72) is running on port 51925.
[7/22/2024, 6:06:32 PM]
NOTICE TO USERS AND PLUGIN DEVELOPERS

Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
Please visit the following link to learn more about the changes and how to prepare:
https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[7/22/2024, 6:06:32 PM] [Govee1] [LAN] server started listening on <IP_ADDRESS>:4002.
[7/22/2024, 6:06:32 PM] [Govee1] [LAN] scanning for devices over LAN...
[7/22/2024, 6:06:34 PM] [Govee1] [LAN] client enabled and found 0 device(s).
[7/22/2024, 6:06:34 PM] [Govee1] [HTTP] retrieved access token from cache.
[7/22/2024, 6:06:34 PM] [Govee1] [HTTP] client enabled and found 5 device(s).
[7/22/2024, 6:06:34 PM] [Govee1] [AWS] client enabled.
[7/22/2024, 6:06:34 PM] [Govee1] [BLE] disabling client as not supported on mac devices.
[7/22/2024, 6:06:34 PM] [Govee1] [GoveePlug2] initialising with options {"showAs":"outlet"}.
[7/22/2024, 6:06:34 PM] [Govee1] [GoveePlug2] initialised with id [07:0C:60:74:F4:BA:85:E4] [H5086].
[7/22/2024, 6:06:34 PM] [Govee1] [GoveePlug1] initialising with options {"showAs":"outlet"}.
[7/22/2024, 6:06:34 PM] [Govee1] [GoveePlug1] initialised with id [3C:C3:60:74:F4:BC:0F:3C] [H5086].
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] initialising with options {"lowBattThreshold":20}.
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] initialised with id [47:48:18:1F:69:90:E8:99] [H5179].
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] initialising with options {"lowBattThreshold":20}.
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] initialised with id [9B:CC:1B:7D:D9:62:14:C1] [H5179].
[7/22/2024, 6:06:35 PM] [Govee1] [Govee] initialising with options {"lowBattThreshold":20}.
[7/22/2024, 6:06:35 PM] [Govee1] [Govee] initialised with id [BF:68:E0:13:D5:80:A4:F9] [H5179].
[7/22/2024, 6:06:35 PM] [Govee1] [BLE] sync for thermo-hygrometer sensors disabled as required hardware/packages not available.
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":5090,"online":true}.
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] current temperature [24.3°C / 75.7°F].
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] current humidity [50.9%].
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] current temperature [28.8°C / 83.8°F].
[7/22/2024, 6:06:35 PM] [Govee1] [Inside] current humidity [63.7%].
[7/22/2024, 6:06:35 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2660,"humidity":7660,"online":true}.
[7/22/2024, 6:06:35 PM] [Govee1] [Govee] current temperature [26.6°C / 79.9°F].
[7/22/2024, 6:06:35 PM] [Govee1] [Govee] current humidity [76.6%].
[7/22/2024, 6:06:35 PM] [Govee1] [AWS] connect event.
[7/22/2024, 6:06:35 PM] [Govee1] [GoveePlug2] [AWS] sending update {"msg":{"cmd":"status","cmdVersion":2,"transaction":"v_1721685995532000","type":0}}.
[7/22/2024, 6:06:35 PM] [Govee1] [GoveePlug1] [AWS] sending update {"msg":{"cmd":"status","cmdVersion":2,"transaction":"v_1721685995532000","type":0}}.
[7/22/2024, 6:06:35 PM] [Govee1] ✓ Setup complete. This plugin has been made with ♥ by bwp91, please consider a ☆ on GitHub if you are finding it useful!
[7/22/2024, 6:06:35 PM] [Govee1] [AWS] message event [{"proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"v_1721685995532000","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_45_11050_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkALz4AJngrPgLWATGAYQAAAOw=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}].
[7/22/2024, 6:06:35 PM] [Govee1] [GoveePlug2] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"v_1721685995532000","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_45_11050_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkALz4AJngrPgLWATGAYQAAAOw=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}.
[7/22/2024, 6:06:36 PM] [Govee1] [AWS] message event [{"proType":2,"sku":"H5086","device":"3C:C3:60:74:F4:BC:0F:3C","softVersion":"1.00.24","wifiSoftVersion":"1.00.24","cmd":"status","type":0,"transaction":"v_1721685995532000","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_75_12390_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkANRsAQgkt6wGHALFpYwAAAC0=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA="]}}].
[7/22/2024, 6:06:36 PM] [Govee1] [GoveePlug1] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"3C:C3:60:74:F4:BC:0F:3C","softVersion":"1.00.24","wifiSoftVersion":"1.00.24","cmd":"status","type":0,"transaction":"v_1721685995532000","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_75_12390_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkANRsAQgkt6wGHALFpYwAAAC0=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA="]}}.
[7/22/2024, 6:07:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":5090,"online":true}.
[7/22/2024, 6:07:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:07:05 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.
[7/22/2024, 6:07:05 PM] [Govee1] [Govee] current temperature [26.5°C / 79.7°F].
[7/22/2024, 6:07:05 PM] [Govee1] [Govee] current humidity [78%].
[7/22/2024, 6:07:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":5090,"online":true}.
[7/22/2024, 6:07:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:07:35 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.
[7/22/2024, 6:08:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":5090,"online":true}.
[7/22/2024, 6:08:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:08:05 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.
[7/22/2024, 6:08:22 PM] [Govee1] [AWS] message event [{"proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"a_1721686102119","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"0_0_45_11140_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAL6kAJy0tXgBlAC0xYwAAAFY=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}].
[7/22/2024, 6:08:22 PM] [Govee1] [GoveePlug2] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"a_1721686102119","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"0_0_45_11140_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAL6kAJy0tXgBlAC0xYwAAAFY=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}.
[7/22/2024, 6:08:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":5090,"online":true}.
[7/22/2024, 6:08:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:08:35 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.
[7/22/2024, 6:09:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":5090,"online":true}.
[7/22/2024, 6:09:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:09:05 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.
[7/22/2024, 6:09:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":5090,"online":true}.
[7/22/2024, 6:09:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:09:35 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.
[7/22/2024, 6:10:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":4860,"online":true}.
[7/22/2024, 6:10:05 PM] [Govee1] [Inside] current humidity [48.6%].
[7/22/2024, 6:10:05 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:10:05 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.
[7/22/2024, 6:10:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":50,"temperature":2430,"humidity":4860,"online":true}.
[7/22/2024, 6:10:35 PM] [Govee1] [Inside] [HTTP] receiving update {"source":"HTTP","battery":29,"temperature":2880,"humidity":6370,"online":true}.
[7/22/2024, 6:10:35 PM] [Govee1] [Govee] [HTTP] receiving update {"source":"HTTP","battery":100,"temperature":2650,"humidity":7800,"online":true}.

Ben,
Just to follow up, the plug does show in Homekit AND IS controllable with correct status.
Thank you!
fred

On Jul 22, 2024, at 4:54 PM, Ben @.***> wrote:
Hi @fwunder https://github.com/fwunder please update to the beta version of the plugin to see if this device logs scene codes to the homebridge log.
Note that even though the switch will be visible in homekit, it won’t work controlling the actual device (nor will it show the correct status)
—
Reply to this email directly, view it on GitHub https://github.com/bwp91/homebridge-govee/issues/842#issuecomment-2243797387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU75AWURC3SM345YWFXTLZNVWP5AVCNFSM6AAAAABLI3VRT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTG44TOMZYG4.
You are receiving this because you were mentioned.

Does it update the state in homekit if you use the govee app to control the device?

Yes!On Jul 23, 2024, at 3:24 AM, Ben @.***> wrote:
Does it update the state in homekit if you use the govee app to control the device?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

One more followup question.
May it be possible to capture power monitoring information - watts and voltage?
Thank you!

On Jul 23, 2024, at 6:03 AM, Fred Wunderlich @.***> wrote:
Yes!

On Jul 23, 2024, at 3:24 AM, Ben @.***> wrote:

Does it update the state in homekit if you use the govee app to control the device?
—
Reply to this email directly, view it on GitHub https://github.com/bwp91/homebridge-govee/issues/842#issuecomment-2244453069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU75B7CNFWJJJ3JB3ODBTZNYAKNAVCNFSM6AAAAABLI3VRT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBUGQ2TGMBWHE.
You are receiving this because you were mentioned.

if you are able to do the following then maybe:

disable Bluetooth on your phone and force close the govee app
open the govee app to the device page - doing this should post an update set of 'scene codes' in the homebridge log
at the same time as this, take the current voltage and wattage that the govee app reports

post here the logs, as well as the readings from the govee app
steps 2 and 3 should be done at the same time as much as possible - the readings should be included somehow in the scene codes - and ideally the readings from the govee app will match what is in the codes.

GoveePlug 2:
116.59 Watt
1.01 Amp
117.19 Volt
[7/23/2024, 1:43:18 PM] [Govee1] [GoveePlug2] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"y_1721756597881744","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_47_75350_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAwPMAImwtwwBlAC2FYwAAAI4=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}.
[7/23/2024, 1:43:19 PM] [Govee1] [AWS] message event [{"proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"y_1721756599418151","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_47_75350_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAwPQAImwtxwBlAC2LYwAAAIM=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}].
[7/23/2024, 1:43:19 PM] [Govee1] [GoveePlug2] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"y_1721756599418151","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_47_75350_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAwPQAImwtxwBlAC2LYwAAAIM=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}.

This may be better timing.
GoveePlug2
115.56 Watt
1.01 Amp
116.21 Volt
[7/23/2024, 1:55:31 PM] [Govee1] [AWS] message event [{"proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"y_1721757331857966","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_43_76020_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAw9AAJgItZQBlAC0kYwAAAMM=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}].
[7/23/2024, 1:55:31 PM] [Govee1] [GoveePlug2] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"07:0C:60:74:F4:BA:85:E4","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"y_1721757331857966","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_43_76020_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAw9AAJgItZQBlAC0kYwAAAMM=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}.

perfect, i found the values, will report back

Wow. Very cool. I have yet to see any smart plug that reports power monitoring to Homekit.

These readings cannot be seen in homebridge and also cannot be seen in the Home app.
But they are still technically stored as HomeKit data.
They are only viewable via a more enhanced app like the Eve app: https://www.evehome.com/en/eve-app
It's free and is just an alternative to the home app. But it shows more info, like these power readings.
Anyway you can update to the newer beta I just posted, and hopefully they will be visible in the eve app.

Thanks Ben. The Govee plugs are exposed to the Eve app, but power measurements don't show up. Unlike the Govee Temp/Humidity measurements which do show up and allow "Migrate Measurements", the Migrate Measurements page with the Govee plug is blank.
The only thing I see in the logs which may be pertinent is:
[7/23/2024, 3:04:59 PM] [Govee1] [GoveePlug2] could not be updated as Cannot read properties of undefined (reading 'addEntry') at default.internalStateUpdate (file:///usr/local/lib/node_modules/homebridge-govee/lib/device/outlet-single.js:99:33).

woops please try newer beta

Close. Log shows:
[7/23/2024, 3:31:08 PM] [Govee1] [GoveePlug2] current wattage [117.44W].
[7/23/2024, 3:31:08 PM] [Govee1] [GoveePlug2] current voltage [117.44V].
Even app allows data migration, but I don't see values. Could be my unfamiliarity with Eve app.

Ahhhh. I figured it out in Eve App by adding Voltage, Consumption and Current to visible "TYPES".  Very cool.

i forgot one thing. please try the new beta, it should get the historical graph started in eve for the wattage

OK, I guess It doesn't download historical data? I need to wait for data to accumulate?

A potentially huge side benefit to your work...Shortcuts and automations based on Wattage, Voltage or Amperage. I just did a quick shortcut test and all three show up as custom states in shortcuts. Very cool.

Some additional data which may help.
I have noticed that loads greater than ~500 watts seem to throw the Homekit data off considerably.  Loads less than ~500 watts seem to be very consistently reported.
No Load:
[7/25/2024, 9:14:49 AM] [Govee1] [GoveePlug1] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"3C:C3:60:74:F4:BC:0F:3C","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"a_1721913289318","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"0_0_65_200_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAf3UAAg8suQTbAhejYAAAACg=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}.
Homekit:
1 W
0 A
118 V
Govee App:
1.43 W
0.03 A
117.89 V
==================================
Large Load:
[7/25/2024, 9:12:41 AM] [Govee1] [GoveePlug1] [AWS] receiving update {"source":"AWS","proType":2,"sku":"H5086","device":"3C:C3:60:74:F4:BC:0F:3C","softVersion":"1.00.25","wifiSoftVersion":"1.00.25","cmd":"status","type":0,"transaction":"y_1721913160996595","pactType":1,"pactCode":1,"state":{"onOff":1,"sta":{"stc":"19_0_64_90_1"},"result":1},"op":{"command":["qhcAAAAAAAAAAAAAAAAAAAAAAL0=","qhkAfvYAAGEsbwSlAfsEYAAAACY=","qrAAAAAAAAAAAAAAAAAAAAAAABo=","qrABAAAAAAAAAAAAAAAAAAAAABs=","rAABAAABEwAAAAAAAAAAAAAAAL8=","qh8AAAAAAAAAAAAAAAAAAAAAALU=","qhYBAAAXOwEAAAAAAAAAAAAAAJA=","qhoAAAAAAAAAAAAAAAAAAAAAALA=","qicAAAAAAAAAAAAAAAAAAAAAAI0="]}}.
Homekit:
643 W
11.9 A
114 V
Govee App:
1388.98 W
12.60 A
113.92 V

oops please try 10.9.3-beta.14

That seems to have fixed it! I still do not see historical graphs in EVE like I do with H5179.
Attached menu shortcut showing energy.

does Eve not show a graph at all for this model?

No it does not. See photos below.
H5086

H5179

I have attached longer log for additional info. Log includes H5179 (3)  and  H5086 (2)
homebridge-govee.log-3.txt


Pass migration config object as an argument to the migrations themsel…

…ves, to allow custom parameters to be set for migrations. (#2014)

Associated documentation update:
https://github.com/knex/documentation/pull/130

I updated the migration stubs that were obvious, all except the typescript stub.
I'm not sure what to do with the typescript migration stub, since I'm not familiar with typescript.

This would also be helpful for the https://github.com/tgriesser/knex/issues/2799 use-case. @elhigu Do you approve of this idea in general? There's a minor conflict to be resolved before this could be merged, but at this point it's unclear if it's worth doing so.

@elhigu I think all use-cases are going to be about parametrizing migration execution from the outside. If these should be set through knex instance itself, I think we should define a recommended way to do it (e. g. have precreated knex.locals empty object for population) and document it. If you think that this is a better way, I can do both the code and the documentation change.

@elhigu I think all use-cases are going to be about parametrizing migration execution from the outside. If these should be set through knex instance itself, I think we should define a recommended way to do it (e. g. have precreated knex.locals empty object for population) and document it. If you think that this is a better way, I can do both the code and the documentation change.

I like something like knex.locals or even more descriptive knex.userParams more. That would be more versatile solution that could work for more things than just migrations and initial values for those already in knex configuration.

Wouldn't that have race conditions?

@elhigu I think all use-cases are going to be about parametrizing migration execution from the outside. If these should be set through knex instance itself, I think we should define a recommended way to do it (e. g. have precreated knex.locals empty object for population) and document it. If you think that this is a better way, I can do both the code and the documentation change.

I like something like knex.locals or even more descriptive knex.userParams more. That would be more versatile solution that could work for more things than just migrations. Initial attributes for that object could be given already in knex configuration.

Wouldn't that have race conditions?

@elhigu I think all use-cases are going to be about parametrizing migration execution from the outside. If these should be set through knex instance itself, I think we should define a recommended way to do it (e. g. have precreated knex.locals empty object for population) and document it. If you think that this is a better way, I can do both the code and the documentation change.

I like something like knex.locals or even more descriptive knex.userParams more. That would be more versatile solution that could work for more things than just migrations. Initial attributes for that object could be given already in knex configuration.

Wouldn't that have race conditions?

Not that I can think of. Why would it?

Imagine typicaly multi-tenancy scenario: you have independent schemas that can be migrated totally independently. You run their migrations in the loop, setting params on same knex instance. It is totally possible that you will run start migrations for schema 2 while only 77 out of 100 migrations for schema 1 passed, then migration 78 for schema 1 will suddently be executed with params for schema 2.
You can obviously await till schema 1 is done before starting with schema 2, but this means we have more limitations and gotchas that we could have with better isolation (e. g. passing params to migration itself rather than knex).

Imagine typical multi-tenancy scenario: you have independent schemas that can be migrated totally independently. You run their migrations in the loop, setting params on same knex instance. It is totally possible that you will run start migrations for schema 2 while only 77 out of 100 migrations for schema 1 passed, then migration 78 for schema 1 will suddenly be executed with params for schema 2.
You can obviously await till schema 1 is done before starting with schema 2, but this means we have more limitations and gotchas that we could have with better isolation (e. g. passing params to migration itself rather than knex).

Ah right, that use case where migrations are ran like that. Yep, something should be thought to address that.
I was thinking at some point something like knex.userParams({}) which would return kind of instance of knex, using the same pool, but there would be different user parameter set assigned to that "instance".
I'm not sure at all what would be the best solution and API (I know only that I don't want it to be specific functionlity for migrations only).

Ah, that might work - will try to update existing PR to use the kind of implementation that you are suggesting.

Is that option of passing parameters already implemented?

Yes. https://knexjs.org/#Installation-parametrization


MINOR: [Python][Docs] Add examples for MapArray.from_arrays

Rationale for this change
This PR enriched the MapArray.from_arrays with some nice examples. The examples are from the real-world scenario of working with survey data (scaled down, of course).

What changes are included in this PR?
The only change that this PR presents is to the docstring of the MapArray.from_arrays function.

Are these changes tested?
Does not apply

Are there any user-facing changes?
Yes, the docstring of the MapArray.from_arrays function.

Great example! I left a few small comments, let me know what you think. I thought it might be clearer to explicitly state that the numpy representation is there to visualize the data that we will put in the MapArray.

I accepted both of your changes. Thanks so much. I'm glad you like the example.

Could you read the auto generated comment?
https://github.com/apache/arrow/pull/37656#issuecomment-1714123805

Hi @slobodan-ilic and thank you for this great example! Adding a suggestion to fix the doctest error.
We should also add an issue for the PR to be linked to, as Kou already mentioned.

@AlenkaF I was thinking about adding MINOR: [Python] Add examples for MapArray.from_arrays rather than creating an issue, since I believe it's a minor PR (as per second part of the autogenerated comment that @kou referenced). But if you say the issue creation is the way to go forward, please lmk and I'll do so.

@AlenkaF I was thinking about adding MINOR: [Python] Add examples for MapArray.from_arrays rather than creating an issue, since I believe it's a minor PR (as per second part of the autogenerated comment that @kou referenced). But if you say the issue creation is the way to go forward, please lmk and I'll do so.

Yes of course, that is totally fine 👍

Thanks for the contribution @slobodan-ilic !

Thanks for the contribution @slobodan-ilic !

Hi @raulcd! Long time no see ❤

@AlenkaF I was thinking about adding MINOR: [Python] Add examples for MapArray.from_arrays rather than creating an issue, since I believe it's a minor PR (as per second part of the autogenerated comment that @kou referenced). But if you say the issue creation is the way to go forward, please lmk and I'll do so.

Yes of course, that is totally fine 👍

@AlenkaF I'm seeing some failures in the AppVeyor build, and they seem unrelated to my changes. Furthermore, when I run the offending tests locally, they all pass (this seems to be one: python/pyarrow/tests/test_fs.py::test_get_file_info_with_selector). How should we resolve this?

@AlenkaF I'm seeing some failures in the AppVeyor build (even after accepting your changes), and they seem unrelated to my changes.

It seems to be failing on main as seen here: https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48012043
I've opened a different issue to track it here: https://github.com/apache/arrow/issues/37675

@AlenkaF I'm seeing some failures in the AppVeyor build (even after accepting your changes), and they seem unrelated to my changes. Furthermore, when I run the offending tests locally, they all pass. This seems to be one: python/pyarrow/tests/test_fs.py::test_get_file_info_with_selector. How should we resolve this?

There is already an open PR to fix this issue https://github.com/apache/arrow/pull/37558 so you can ignore this failing build.

I'm fine leaving it the way it is! I do agree the example is more relateable this way.

Added one last suggestion, otherwise LGTM!

Added one last suggestion, otherwise LGTM!

Addressed. 💯


How to add clip loss in Guidence part for stable diffusion latent ?

Hi, thanks for your great work.
I'm trying to add clip loss for stable diffusion latent in the Guidence part, but when i decode image from latent and put it into clip_model, when cal clip_loss with latent, it occurs an error, RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior. How to fix this problem or is there any example to refer?

There is a community example showing CLIP guidance here that should help: https://github.com/huggingface/diffusers/blob/main/examples/community/clip_guided_stable_diffusion.py