Add JSON.def_to_json

This puts the def to_json generator from JSON.mapping in a separate macro to make it individually accessible where automatically declared instance variables and parser are not needed. This comes in two flavors: one for converting self to JSON (this is the same as JSON.mapping without the extra features) and one which accepts the object-to-be-converted as an argument - this is useful to define JSON converters.
Further documentation and specs are included.
This PR was extracted from #4746 which also shows an exemplary usecase.

CI checks are failing because of a formatter issue. I couldn't isolate the reason for this but it looks like it might be related to #4769 - at least it occures at a similar location, inside field_to_json. I'd be happy if someone could take a look at this! Maybe @MakeNowJust ? =)

@straight-shoota done in #4801.

Rebased on master with #4801. Builds are still failing because the last commit removes the workaround and the default compiler (0.23.1) does not have the fix from #4801. The compiler needs to be built from current master. I guess this won't work without nightly builds. Should I keep the workaround in for now?
@RX14 What do you think about this PR in general?

I don't understand the point of this addition, or how it relates to JSON.mapping.
Also, all releases must be buildable by the last release. Nobody is going to merge this enforce it passes CI.

Alright, so I'll keep the workaround until the next compiler version is released.
JSON.mapping consists of three individual tasks all three are based on the fields defined in properties.

define instance variables
define an initializer to read object state from a JSON::PullParser
define a to_json method to export object state with a JSON::Builder

For some usecases (like exporting the compiler's type and method definitions to json) there is no need to define ivars nor a parser which would both come with JSON.mapping.
So currently, you have to define a plain to_json method manually. Such methods have very repetitive code and can easily abstracted. It is nice to not have to write the same stuff over and over again but have a simple macro which creates such a to_json method. An additional benefit of this macro is, that the behaviour is no longer expressed in code but simple declarative data (a named tuple) similar to properties of JSON.mapping.
This functionality was for the most part already implemented in JSON.mapping but it could not be used individually without the ivars and parser. So I extracted this part of JSON.mapping into a macro JSON.def_to_json which is employed by JSON.mapping but can also be used directly.

I would suggest value instead of property, as like you pointed out earlier it's not always a property of the object, it can be a method call!
So an example would be:
@name = "FooBar"
JSON.def_to_json({
  name: { value: name.downcase }
})

And to simplify a bit: as in JSON.mapping, where name: Type is the same as name: {type: Type}, we could say that name: name.downcase is the same as name: {value: name.downcase}

I've thought about that simplification. It's just that then it's difficult to have a shortcut for the case that JSON key and property name are equal. This is currently encoded by the value true (in fact it could be anything that is not a named tuple or hash literal). If the value is used as value expression by default, you'd have to have certain exceptions like that it does not apply if it is a NamedTupleLiteral or HashLiteral (because they used to hold options) and perhaps BoolLiteral or NilLiteral as well as it could be used as a shortcut for equal names.
For the typical usecase I was thinking of (like #4746) it would be mostly simple mappings with identical key and property names. But having a shortcut to define property (or value) option is also quite powerful.
I am honestly not sure which way is better.

Copied from line comments by @bew (question) and me (answer) so it doesn't get lost:

In the current JSON.mapping macro, one specify the crystal's property name as key in the properties arg (your mappings arg), then you can specify an optional key if the JSON field name is different.
Here you did it the other way around, why?

I think it makes more sense this way: with def_to_json you're basically describing a JSON object schema. The keys of this schema correspond to the keys of the named tuple and the value defines which value is to be assigned.
mapping on the other hand has a different focus: it primarily defines properties as instance variables and adds methods to convert them to JSON and back. Here it makes sense to have the crystal properties as keys (because that's the main part) and the JSON field names as arguments.
While the properties argument looks quite similar, both macros have a different usecase and allow different options, so I don't think it is bad to have different semantics between key and value.
For def_to_json there is also the benefit that this way it is very easy to use arbitrary expressions as value:
@name = "FooBar"
JSON.def_to_json({
  name: { property: name.downcase }
})
# to_json will output {"name":"foobar"}

This would not be possible or look very nasty if it was used as a key.

@RX14 there have been a few CI builds where only linux64 failed with fork: Cannot allocate memory (Errno).

https://travis-ci.org/crystal-lang/crystal/jobs/264329947
https://travis-ci.org/crystal-lang/crystal/jobs/264463818
https://travis-ci.org/crystal-lang/crystal/jobs/264300926

About the simplification, here an example of what you could use:
JSON.def_to_json({
  element: _, # Use element
  node: hello.node_getter, # Use hello.node_getter
  stuff: _, # Use stuff
})

Example: https://carc.in/#/r/2j3c
I find it pretty readable, with no duplication, and this could allow the simplification I talked about earlier!

@bew That looks like a great idea!

Does this PR need any additional work?

Just a note that a more granular API isn't always good. Look at Java, for example. Many ways to do the same things is also confusing. I don't understand why JSON.mapping is not enough. If it generates a initialize(pull_parser) method that you don't need, it's not that terrible, really. Now users will have JSON.def_to_json and JSON.mapping to choose. There's also this weird location: _ syntax.
I am personally not sure about this.

@asterite this is for the case where you don't want to serialize all the instance variables, only a subset, so the generated initialize would be invalid

@asterite The main problem with JSON.mapping for serialize-only is not an unnecessary initialize method, it's the instance variables. As evidenced by the usages of this macro in #4746, most of the JSON values are not stored in ivars but are actually return values from methods.
If you wanted to achieve the same, you'd have to create dedicated export types with JSON.mapping for each exportable type
For Crystal::Doc::Method this would look like this:
def to_json(builder : JSON::Builder)
MethodExport.new(self).to_json(builder)
end
struct MethodExport
JSON.mapping(
id: String,
html_id: String,
name: String,
doc: String,
summary: String,
abstract: String,
args: String,
args_string: String,
source_link: String,
def: String
)
def initialize(method)
@id = method.id
@html_id = method.html_id
@name = method.name
# ...
end
end

You can always do:
  def to_json(builder : JSON::Builder)
    builder.object do
      builder.field "name", @name
      builder.field "age", @age
    end
  end

There's no need to create an extra object with the mapping.
I'm still not sure introducing a huge refactor and more public API methods is good in this case.

Also, once we introduce meta attributes for instance variables, all of this will be kind of obsolete. You'll just specify which instance variables should be serialized, and how. That will work for generating JSON and for parsing, like in every other programming language. So I wouldn't continue making changes to JSON just yet.

Yes, manually writing to a JSON::Builder is possible, but produces a lot of duplicate boilerplate code. It's certainly debateable if this is worth it. But in fact, most of the functionality is already there in JSON.mapping, this macro just exposes this to use it independently. So there is only few additional code added by this PR.

Personally I don't mind the manual to_json using JSON::Builder. It's certainly not too much extra boilerplate. It's still 1 line per ivar.

Okay, I'll try this for #4746

I don't think this is worth pursuing anymore, given that building the JSON manually is pretty straightforward.


python3Packages.asyncio-dgram: 2.1.1 -> 2.1.1

Motivation for this change
https://github.com/jsbronder/asyncio-dgram/blob/master/ChangeLog
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 153060 run on x86_64-linux 1

1 package failed to build:

home-assistant

8 packages built:

python38Packages.aioguardian
python38Packages.asyncio-dgram
python38Packages.mcstatus
python38Packages.pywizlight
python39Packages.aioguardian
python39Packages.asyncio-dgram
python39Packages.mcstatus
python39Packages.pywizlight

Result of nixpkgs-review pr 153060 run on x86_64-linux 1

1 package failed to build:

home-assistant

8 packages built:

python38Packages.aioguardian
python38Packages.asyncio-dgram
python38Packages.mcstatus
python38Packages.pywizlight
python39Packages.aioguardian
python39Packages.asyncio-dgram
python39Packages.mcstatus
python39Packages.pywizlight

Home Assistant failure is unrelated:
       > =========================== short test summary info ============================
       > FAILED tests/helpers/test_httpx_client.py::test_warning_close_session_integration[pyloop]
       > FAILED tests/helpers/test_httpx_client.py::test_warning_close_session_custom[pyloop]
       > = 2 failed, 14984 passed, 11 skipped, 3 xfailed, 372 warnings in 4279.97s (1:11:19) =

Home Assistant failure is unrelated:
       > =========================== short test summary info ============================
       > FAILED tests/helpers/test_httpx_client.py::test_warning_close_session_integration[pyloop]
       > FAILED tests/helpers/test_httpx_client.py::test_warning_close_session_custom[pyloop]
       > = 2 failed, 14984 passed, 11 skipped, 3 xfailed, 372 warnings in 4279.97s (1:11:19) =

@ofborg build home-assistant

@ofborg build home-assistant


Added #37: appveyor build for monitorrent.

Added #37

There seems to be a problem with lxml download using a terribly slow ftp server for windows. Will submit a modified script with workaround.


⚠ RPC server - Astar has degraded performance

In 471b321, RPC server - Astar ($ASTAR_RPC_URL) experienced degraded performance:

HTTP code: 429
Response time: 732 ms

Resolved: RPC server - Astar performance has improved in 0e3735c.


MySQL 8.0?

Describe the bug
Every 10 requests result in error 500.
To Reproduce

Upgrade to MySQL 8
Upgrade to latest version of postal (as of 2022.10.13)
Start using the web interface
See error

Expected behaviour
No error
Environment details

OS: Ubuntu 22 + docker
Version 2.1.2

Additional information/context
[8] [2022-10-14T04:35:19.793] INFO -- : Completed 500 Internal Server Error in 42ms (ActiveRecord: 26.8ms)
[8] [2022-10-14T04:35:19.795] FATAL -- :
[8] [2022-10-14T04:35:19.795] FATAL -- : ActionView::Template::Error (The client was disconnected by the server because of in$
[8] [2022-10-14T04:35:19.795] FATAL -- :     26:             = link_to [organization, server], :class => 'largeList__link' do
    27:               %span.largeList__rightLabel.label{:class => "label--serverStatus-#{server.status.underscore}"}= t("serv$
    28:               %p= server.name
    29:               %p.largeList__subText #{number_with_precision server.message_rate, :precision => 2} messages/minute
    30:       .js-searchable__empty.is-hidden
    31:         .noData.noData--clean
    32:           %p.noData__title No servers were found...
[8] [2022-10-14T04:35:19.795] FATAL -- :
[8] [2022-10-14T04:35:19.795] FATAL -- : lib/postal/message_db/database.rb:319:in `query_on_connection'
lib/postal/message_db/database.rb:311:in `block in query'
lib/postal/message_db/mysql.rb:20:in `client'
lib/postal/message_db/database.rb:342:in `with_mysql'
lib/postal/message_db/database.rb:310:in `query'
lib/postal/message_db/live_stats.rb:34:in `total'
app/models/server.rb:135:in `message_rate'
app/views/servers/index.html.haml:29:in `block (2 levels) in _app_views_servers_index_html_haml___1505894316457539718_4717191$
app/views/servers/index.html.haml:26:in `block in _app_views_servers_index_html_haml___1505894316457539718_47171917758060'
app/views/servers/index.html.haml:24:in `each'
app/views/servers/index.html.haml:24:in `_app_views_servers_index_html_haml___1505894316457539718_47171917758060'
lib/postal/tracking_middleware.rb:12:in `call'

For anyone having similar issues - I solved it by replacing mysql with MariaDB. Immediately fixed the issue.

Are you able to see the rest of the error message? It gets cut off The client was disconnected by the server because of in...

Sorry, it appears my terminal window cut-off the rest. Unfortunately, the log seems to be rotated already.

It could be “The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior” (ER_CLIENT_INTERACTION_TIMEOUT) did you configure these?

No, I did not configure anything. Everything was set-up out of the box.


beginTextureFill partial support of texture regions

Fixes #5503 .
Algorithm works only if path does not cross edge of the texture.
Demo: https://www.pixiplayground.com/#/edit/M1BjLnu5mYIhqlNOdhMkJ
Thanks to @M00nR4bb1t

Thank you!
But, umm... I suppose this was already merged and so doesn't matter, but...
I think I may have accidentally erased everything in the demo? And I can't seem to be able to find a way to roll back or anything? I tried to just copy and paste the code from my demo (https://jsfiddle.net/gazenx30/8/) but for some reason, I can't get pixi.js v5.0.0-rc.3 to run properly in the playground.
So, umm... Just letting you know :(


Is there any conflict between skip_diff and skip_unchanged?

skip_unchanged requires a comparison between the imported and persisted rows, skip_diff purports to skip that comparison.  Does that yield any conflict, or are they perfectly OK to use together?
If so, perhaps it makes sense to adjust the documentation to make this more clear.
Separately, skip_unchanged isn't called out anywhere as a potential performance optimization, but it seems like it would be one, if indeed it skips saving objects which it will not have not changed?

Thanks for raising.  I have updated the documentation in #1655 to make this clearer.

Thanks!


fix: clean-up dummy entities

use empty array instead

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

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


interruptOnTimeout doesn't work in Hystrix 1.4.0-RC5

When using Hystrix 1.4.0-RC5, the commands are not interrupted when the command times out.
The following naive test shows how to reproduce this:
public class InterruptTest
{
	private static final Logger LOG = LoggerFactory.getLogger(InterruptTest.class);

	private class SleepingCommand extends HystrixCommand<Void> {

		public SleepingCommand() {
			super(Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey("mygroup"))
					.andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
							.withExecutionIsolationThreadInterruptOnTimeout(true)
							.withExecutionIsolationThreadTimeoutInMilliseconds(1000)));
		}

		private volatile boolean hasBeenInterrupted;

		public boolean hasBeenInterrupted()
		{
			return hasBeenInterrupted;
		}

		@Override
		protected Void run() throws Exception
		{
			try {
				Thread.sleep(2000);
			}
			catch (InterruptedException e) {
				LOG.error("Interrupted!", e);
				hasBeenInterrupted = true;
			}

			return null;
		}
	}

	@Test
	public void shouldInterruptOnTimeout() throws InterruptedException
	{
		// given
		SleepingCommand cmd = new SleepingCommand();

		// when
		cmd.observe().subscribe();

		// then
		Thread.sleep(3000);
		Assert.assertTrue(cmd.hasBeenInterrupted());
	}
}

It works fine with Hystrix 1.3.18.

@aadeon This is a bug, but I think the fix has to be made in conjunction with RxJava.  I talked to @benjchristensen this morning, and there is some active work around thread interruption happening in RxJava at the moment.
Right now, RxJava is unilaterally deciding to do thread interruption on an unsubscribe.  IIRC, up until 1.02, the choice was to do it, and for 1.0.3+, the choice was not to.  The point is that there's currently no way for Hystrix to specify this decision on a per-instance basis.
As @benjchristensen make progress on this interaction, I'll put notes here.
In order to not hold up RC6, I'm now targeting this to RC7

I now have a tentative fix for this issue that respects the property value on whether or not to interrupt the underlying thread, and am awaiting feedback on it.  I think the interaction between Hystrix and Rx could be improved and want to see what options there are before committing to the version in #593

Currently, we interrupt a ScheduledAction if the unsubscription was called from a different thread the action is running on. If it was called from the same thread, we cancel the underlying future without interruption. This saves us some time for normally completing actions.
@abersnaze's PR was no-op in RxJava but the associated test change suggests there is a custom Scheduler involved which doesn't track its active tasks so unsubscribing its worker doesn't cancel the scheduled tasks. I'm not familiar with how Hystrix interacts with RxJava.

Fixed in #647


Exclude link not excluding "relates to"

jira-dependency-graph.py:
--exclude-link 'relates to' --exclude-link 'SAFe Parent of' --exclude-link 'SAFe Child of' --ignore-epic --show-directions outward --ignore-subtasks --dont-traverse --local $ISSUE > $ISSUE.dot
'SAFe Parent of' and 'SAFe Child of' work
'relates to' does not

Uh, I could not reproduce, TBH. I did check the "relates to" link type, all fine. strip() doesn't seem to break anything, so I decided to merge. Thanks @thomas0306


chore: 677 - remove unused household code

chore: removes unused code relating to household/spouse

@emi-hi Looks good! I think we'll save this for the release after the upcoming release (which includes the CRA automation stuff), just so it's easier to figure out what the issue is if something goes wrong with the upcoming release. Also, we should get the new BCSC test logins and do a quick test with those, just in case!


White title and text when expecting black

When creating an row with bg-inverse and then inside it we create a regular card component the title changes to white even if the card default behavior is white bg with black text.
DEMO : http://codepen.io/igcorreia/pen/KrbgNm
Boostrap: v4-alpha
Browser: Chrome 54

Special title treatment

With supporting text below as a natural lead-in to additional content.

            Go somewhere

      123

      123

@Igcorreia Your problem has nothing to do with bg-inverse. The bg-info class is causing the problem. Here is a simplified pen demonstrating the problem: http://codepen.io/anon/pen/KrbaaK.
Something should be fixed with the card component to make sure color is set to the default value (that can be changed with .card-inverse).

BTW, if https://github.com/twbs/bootstrap/pull/19847 gets merged, that could be a workaround.

Closing per https://github.com/twbs/bootstrap/issues/20496#issuecomment-238946972.

@mdo I still think we should consider having .card set color. This is sort of unexpected behavior IMHO.


Document backup when using user setting. Fixes #626

~Document rootless backup~
Document backup when using a custom user.
Fixes #626
Edit: After checking, I am actually not running as rootless but just setting up user. Actual rootless does not work atm.

Closed in favor of https://github.com/sissbruecker/linkding/pull/653 to be cleaner.


Merge changes on master into live branch

The 4/13 version update info has been merged into master on 4/14. We need to pull that into live.

@yoduoy,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

Skype/Skype-For-Business-Uris/AndroidCall.md
:white_check_mark:Succeeded

Skype/WebSDK/docs/PTAuthWebTicket.md
:white_check_mark:Succeeded

Skype/WebSDK/docs/SkypeWebSDKVersionUpdateNotifications.md
:white_check_mark:Succeeded

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


[3Hl7fTsQ]  Dev fix misleading name column

The name column was different between these 2 equivalent procedures, and wasn't even actually giving the name of the constraint/index. So this makes it more consistent with SHOW CONSTRAINTS/INDEXES

@loveleif in order to fix a failing test I had to make quite a few changes, when you have time can you review the second commit? :)


The description of ServicePrincipalNames is not correct

As title:
-ServicePrincipalNames
Use the DateTime syntax when you specify this parameter. Time is assumed to be local time unless otherwise specified. When a time value is not specified, the time is assumed to 12:00:00 AM local time. When a date is not specified, the date is assumed to be the current date.

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

ID: 22bb7107-c501-6b6f-1f6a-dcb66c65b703
Version Independent ID: b73926ab-2463-30a9-ccc9-7038fbcd98f3
Content: Set-ADServiceAccount (addsadministration)
Content Source: docset/windows/addsadministration/set-adserviceaccount.md
Product: w10
GitHub Login: @brianlic-msft
Microsoft Alias: brianlic

ServiceNamePrincipleNames to set access on File Share (CIFS) or all by HOST is not working :
Set-ADServiceAccount -Identity gMSAAccount -ServicePrincipalNames @{add="HOST/computername"}
Set-ADServiceAccount : The operation failed because SPN value provided for addition/modification is not unique forest-wide
At line:1 char:1

Set-ADServiceAccount -Identity gMSAAccount -ServicePrincipalNames @ ...

  + CategoryInfo          : NotSpecified: (TFSBuildgMSA:ADServiceAccount) [Set-ADServiceAccount], ADException
  + FullyQualifiedErrorId : ActiveDirectoryServer:8647,Microsoft.ActiveDirectory.Management.Commands.SetADServiceAccount

I've worked on this issue and the additional information has been added into PR #935

I've created a new PR solve this issue #954

@nenonix @JohanFreelancer9 Kindly perform copy editing on this PR. Thanks.

Hi @j0rt3g4,

HI, @dariomws306 What's up?

Write that on Teams ty.

Updated PR #954

#1006  Solves the issue.

@bagdxk
Upon your feedback, We have updated the content with relevant changes accordingly. Thanks.

@officedocsbot close


aioquic 0.9.25

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

References:

unblocks https://github.com/conda-forge/hypercorn-feedstock/pull/44

@conda-forge-admin please rerender


Removing AddToCal Module

Removing AddToCal Module
Update Smart Date Module to 3.3

I thought we were going to keep the module installed so it could get scanned – but just not configure it for use?


Sphereon ssi agent not working with docker compose

Hi i'm trying to setup the 3 docker container, but i have a problem with the ssi agent.
I launch the .sh script (./install-configs.sh sphereon  http://<my_local_ip>:5000)  to setup the conf files, but when i launch the container it exits with the following error:
opt/oid4vc-demo/node_modules/.pnpm/@sphereon+oid4vci-issuer@0.10.4-unstable.61_msrcrypto@1.5.8/node_modules/@sphereon/oid4vci-issuer/dist/builder/VcIssuerBuilder.js:13
2024-06-10 15:47:09             throw new Error('IssuerMetadata should be from type v1_0_13 or higher.');
How can i fix this problem?
Thanks in advance

Hi @Soapfedan
Yes, sorry for that. We are in the middle of adding new specification versions and it seems the demo has already seen merges into develop containing the new specifications, without the examples being updated. Since we have not release new versions of the wallet yet, we will be in limbo until roughly middle next week.
Sorry for that

Hi @nklomp, thanks for your reply. Now i solve the problem. I checkout to the previous develop commit (951d10c2156a776b7d04f19c703445b8dad88151), where you upgraded the libraries.
Now the demo works but when i scan the qr with my wallet i obtain the following error

I already check that my phone reach the endpoint, that endpoint gives me this JWS
eyJhbGciOiJFUzI1NiIsImtpZCI6ImRpZDpqd2s6ZXlKaGJHY2lPaUpGVXpJMU5pSXNJblZ6WlNJNkluTnBaeUlzSW10MGVTSTZJa1ZESWl3aVkzSjJJam9pVUMweU5UWWlMQ0o0SWpvaVZFY3lTREo0TW1SWFdFNHpkVU54V25CeFJqRjVjMEZRVVZaRVNrVk9YMGd0UTAxMFltZHFZaTFPWnlJc0lua2lPaUk1VFRoT2VHUXdVRTR5TWswNWJGQkVlR1J3UkhCdlZFeDZNVFYzWm5sYVNuTTJXbWhMU1ZWS016TTRJbjAjMCIsInR5cCI6IkpXVCJ9

It has to do with the current Android wallet in the store not allowing http connections and only https. If you would run the app in development mode with a USB cable ot will work. We will probably revert this for next store release as we are getting more reports of people testing against http URLs

Thanks for the clarification @nklomp


[BUG]: Groups without operations can't be created

Bug Description
When trying to create a group without an associated operation using the mds-desktop app, the backend returns an error.
Expected Behavior
When trying to create a group without an associated operation using the mds-desktop app, the backend should not return an error.
Steps to Reproduce

Create a new group without an associated operation.
Click Create
Group is not create and error is returned

Possible Solutions
This happens because at the moment a non-existent operation leads to the sent group having an  value of empty string for the operation. This in turn leads to a constraint violation in the backend. => Solution: As this is probably happening in the same way in other places, investigate which fields for which entities are optional and add handling for absent fields to the backend communication.
Further Information
No response

fixed in 146a7bc5303b1455c5ccab08dc0eca152b32f33f.


Cluster operations hang if Azure cluster requires AAD authentication

azure-cli (2.0.55)
Happened both on Mac and Ubuntu 18.04 LTS.
when opening an AKs cluster that is AAD controlled, the extension cannot detect the output from the login tool and thus simply hangs, and you have to kill the instance to break out of it.
here's the experience.

I do want to note that the error you get here is because I'm using the user identity, which does not have get perms or list perms yet. BUT that's not the point. We don't detect the 2FA prompt. We'll need to figure out how to handle this generally, as not only Azure will have 2fa. But for now, Azure.

@itowlson we have the magic incantation in our KeyVault.
Send me a mail and I'll send you the links...

Ok, I know what is going on here, what's more interesting is figuring out how to fix it...
Generally, this will work, but the first time that kubectl authenticates it kicks the oauth/device login web flow.
That's what is getting stuck. I think the right thing to do is load the kubeconfig in javascript in the extension and attempt to detect that there's no token...
I'll take a stab at it.

Thanks, @brendandburns, I have been flying around so haven't been able to get back to this to help Ivan out.

It would also be useful to add a timeout for the operation, and show a notification which links to the kubectl output pane. That way, any unexpected error could be easily examined.


Multiple/alternative data retrieval implemenations

Currently Helia takes a blockstore that it enhances with bitswap.  This creates a hard dependency on bitswap.
To enable experimentation and adoption of faster/more use-case specific retrieval protocols (cars, graphsync, XYZNewFutureProtocol etc) we should allow this to be a configuration option.
At this point blocks may not be the correct abstraction since it limits us to a block as the unit of data you get in response to a CID.
A better read abstraction might be a CID to a stream of Uint8Arrays?  The the underlying retrieval method can apply whatever optimisations it can to fetch the data quickly and the calling code doesn't have to keep going back to fetch another block for another CID.
interface Options {
  offset?: number
  length?: number
}

interface ContentReader {
  get (cid: CID, options: Options): AsyncGenerator<Uint8Array>
}

Questions:

Does this shift complexity of interpreting block data on to the content reader?
What does the writer interface look like?

Can the writer/reader interfaces be asymmetric?  E.g. CIDs/Blocks in, CID/Stream out?

Does this assume file data?
What about structures like unixfs where the root block has file metadata and then file data in leaf nodes?
If DAGs are all dag-pb, dag-cbor or dag-json we can make some assumptions about structure?

@achingbrain Can we call this done since we completed the implementation of the BlockBroker interfaces?


[docs] move Makefile from project root to subdir 'docs'

Initially, we put the Makefile for building the docs in the root of the repo, because we expected to add entrypoints for other tasks in the same file. However, given how the rest of the repo evolved, that is probably not going to happen. We will probably have some orchestration/entrypoint in the root which wraps the different makefiles. Therefore, this PR moves the Makefile for building the documentation into subdir docs.

I like that! :+1:
Make the root directory a little bit cleaner 😅

I have updated the user guide accordingly.
Everything should be sync now, or did we forget something?

I cannot think of any missing piece at the moment. Anyway, we can fix it afterwards in case we forgot anything. Hence, shall we merge?


c++ compat for std::isnan;

FWIW, this explains why I don't want to do this: https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice


Cocos Creator should use 'cc.sys.localStorage' instead of 'window.localStorage'

In my case, I use cocos creator to build mobile games, all javascript program are running in v8 engine just like nodejs. So there's no 'window' object. We use 'cc.sys.localStorge' instead of it. In browsers, 'cc.sys.localStorge' uses window.localStorge and in mobiles it uses sqlite.
'cc.sys.localStorge' is a part of cocos-js.

I think I know how to do it:
put 'window.localStorge = cc.sys.localStorge;' in line 1 and the app runs correctly.
But, is it OK to set a readonly var??

plus 'if (cc.sys.isNative)' now it's good enough.

Hi @FredDull, thanks for letting me know.
I've never had experience with Cocos Creator, as this library is supposed to work on every browser-related project, I think it makes sense to have this check in the main library.
I'll let this issue opened until this check is done in the main library.
Cheers!

Another compatiblity issue with Cocos Creator: https://github.com/gamestdio/websocket/issues/3

The latest version has a check for cc.sys. localStorage and use it if it's available.


Can't write data to influxdb which installed in EC2

Hi there,
Thanks for your docs and it really helps me a lot!
Recently we have looked over your docs(https://github.com/Nordstrom/serverless-artillery-workshop/tree/master/Lesson4 - I can see clearly now... InfluxDB and Grafana) and did it step by step.
However, when we finished the Step3(Update the scripts to influx server) successfully and go to select some load testing data from Influxdb but it's empty with no database and no throwing error or warning in log. (we ensure that the plugins config in the script.yml was correct and the installed Influxdb in our EC2 host was working good). We don't know what to do next，Could you please help give some suggestions or some reference docs about this?
Looking forward to your reply,
Thanks

Closing as duplicate of https://github.com/Nordstrom/serverless-artillery-workshop/issues/17


[Task]: Disallow explicitly importing modules generated for client declarations

Description
$title.
Describe your task(s)
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response

Fixed in https://github.com/ballerina-platform/ballerina-lang/pull/38439.


Restore access to account David.Pursehouse

I am unable to log in due to the error This password appears in a breach or has been compromised and cannot be used.
I've submitted a reset request via the website, but have not received the email.
I suspect the problem is that the email address on the account is one that I no longer have access to (it's at my previous employer and I probably forgot to change it when I moved).

Update: I confirmed that the account has the old email address.  Requesting a reset with my current email address failed, but requesting with the old email address went through OK (although I no longer have access to it, so can't complete the reset).

@dpursehouse Please email me at<EMAIL_ADDRESS>


Does orchestrator  support "supply data from a  DeadMaster" ?

There is a scenrio that where one-master/two-direct-slaves  asynchronous  mysql topology,  where a master instance found dead but host is fine,

before promote one ideal slave,   the promoted slave could apply the unfinished relay-logs(do not stop slave), and then get diff binlogs  from dead master, when all is done,  do 'reset slave all' thing。
in all promoting-one-slave-process, could orchestrator give a proper time to ideal slave to apply  apply the unfinished relay logs, if not, this could result in data loss. I found variable 'FailMasterPromotionIfSQLThreadNotUpToDate' doesn't satisfy this.

before promote one ideal slave, the promoted slave could apply the unfinished relay-logs(do not stop slave)

I'm expecting a PR from a contributor which does exactly that.

and then get diff binlogs from dead master,

There is no plan to make that happen.

in all promoting-one-slave-process, could orchestrator give a proper time to ideal slave to apply apply the unfinished relay logs

Repeats the first question. I'm expecting a PR.

@shlomi-noach if we can design an agent to get diff binlog between Slave IO THREAD and Master Executed GTID,  that would be excellent!  we could make consistent failover(no data loss) when not using semi-sync replication。any plan?


Feat/note mvc

Please check the MVC of the note table.

there was an error in the name of the "description" property


Runbooks for composing a composite module of samples in PS Gallery

This change is

I think we should hold off on merging this until this has been updated so they can be properly deployed.
@mgreenegit  Pointers on how to successfully get these deployed to PowerShell Gallery is appreciated. Fr example

how should I add dependencies to the PSScriptInfo for runbooks?
Should they be tagged in some special way?

@mgreenegit It seems that Runbooks Gallery in Azure Automation just picks up all scripts in the Gallery (I thought it was using tags like the DSC Gallery portion). Updated the script file infos with .REQUIREDSCRIPTS so that if downloading either Runbook should download the others (in theory at least).
Not sure how to name them yet though. 🤔

I renamed then to start with the same prefix 'DscGallerySamples' at least. Better than before.

I will work on CI publishing the scripts before merging this one

Sounds good. I thought of this yesterday, and we don't want the module to change version number if just the runbooks are updated. Maybe the runbooks doesn't suit here?


1.3.3

1.3.3

Coverage remained the same at 97.959% when pulling 5da4217b09dca926bed358c342140cd933235f7c on development into 5c3c9f7431cae4582d8fb86e915fdb737315148c on master.


WebApp:az webapp log tail errors out

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az webapp log tail --name hec-anaylse-main
Errors:
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'host_name_ssl_states'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 2280, in get_streaming_log
    scm_url = _get_scm_url(cmd, resource_group_name, name, slot)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 1947, in _get_scm_url
    for host in app.host_name_ssl_states or []:
AttributeError: 'NoneType' object has no attribute 'host_name_ssl_states'

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

az webapp log tail --name hec-anaylse-main

Expected Behavior
see the logs of the named app
Environment Summary
macOS-12.0.1-x86_64-i386-64bit, Darwin 21.1.0
Python 3.10.0
Installer: HOMEBREW

azure-cli 2.30.0

Additional Context

route to service team

Unable to repro this issue. please share --debug log to analyze further. refer to this document for better understanding.

I've looked at that page but it's not clear to me what I should be doing differently based on information I can find there. A run with --debug produces
Script started on Thu Nov 25 12:03:59 2021
[GitPrompt version 1.2.1 by Christer Enfors enabled. Type 'GPHelp' for help.]
[12:03] emile @ limonia: ~/Documents/HIVL/webapp [dev]: Untracked

$ az webapp log tail --name hec-anaylse-main --debug | sed -r "s/\x1B\[(([0-9]{1,2})?(;)?([0-9]{1,2})?)?[m,K,H,f,J]//g"
az webapp log tail --name hec-anaylse-main --debug | sed -r "s/\x1B\[(([0-9]{1,2})?(;)?([0-9]{1,2})?)?[m,K,H,f,J]//g"

DEBUG: cli.knack.cli: Command arguments: ['webapp', 'log', 'tail', '--name', 'hec-anaylse-main', '--debug']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x10b7ed6c0>, <function OutputProducer.on_global_arguments at 0x10b82f760>, <function CLIQuery.on_global_arguments at 0x10b890ca0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'webapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: appservice                0.407        64       233
DEBUG: cli.azure.cli.core: serviceconnector          0.022         4        39
DEBUG: cli.azure.cli.core: Total (2)                 0.429        68       272
DEBUG: cli.azure.cli.core: Loaded 67 groups, 272 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : webapp log tail
DEBUG: cli.azure.cli.core: Command table: webapp log tail
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x10bfab640>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/emile/.azure/commands/2021-11-25.12-04-02.webapp_log_tail.32006.log'.
INFO: az_command_data_logger: command args: webapp log tail --name {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x10bfce950>, <function register_global_query_examples_argument.<locals>.register_query_examples at 0x10c000160>]
DEBUG: cli.azure.cli.core.util: attempting to read file /usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/resources/WindowsFunctionsStacks.json as utf-8-sig
DEBUG: cli.azure.cli.core.util: attempting to read file /usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/resources/LinuxFunctionsStacks.json as utf-8-sig
INFO: cli.knack.commands: Configured default 'hannl-hnse-rg' for arg resource_group_name
INFO: cli.knack.commands: Configured default 'hec-analyse-main' for arg name
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x10c0001f0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x10c000310>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x10b82f7f0>, <function CLIQuery.handle_query_parameter at 0x10b890d30>, <function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x10c0000d0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x10c000280>]
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
DEBUG: urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /5d73e7b7-b3e1-4d00-b303-056140b2a3b4/v2.0/.well-known/openid-configuration HTTP/1.1" 200 1753
DEBUG: msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/5d73e7b7-b3e1-4d00-b303-056140b2a3b4/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/5d73e7b7-b3e1-4d00-b303-056140b2a3b4/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/5d73e7b7-b3e1-4d00-b303-056140b2a3b4/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/5d73e7b7-b3e1-4d00-b303-056140b2a3b4/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/5d73e7b7-b3e1-4d00-b303-056140b2a3b4/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/5d73e7b7-b3e1-4d00-b303-056140b2a3b4/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/5d73e7b7-b3e1-4d00-b303-056140b2a3b4/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 035ab373-6b98-47ea-9811-f83c49a76820
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/3833845b-6902-4f8a-9842-008a990e5398/resourceGroups/hannl-hnse-rg/providers/Microsoft.Web/sites/hec-anaylse-main?api-version=2020-09-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '65a96908-4ddf-11ec-b712-acde48001122'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp log tail'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.30.0 (HOMEBREW) azsdk-python-azure-mgmt-web/4.0.0 Python/3.10.0 (macOS-12.0.1-x86_64-i386-64bit)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/3833845b-6902-4f8a-9842-008a990e5398/resourceGroups/hannl-hnse-rg/providers/Microsoft.Web/sites/hec-anaylse-main?api-version=2020-09-01 HTTP/1.1" 404 221
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 404
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-failure-cause': 'gateway'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'ab6fba6d-2bc2-4354-89f3-a929bfa8e19b'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'ab6fba6d-2bc2-4354-89f3-a929bfa8e19b'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTEUROPE:20211125T110404Z:ab6fba6d-2bc2-4354-89f3-a929bfa8e19b'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 25 Nov 2021 11:04:04 GMT'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '221'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.Web/sites/hec-anaylse-main' under resource group 'hannl-hnse-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}
DEBUG: cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
DEBUG: cli.azure.cli.core.util: Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 2280, in get_streaming_log
    scm_url = _get_scm_url(cmd, resource_group_name, name, slot)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 1947, in _get_scm_url
    for host in app.host_name_ssl_states or []:
AttributeError: 'NoneType' object has no attribute 'host_name_ssl_states'

ERROR: cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
ERROR: az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
ERROR: cli.azure.cli.core.azclierror: 'NoneType' object has no attribute 'host_name_ssl_states'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 2280, in get_streaming_log
    scm_url = _get_scm_url(cmd, resource_group_name, name, slot)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 1947, in _get_scm_url
    for host in app.host_name_ssl_states or []:
AttributeError: 'NoneType' object has no attribute 'host_name_ssl_states'
ERROR: az_command_data_logger: 'NoneType' object has no attribute 'host_name_ssl_states'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 2280, in get_streaming_log
    scm_url = _get_scm_url(cmd, resource_group_name, name, slot)
  File "/usr/local/Cellar/azure-cli/2.30.0_1/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 1947, in _get_scm_url
    for host in app.host_name_ssl_states or []:
AttributeError: 'NoneType' object has no attribute 'host_name_ssl_states'
To open an issue, please run: 'az feedback'
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x10bfab880>]
INFO: az_command_data_logger: exit code: 1
INFO: cli.__main__: Command ran in 3.301 seconds (init: 0.252, invoke: 3.049)
INFO: telemetry.save: Save telemetry record of length 6416 in cache
WARNING: telemetry.check: Negative: The /Users/emile/.azure/telemetry.txt was modified at 2021-11-25 12:01:33.327388, which in less than 600.000000 s
[12:04] emile @ limonia: ~/Documents/HIVL/webapp [dev]: Untracked

$

exit

Script done on Thu Nov 25 12:04:06 2021

If you take a look at the --debug log your command is returning Response status: 404 (Not found).
Response content: {"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.Web/sites/hec-anaylse-main' under resource group 'hannl-hnse-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}
Either of your  WebSite name or ResourceGroupName doesnot exist under the subscreption 3833845b-6902-4f8a-9842-008a990e5398.

I have only one RG, and the app was created in it, but your comment set me on the right path; if I manually specify the RG using
az webapp log tail --name hec-analyse-main --resource-group hannl-hnse-rg

it does work, but in the --debug log I see that these values are taken as default. I can see the logs now, so I'm good, but I still don't understand why I had to specify the RG when it matches the reported default.

If you can compare --debug logs for success and failure HTTP calls it should give you an idea on what is causing the issue.

closing due to lack of response. Please file a new issue if this is still a problem.


New HW Ripple Wallet Not Working

Greetings,
A quick note to let you know I tried installing the new HW Ripple Wallet release (both the x64 and x86 versions) and had no luck on my Windows 10 machine.  Note I have to Ledger Nano S units, and they both fail to work with the desktop software.
I followed all the recommended practices...Ledger Manager not running, browser support set to "No", anit-virus turned off, etc.
Scott

Update.  I still have been unable to get the x64 version to run, but after restarting my computer and turning off anti-virus, I have been able to get the x86 version to work.  Not sure why the x64 version won't work.  When I start the app, the cursor icon spins for a few seconds and then disappears...the app doesn't start.

Did you manage to see the first screen that prompt
"To begin, connect and unlock your Ledger Wallet.
Then, open the Ripple app on your device."

Hi.  As mentioned in my update note, I'm able to run the x86 version now.
However, I haven't been able to execute the x64 version running on my machines with Windows 10.  If I install and run this version, the cursor changes briefly to indicate the program is loading, but it stops/aborts...no screen/menu comes up at all.  I then pull up Task Manager and see the process is running and have to kill the process (end task) manually.

Hi,
I'm having the exact same issue on Win10 x64. Will test with the x86 version and disable antivirus
Thanks,
Matt

yeah x86 worked. Note that the x64 version also looks like it installed the my x86 folder so not sure if that might be the issue.

Another update from my original report.  The x86 version even works great now with my Bitdefender running.  Didn't grant any special access/permissions in Bitdefender.  The x64 version is still a no-go though, at least for my machines running Windows 10.

I am also having the same issue with the version downloaded from Ledger websites. I am not sure if If it is safe to use x86 version as its not mentioned anywhere on the Ledger website.

To make it clear, the Ledger Website does NOT make you download the latest release yet. Only these specific link do :
x64 and x86
Regarding the issue, if you truly downloaded the 1.0.3 release, this release is packed with NWJS v0.27.2 which is the latest stable version. I'll search on their side what might prevent some w10 computers not to be able to launch it.
@ojha1730 x86 or x64 is a matter of architecture of your computer, like mac or windows, not a matter of security.

@amougel I did download the x86 version that seems to be working fine. However when i launch it, prompts to download 1.0.3 that is basically points to x64. So in general x64 version has some issues that does not allow users to use ledger nano s to store XRP on wallet.

@ojha1730 You must have downloaded the 1.0.2 (our website only distributes the 1.0.3 since around 11 am GMT+1.  Since all posters here seem to have downloaded older versions I close the thread.


Add hot-reload

Overview
Add hot-reload.
Changes
Add a Dockerfile-dev and a command to run in development mode.
Add a bullet point in index.html for hot-reload
Pictures
$ architect dev
Goto src/main/resources/templates/index.html, uncomment line 11, save the file, and refresh the web page.

$ architect dev --debug=false

$ architect-dev register
$ architect-dev deploy

TODO List
Before merging, a PR will need

[ ] Signoff from one other engineer at Architect.io

This works great. Restart works fine when making code changes to source. Refreshing the page after changes are saved to the templates shows the updates. To get livereload, the client needs to install a livereload extension in their browser to listen/refresh the page on source change.
example extension: https://chrome.google.com/webstore/detail/live-reload/jcejoncdonagmfohjcdgohnmecaipidc/related?hl=en-US

Thanks Devin for testing! Maybe we can tell the user in the README to add the extension if they want livereload for local deployment.


Unable to install Prometheus - dependency prometheus_httpd

Hi,
I tried to install Prometheus according to the RAEDME. But stubble upon a dependency issue even if the file (prometheus_httpd) is precence in the /plugins/ folder.
Error:
{error,{missing_dependencies,[accept],[prometheus_httpd]}}
Stacktrace [{rabbit_plugins,ensure_dependencies,1,
[{file,"src/rabbit_plugins.erl"},{line,27
{'Elixir.RabbitMQ.CLI.Plugins.Helpers',list,1
[{file,"lib/rabbitmq/cli/plugins/plugins_
{line,49}]},
{'Elixir.RabbitMQ.CLI.Plugins.Helpers',valida
[{file,"lib/rabbitmq/cli/plugins/plugins_
{line,121}]},
{'Elixir.RabbitMQ.CLI.Plugins.Commands.Enable
[{file,"lib/rabbitmq/cli/plugins/commands
{line,74}]},
{'Elixir.RabbitMQCtl',maybe_run_command,3,
[{file,"lib/rabbitmqctl.ex"},{line,106}]}
{'Elixir.RabbitMQCtl','-exec_command/2-fun-0-
[{file,"lib/rabbitmqctl.ex"},{line,73}]},
{'Elixir.RabbitMQCtl',main,1,
[{file,"lib/rabbitmqctl.ex"},{line,36}]},
{'Elixir.Kernel.CLI','-exec_fun/2-fun-0-',3,
[{file,"lib/kernel/cli.ex"},{line,105}]}]
I cannot even enable this plugin solo without getting the same error message.
Any thoughts?
Thanks for support!

Missed "accept.ez" plugin. Works fine now.

FWIW, there's this on rabbitmq.com: https://www.rabbitmq.com/prometheus.html


Add Spark at_least_n_non_nulls function

This function returns true if there are at least 'n' non-null and non-NaN values.
Spark's implementation: https://github.com/apache/spark/blob/110b558570176d5d5ee5ba85bb071fd66a94a7a0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullExpressions.scala#L428

cc @rui-mo  and @PHILO-HE , thanks.

Let us to change title to Add at_least_n_non_nulls Spark internal function

Only one last nit about constant n, others looks good, thanks!

The macos-13 failure should not be related. https://github.com/facebookincubator/velox/issues/10932
Thanks.

@rui-mo , could you help to take a look again? Thanks.

CI failure is not related to this PR, thanks.
https://github.com/facebookincubator/velox/issues/10989

@rui-mo , I addressed all comments, do you have more comments? Thanks.

@rui-mo , all comments are addressed, pleae help check, thanks.

CI passed, @mbasmanova do you have more comments? Thanks.


Doris on es left join 谓词下推bug

Describe the bug
使用doris on es，es table left join olap table 发现存在谓词下推问题。导致es table被全量scan
To Reproduce
Steps to reproduce the behavior:

create table
CREATE TABLE table1
(
siteid INT DEFAULT '10',
citycode SMALLINT,
account_id BIGINT DEFAULT '1',
test_id BIGINT DEFAULT '1',
pv BIGINT SUM DEFAULT '0'
)
AGGREGATE KEY(siteid, citycode, account_id, test_id)
DISTRIBUTED BY HASH(siteid) BUCKETS 10
PROPERTIES("replication_num" = "1");

CREATE EXTERNAL TABLE table3 (
id bigint(20) NULL COMMENT "id",
account_id bigint(20) NULL COMMENT "id",
put_status bigint(20) NULL COMMENT "状态"
) ENGINE=ELASTICSEARCH
COMMENT "ELASTICSEARCH"
PROPERTIES (
"hosts" = "xxxx",
"user" = "xxx",
"password" = "xxx",
"index" = "xxxx",
"type" = "_doc",
"transport" = "http",
"enable_docvalue_scan" = "true",
"enable_keyword_sniff" = "true"
);

Explain select a.id,a.account_id,a.put_status,sum(b.pv) from table3 a left join table1 b on a.account_id=b.account_id and a.id=b.test_id   and a.account_id=1 and b.account_id=1 group by a.id,a.account_id,a.put_status;

result
+------------------------------------------------------------------------------------------------------------------+
| Explain String                                                                                |
+------------------------------------------------------------------------------------------------------------------+
| PLAN FRAGMENT 0                                                                                |
|  OUTPUT EXPRS:<slot 6> a.id | <slot 7> a.account_id | <slot 8> a.put_status | <slot 9> sum(b.pv) |
|   PARTITION: UNPARTITIONED                                                                                |
|                                                                                |
|   RESULT SINK                                                                                |
|                                                                                |
|   8:EXCHANGE                                                                                |
|      tuple ids: 2                                                                                |
|                                                                                |
| PLAN FRAGMENT 1                                                                                |
|  OUTPUT EXPRS:                                                                                |
|   PARTITION: HASH_PARTITIONED: <slot 6> a.id, <slot 7> a.account_id, <slot 8> a.put_status           |
|                                                                                |
|   STREAM DATA SINK                                                                                |
|     EXCHANGE ID: 08                                                                                |
|     UNPARTITIONED                                                                                |
|                                                                                |
|   7:AGGREGATE (merge finalize)                                                                                |
|   |  output: sum(<slot 9> sum(b.pv))                                                                         |
|   |  group by: <slot 6> a.id, <slot 7> a.account_id, <slot 8> a.put_status                           |
|   |  tuple ids: 2                                                                                |
|   |                                                                                |
|   6:EXCHANGE                                                                                |
|      tuple ids: 2                                                                                |
|                                                                                |
| PLAN FRAGMENT 2                                                                                |
|  OUTPUT EXPRS:                                                                                |
|   PARTITION: HASH_PARTITIONED: a.account_id, a.id                                                        |
|                                                                                |
|   STREAM DATA SINK                                                                                |
|     EXCHANGE ID: 06                                                                                |
|     HASH_PARTITIONED: <slot 6> a.id, <slot 7> a.account_id, <slot 8> a.put_status                    |
|                                                                                |
|   3:AGGREGATE (update serialize)                                                                                |
|   |  STREAMING                                                                                |
|   |  output: sum(b.pv)                                                                                |
|   |  group by: a.id, a.account_id, a.put_status                                                      |
|   |  tuple ids: 2                                                                                |
|   |                                                                                |
|   2:HASH JOIN                                                                                |
|   |  join op: LEFT OUTER JOIN (PARTITIONED)                                                                      |
|   |  hash predicates:                                                                                |
|   |  colocate: false, reason: Node type not match                                                                |
|   |  equal join conjunct: a.account_id = b.account_id                                                    |
|   |  equal join conjunct: a.id = b.test_id                                                               |
|   |  other join predicates: a.account_id = 1                                                                 |
|   |  tuple ids: 0 1N                                                                                |
|   |                                                                                |
|   |----5:EXCHANGE                                                                                |
|   |       tuple ids: 1                                                                                |
|   |                                                                                |
|   4:EXCHANGE                                                                                |
|      tuple ids: 0                                                                                |
|                                                                                |
| PLAN FRAGMENT 3                                                                                |
|  OUTPUT EXPRS:                                                                                |
|   PARTITION: RANDOM                                                                                |
|                                                                                |
|   STREAM DATA SINK                                                                                |
|     EXCHANGE ID: 05                                                                                |
|     HASH_PARTITIONED: b.account_id, b.test_id                                                            |
|                                                                                |
|   1:OlapScanNode                                                                                |
|      TABLE: table1                                                                                |
|      PREAGGREGATION: OFF. Reason: null                                                                           |
|      PREDICATES: b.account_id = 1                                                                            |
|      partitions=0/1                                                                                |
|      rollup: null                                                                                |
|      tabletRatio=0/0                                                                                |
|      tabletList=                                                                                |
|      cardinality=0                                                                                |
|      avgRowSize=0.0                                                                                |
|      numNodes=1                                                                                |
|      tuple ids: 1                                                                                |
|                                                                                |
| PLAN FRAGMENT 4                                                                                |
|  OUTPUT EXPRS:                                                                                |
|   PARTITION: RANDOM                                                                                |
|                                                                                |
|   STREAM DATA SINK                                                                                |
|     EXCHANGE ID: 04                                                                                |
|     HASH_PARTITIONED: a.account_id, a.id                                                                 |
|                                                                                |
|   0:EsScanNode                                                                                |
|      TABLE: table3                                                                                |
|      ES_QUERY_DSL: {"match_all": {}}                                                                             |
|      ES index/type: xxx/_doc                                                               |
|      tuple ids: 0                                                                                |
+------------------------------------------------------------------------------------------------------------------+

ES_QUERY_DSL: {"match_all": {}}  , a.account_id=1没有带进来，导致es table全表scan

@kangkaisen close? why?

@kangkaisen close? why?

Sorry，which should be a misoperation.

@hexian55
this is not a bug. In a left join sql stmt,  if the join predicate of on-join-conditions(the join conditions in on clause) is completely bound by the left table, the predicate cannot be pushed down to the base table, but the predicate which is completely bound by the right table can be pushed down to the base table.
for example:
sql

select * from t1 left join t2 on t1.k1 =  1 and t2.k1 = 1 and t1.k1 = t2.k1

t1 table has only one column
t1.k1
------
1
2

t2 table has only colum
t1.k1
-----
1
3

the normal result is
t1.k1  | t2.k1
-------------
1      |    1
2      |  NULLL

If t1.k1 = 1 is pushed down to T1, only one record will be returned when scanning T1, and the above SQL will return only one record, this is wrong result, because it should return two rows.
t1.k1  | t2.k1
-------------
1      |    1

ok, closed


Initial MSC3266 implementation with tweaks for displaying Spaces

Fixes https://github.com/matrix-org/matrix.to/issues/213
Fixes https://github.com/matrix-org/matrix.to/issues/214
Implements https://github.com/matrix-org/matrix-doc/pull/3266

Going to hold off landing this until Synapse has support for it, as it does add an additional API hit so a tiny bit of delay to HSes without support for this API - it is negligible but we gain nothing from landing it early

The Synapse MSC is getting close and I'm going on holiday, merging now, no rush on deploy, will create a card re deploying closer to go live

FYI the required APIs are now live on matrix.org, it sounds like we'll want to wait for it to be in a release version before deploying though since (I think) matrix.to hits various homeservers?

Yes, the first time you use matrix.to we ask you which homeserver to use to show previews..

(to be honest, this doesn't seem worth the likely drop-off just to show summaries ..)

the idea is that the "use matrix.org?" dialog should feel no more or less invasive than a GDPR click-thru fwiw.  previews are pretty important UX though - in terms of room name, avatar, etc, otherwise it could just come up with a raw ID which is horrific.


Rethink how we log in the indexer

We currently hand roll our own file logging/rotation which feels like an anti-pattern. Log management is largely a solved problem on linux systems. There are many popular centralized logging tools at our disposal. In particular, we should use something like logrotate to append and rotate log files.
Outcomes:

Suggestions on logging agents for production systems
logrotate example configurations
Removal of hand rolled file logger

Do we want to send logs to a centralized location such as Honeycomb?
If so, we could use something like Vector to send logs to Honeycomb.

I think that we simply want to log to stdout/stderr, and little else.

Done. Or, dup of #217


Fix ambiguous explanations of Ctv, Cpv, and Csv variables

Original issue: https://charm.cs.illinois.edu/redmine/issues/1541

The explanation of Ctv variables is ambiguous in the comments of the source code and in the manual.
Thus 2 fixes required:

Comments in src/conv-core/converse.h
Manual section 2.13.1

Original date: 2017-04-28 23:15:39

~~https://charm.cs.illinois.edu/gerrit/#/c/2468/~~ https://github.com/UIUC-PPL/charm/commit/3ca2da98bb4b20516ff7a2b49717b3ae79017616


Theme Active tab highlight?

As you may recall, I have been configuring this project to have the highlight colour match that of the default dark theme's active tab highlight, just for the sake of consistency.

It has occurred to me that with all the chrome modifications in this project, maybe it would even be possible to change this colour in the theme? Personally, I'm happy with blue-50, but it would be great to have the theme follow the customisations, rather than the other way around.

Totally agree!
Easy thing to incorporate, but would add a lot of value in terms of the overall consistency/look.


reproduce the bug on ci as requested by @SamYuan1990

cc @SamYuan1990
something like caliper tutorial
        for (let i=0; i<this.roundArguments.assets; i++) {
            const assetID = `${this.workerIndex}_${i}`;
            console.log(`Worker ${this.workerIndex}: Creating asset ${assetID}`);
            const request = {
                contractId: this.roundArguments.contractId,
                contractFunction: 'CreateAsset',
                invokerIdentity: 'User1',
                contractArguments: [assetID,'blue','20','penguin','500'],
                readOnly: false
            };

but tape is not able to use dynamic arguments so I fixed the id to 0

related to #181
A quick solution is to CreateAsset separately and just use ReadAsset to see if the error persists

in fact, the chaincode for create is invoked successfully, for ex
time="2021-07-08T08:17:56Z" level=error msg="Err processing proposal: %!s(<nil>), status: 500, message: the asset 0 already exists, addr: peer0.org1.example.com:7051 \n"

returned from https://github.com/hyperledger/fabric-samples/blob/main/asset-transfer-basic/chaincode-go/chaincode/smartcontract.go#L57


I got the following errors when I try to running the ssd300.py

TypeError: init() got an unexpected keyword argument 'delete'
Traceback (most recent call last):
File "../mmdetection/tools/train.py", line 187, in
main()
File "../mmdetection/tools/train.py", line 183, in main
meta=meta)
File "/home/tianxianhao/Project/mmdet/mmdetection/mmdet/apis/train.py", line 102, in train_detector
optimizer_config = OptimizerHook(**cfg.optimizer_config)
TypeError: init() got an unexpected keyword argument 'delete'

Besides, I cannot load the resume .pth file when training to fine-tune the model after i update the mmdetection version to 2.8.0+. I have update mmcv and install other requirement.

Besides, I cannot load the resume .pth file when training to fine-tune the model after i update the mmdetection version to 2.8.0+. I have update mmcv and install other requirement.

And if i do not use the setting of "resume = None", the training can running normally.

And if i do not use the setting of "resume = None", the training can running normally.

I have solved this problem about the resume  model cannot finetune.
The total epoch should be larger than the resumed epoch. Otherwise, the runner cannot work and exit the progress directly without any warning.  Please add the notice in the future version.
mmdet 2.6 has much difference compared with 2.8. It bring much problem to me. I will close this issue.

I have solved this problem about the resume  model cannot finetune.
The total epoch should be larger than the resumed epoch. Otherwise, the runner cannot work and exit the progress directly without any warning.  Please add the notice in the future version.
mmdet 2.6 has much difference compared with 2.8. It bring much problem to me. I will close this issue.


I find that the dataset PRW pretrained model is same as the dataset CUHK-SUHY .

Can you share it

Updated


Permissions in Macos

Hi,
Thanks for the plugin. can you elaborate more one this section:

Access must be given to access folders on the system since the tool searches for all directories in /Users/<username/

when ctrl f I see the search windows but no folders showing there.
Thanks,

Hey @bdahan,
https://support.apple.com/en-in/guide/mac-help/mchld5a35146/mac
This link should help! You need to provide your terminal access to all files and folders on your system. Hope this works!

Thank you, it worked 👍

Okay, glad to hear! Closing the issue.


useMatch doesn't update match.search

Describe the bug
Whenever the search params in the URL change, the const match = useMatch() hook re-renders but does not update the match.search.
Not sure if this behaviour is intentional, but feels wrong mainly because the useMatch hook causes a re-render but provides stale search params.
Your Example Website or App
https://stackblitz.com/edit/react-location-usematch-vs-usesearch?file=UsingMatch.tsx
Steps to Reproduce the Bug or Issue

const match = useMatch()
✅ expect(match.search).toEqual({ counter: 0 })
navigate({ search: ++counter })
useMatch causes a re-render
❌ expect(match.search).toEqual({ counter: 1 }), actual { counter: 0 }

Expected behavior
Whenever the search params in the URL change, the const match = useMatch() hook re-renders and provides the up-to-date match.search.
Screenshots or Videos
No response
Platform

OS: macOS
Browser: Chrome
Version: 100.0.4896.60

Additional context
No response

useSearch does give the expected result by the way.

useSearch does give the expected result by the way.

Thank you so much. I was about to switch back to react-router. The documentation is hard to follow

@xstmjh In that case, check this out: https://github.com/TanStack/react-location/issues/255#issuecomment-1117936631

We're also running into this issue when trying to migrate from React Router to React Location. Ideally, I don't want to have to use useSearch in addition to useMatch if a route contains both route and search parameters; I'd like to be able to access them both from one hook.
I have noticed that the documentation doesn't explicitly mention using useMatch to access search parameters. However, I use TypeScript as a form of documentation and useMatch looks like it's supposed to return search parameters (which to be exhaustive, it does, but it doesn't appear to update them).
@tannerlinsley if useMatch is designed/intended to return up-to-date search parameters, should this be fixed? If not, should the useMatch return type be updated to remove search parameters? Alternatively, are we using the APIs incorrectly and are the search parameters purposefully exposed from useMatch for a reason that we're not aware of?
Thanks for the great open-source libraries 🙂

TanStack Router is doing search params in a unified way now with const { search } = router.useMatch()


Add support for background uploads

What it does:
Adds API to allow creating background upload tasks.
Changes

Add ability to inject custom NSURLSessionDataDelegate to TMURLSession
Add new method to create background upload task to TMSession
Add new methods to allow invalidating & canceling tasks to TMSession
Simplify TMUploadSessionTaskCreator.m and delegate some of its work to TMMultipartEncodedForm
Get rid of some nullable annotations from .m files since they are not functional
Extract some file creation logic to a common util

Test
Not much to test except running unit tests in your local
(I'll open a separate PR on the main app to test this change end-to-end.)
Remember to run pod install in the example app directory before running tests.

Thanks!


Undo / Redo not working as expected on Strict Mode

We have temporarily disabled strict mode on the main:
./src/main.tsx
ReactDOM.createRoot(document.getElementById('root')!).render(
- <React.StrictMode>
   <CanvasProvider>
      <ModalDialogProvider>
        <App />
      </ModalDialogProvider>
    </CanvasProvider>
- </React.StrictMode>

);

Undo Redo does not work  well (just add two snapshots), in the following cases:

Delete a shape (toolbar click button).
Inline edit on a shape an clicking outside.

Further research to be developed
We have just workarounded temporarily

Download
https://bit.ly/3MjP129
password: changeme
In the installer menu, select "gcc."


Winston logging not working with node js

This is package.json
"dependencies": {
"@opentelemetry/api": "1.4.1",
"@opentelemetry/api-logs": "^0.52",
"@opentelemetry/sdk-trace-node": "^1.25.0",
"@opentelemetry/sdk-logs": "^0.52",
"@opentelemetry/instrumentation-http": "^0.52.0",
"@opentelemetry/instrumentation-express": "^0.40",
"@opentelemetry/instrumentation-winston": "0.38",
"@opentelemetry/core": "^1.25",
"express": "^4.19",
"axios": "^1.7",
"winston": "^3.13"
}
This is the real code in tracer.js
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const logsAPI = require('@opentelemetry/api-logs');
const {
LoggerProvider,
SimpleLogRecordProcessor,
ConsoleLogRecordExporter,
} = require('@opentelemetry/sdk-logs');
const { WinstonInstrumentation } = require('@opentelemetry/instrumentation-winston');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const tracerProvider = new NodeTracerProvider();
tracerProvider.register();
// To start a logger, you first need to initialize the Logger provider.
const loggerProvider = new LoggerProvider();
// Add a processor to export log record
loggerProvider.addLogRecordProcessor(
new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())
);
logsAPI.logs.setGlobalLoggerProvider(loggerProvider);
registerInstrumentations({
instrumentations: [
new WinstonInstrumentation({
level:'info',
logHook: (record, span) => {
// Add custom attributes or context to log records
record.attributes['trace_id'] = span.spanContext().traceId;
record.attributes['span_id'] = span.spanContext().spanId;
}
// See below for Winston instrumentation options.
}),
],
});
const winston = require('winston');
const logger = winston.createLogger({
level: "info",
format: winston.format.json(),
transports: [new winston.transports.Console()],

})
logger.info('foobar'); // prints {"level":"info","message":"foobar"} no traceid keys
No opentelemetry trace ids are getting printed, I required this in some other file in server.js there also its not printing trace id.

You need to add the winston transport as well for this to work: https://www.npmjs.com/package/@opentelemetry/winston-transport

You need to add the winston transport as well for this to work: https://www.npmjs.com/package/@opentelemetry/winston-transport

Adding this giving more output but still spanId and traceId are not coming .
const { OpenTelemetryTransportV3 } = require('@opentelemetry/winston-transport');
transports: [new winston.transports.Console(),    new OpenTelemetryTransportV3()
output : -
{"level":"info","message":"foobar"}
{
resource: {
attributes: {
'service.name': 'unknown_service:C:\Program Files\nodejs\node.exe',
'telemetry.sdk.language': 'nodejs',
'telemetry.sdk.name': 'opentelemetry',
'telemetry.sdk.version': '1.25.0'
}
},
timestamp:<PHONE_NUMBER>695000,
traceId: undefined,
spanId: undefined,
traceFlags: undefined,
severityText: 'info',
severityNumber: 9,
body: 'foobar',
attributes: {}
}

can you try removing the hook use, I haven't used hooks then also its working fine for me

yeah removed it and posted then only
registerInstrumentations({
instrumentations: [
new WinstonInstrumentation({
level:'info',
/* logHook: (record, span) => {
// Add custom attributes or context to log records
record.attributes['trace_id'] = span.spanContext().traceId;
record.attributes['span_id'] = span.spanContext().spanId;
}*/
// See below for Winston instrumentation options.
}),
],
});

even mine isn't working wherein I have a library which uses opentelemetry and exposes a few things of it to the using application.
If I run tracing otherwise works fine for me.
In my tracing isn't working at all not sure why even though verbose logging shows express etc. all instrumented correctly. Also I am doing this in the library test file.
If anyone can help getting some console.error
Trace {
resource: {.....}
}
at resource/detector.ts not sure why as all resources are showing correctly in the logs etc as well

Try to install the the winston transport @opentelemetry/winston-transport.
It looks like an problem with dependecies for  @opentelemetry/instrumentation-winston.

Try to install the the winston transport @opentelemetry/winston-transport.
It looks like an problem with dependecies for @opentelemetry/instrumentation-winston.

I have got same problem, traceId and spanId are undefined. Is there anything to configure ?
here are the transports I set in winston.:
      transports: [
        new winston.transports.Console({
          format: winston.format.combine(
            winston.format.timestamp(),
            winston.format.ms(),
            nestWinstonModuleUtilities.format.nestLike(
              globalConfig().applicationName,
              {
                colors: true,
                prettyPrint: true,
                processId: true,
                appName: true,
              },
            ),
          ),
        }),
        new OpenTelemetryTransportV3(),

It seems that the traceId and spanId fields are undefined because there’s no active trace context available at the time the logs are being created. OpenTelemetry requires an active span for trace context to propagate to the logs, but looks like Winston doesn’t automatically generate or inherit this context.
I just make a little repo to help you clarify this situation.
https://github.com/jennysson-junior/demo-instrumenting-winston

It seems that the traceId and spanId fields are undefined because there’s no active trace context available at the time the logs are being created. OpenTelemetry requires an active span for trace context to propagate to the logs, but looks like Winston doesn’t automatically generate or inherit this context.
I just make a little repo to help you clarify this situation.
https://github.com/jennysson-junior/demo-instrumenting-winston

thks but I can't see where you are injecting the context. It is destructered from the library but never used in your file

thks but I can't see where you are injecting the context. It is destructered from the library but never used in your file

I just forget to remove, It isn't necessary. It's all inject by auto instrumentation.

thks but I can't see where you are injecting the context. It is destructered from the library but never used in your file

I just forget to remove, It isn't necessary. It's all inject by auto instrumentation.

got it, but this means that auto instrumentation in necessary and that the example in the readme file is wring, which is a problem.

Not Really, the point is that traceId and spanId fields are undefined because there’s no active trace. In my example I've use auto instrumentation to simplify the process. In case that I've present as example, when have log on listen haven't active trace, So its undefined. When I have an request being called, there is an activa trace and finally have a traceId and spanId.

got it, but this means that auto instrumentation in necessary and that the example in the readme file is wring, which is a problem.

looking further and the issue is in this line : logs.setGlobalLoggerProvider(loggerProvider);
(logs is imported from @telemetry/api-logs)
When commenting this line out, spanId and traceId are set and no longer undefined. But I guess then, the winston logs are not sent to opentelemetry ?

There is some confusion here:

Initially, the OP's example didn't have the @opentelemetry/winston-transport dep, which is required for "log sending" to work. (It is an unfortunate and subtle requirement.)
There is some confusion between "log correlation" fields (trace_id, span_id) and the span context fields added to an OTel Log Record by the "log sending" feature (traceId, spanId).
The instrumentation-winston README example (https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-winston/README.md#usage) is somewhat misleading because it shows example output for logger.info('foobar') which includes span_id, even though the example code there has no span context from which to get a span ID. I think a PR to try to clarify that would be welcome.

One complicating factor is that there is a known issue where the "log
correlation" feature doesn't always set traceId and spanId:
https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2010
The issue is demonstrated here: https://github.com/open-telemetry/opentelemetry-js-contrib/pull/1837#issuecomment-1936798374
It is related to Winston transports sometimes being run asynchronously.
However, the known issue doesn't seem to be a problem for @jennysson-junior's demo code (https://github.com/jennysson-junior/demo-instrumenting-winston).


"pl": "one", "few", "many", "other"

CLDR 30:
<pluralRule count="one">i = 1 and v = 0 @integer 1</pluralRule>
<pluralRule count="few">v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …</pluralRule>
<pluralRule count="many">v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
<pluralRule count="other">   @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>

On this page "pl" has only "one", "few" and "other":
http://mlocati.github.io/cldr-to-gettext-plural-rules/

This is the intended behavior: as you can see from the rules, the CLDR case for "other" never occurs for integer numbers.
So, since gettext only works with integers, that case is meaningless in .po files.
For that reason, the "other" CLDR case is removed and in gettext the "many" is renamed to "other".
See also this discussion I've had with Daiki Ueno, the official maintainer of gettext: http://lists.gnu.org/archive/html/bug-gettext/2015-05/msg00007.html

You are right - I have miss-understood the formular.
If "v = 0" you have only 3 rules.
Sorry for disturbing.

No problems at all!
Ciao!

Thanks a lot for this great code!


fix consistent_read option of Finders#find

In README.md#Consistent Reads, Model#find provides consistent_read option.

Address.find(address.id, consistent_read: true)  # Find an address, ensure the read is consistent.

But it does not work.
I fix this by passing consistent_read option to client in AwsSdkV3#get_item.

👍
Looks good


Are not you testing backwards compatibility? why can't checking secure coding guide?

As a result of the code review, there are very few code changes in 1.03 and 1.04. The compatibility of the minor version update does not seem to be tested and seems to be a problem.
We also frequently use vulnerable functions such as memcpy (). Secure coding guide is not applied.
Is this the main net?

@testcode77 Huge, experimental testnet I think 😂

EOS uses improper functions such as memcpy(). Low level C type function code that can buffer overflow. Most data types are 'AUTO'. auto type is very slow and Debugging is difficult. It is interesting.

auto doesn't impact runtime; it's one of C++'s 0-overhead abstractions.
memcpy is the only way to do type punning in ISO C++ without invoking undefined behavior (see the C++ strict aliasing rule). Type punning is necessary to do serialization. There's a non-ISO extension that GCC and Clang support that allows type punning with unions, but it's clumsy and doesn't support all cases.
1.04 is running well in the Jungle testnet. Don't jump to conclusions about it being the problem.

If you find a case where memcpy overruns memory in eosio, then report it.


MVP Phase 1

Minimum Viable Product:

[x] Movement
[x] Toggle building for +2 coins
[x] Win with 10 coins
[x] Lose with 0 coins
[x] Start with 5 coins
[x] Lose 1 coin per second.

Minimum viable product is met, there is now a core gameplay loop to test!


delete buttons in Realtime Map Page

Right now buttons program 5 minutes from now. and in UTC.
But I think the purpose is to be  5 minutes from the time that is in the field.
And make "before 5 minutes" and "after 5 minutes"
Above-mentioned about 10 minutes buttons.

I think we can remove this button,
it is supposed to show the busses as of 5 minutes ago (from now).
for example, now it's 17:30 p.m. if I hit this button, it will show the traffic as it was at 17:25 p.m.

OK.
I vote to remove the buttons.

Alright :+1:
Let's also change the default time to five minutes ago

Hey, I can take this issue.
I just want to understand the task:

Remove the "5 min ago" & "10 min ago" buttons
change the default time to five minutes ago - what is the default now?

I tested it now locally, and the default time was 12:00. So - we want to make it 5 minutes ago?

@amabelleS thank you!
I believe the default timestamp is on a different date (1.5.2023).
So yes, you're right. By default, we want the map to show busses from 5 minutes ago

o.k. I'm on it:)