Is there a way to allow custom dictionaries?

For example, add a parameter: dict, when the value is ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~", it means use base91 compression.
see: #90
It looks like base91, but it is not the standard base91 algorithm, but only uses the characters of these sets as output.
When the value is hello lz, it means that only some combinations of these characters will be included in the compressed text.

Hello. I am not sure what your question is or what you are trying to achieve. Could you maybe explain a bit more ?

It seems that this is a function of converting a string to only contain certain characters specified.
Example: Pseudocode
lz.compress(`hello`, {
   map: `0123456789ABCDEF`,
});

The output of the above code is: 68656C6C6F, they do not contain characters outside the map.
Can lz-string provide a way to alleviate the size increase by using the lz algorithm during the conversion process?
Here are some more examples:
pseudocode: looks like morse code
lz.compress(`hello`, {
  map: `. -`,
});

// .... . .-.. .-.. ---

pseudocode: looks like Base16
lz.compress(`hello`, {
  map: `0123456789ABCDEF`,
});

// 68656C6C6F

pseudocode: Array
lz.compress(`hello`, {
  map: ["公正", "爱国", "平等", "诚信", "文明"],
});

// 公正爱国公正平等公正诚信文明公正诚信文明公正诚信平等

pseudocode: Array
lz.compress(`hello`, {
  map: `👨👩👧`,
});

// 👨👨👧👨👨👧👨👧👩👨👧👨

Can lz-string provide a way to alleviate the size increase by using the lz algorithm during the conversion process?

This is very exactly what LZ-String is doing. It is using the lzw algorithm to compress the input, using the symbols in the array to store the bits the algorithm produced. So in effect, lz.compress('hello', {map: '0123456789ABCDEF'}); does not look like base16, it is a base16 representation of the compressed stream.

You have provided the following functions, but none of them meet the requirements, because in my use case only specified characters are allowed to appear in the compression result.

compress
compressToUTF16
compressToBase64
compressToEncodedURIComponent
compressToUint8Array

Transmission of characters other than 12AB is not allowed in my use case.
Suppose I need to compress BBC, without lz-string, I might do this:
var userDict = `12AB`
var split = userDict.slice(0, 1)
var sysDict = userDict.slice(1)
var table = {
  A: sysDict.repeat(1), // 2AB
  B: sysDict.repeat(2), // 2AB2AB
  C: sysDict.repeat(3), // 2AB2AB2AB
}
var table2 = Object.entries(table).reduce((acc, [key, val]) => (acc[val]= key, acc), {})

// the string to be compressed
var str = `BBC`

// ['2AB2AB', '2AB2AB', '2AB2AB2AB'].join('1')
var compressed = str.split(``).map(str => table[str]).join(split)
// compressed = '2AB2AB12AB2AB12AB2AB2AB'

var decompressed = compressed.split(split).map(str => table2[str]).join(``)

However, I managed to control the encoding result within the range of 12AB, but failed to compress the data. How can I get help with lz-string?

Right, sorry about that, I thought you already looked into the code since you described exactly the way LZString works. If you look at the implementation of compressToBase64, you see this line:
LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);})

The _compress function takes three arguments:

The string to be compressed
The number of bits per character
A function giving the character to be used for a value

So in your case you would call:
LZString._compress(input, 2, function(a){return "12AB".charAt(a);})

To do it in hexadecimal:
LZString._compress(input, 4, function(a){return "0123456789ABCDEF".charAt(a);})

I saw the _compress method here a few days ago. Since the author raises some issues with transferring data, I think _compress is not the method I want. Now it looks like I was wrong.
Also, I think _compress is like a treasure trove. Worth showing in readme or homepage.
Although I don't understand why you need to pass a few extra parameters (whether it is possible to design a preset value?), or why _decompress should be charAt or charCodeAt, but I will try to understand it first.
Thanks for reminding me to use _compress again.

I am the author. It's compress that has issues because it generates invalid UTF-16 characters that some JS engines fail at storing and retrieving. _compress is the one doing the real job.

Although I don't understand why you need to pass a few extra parameters (whether it is possible to design a preset value?), or why _decompress should be charAt or charCodeAt, but I will try to understand it first.

The function you pass as an argument to _decompress has one job: Providing the meaningful bits in the input string. If it's hexadecimal, it needs to give out 0 for '0', 1 for '1' etc up to 15 for 'F'. That's its job, so it has to read the input string, hence the charAt. After that, you can do a switch, a bunch of if, a dictionary lookup (as in the decompressFromBase64 function) etc. It's really up to you.

Hey I am trying to add a custom compress/decompress function. I fail to understand the needed number given for _decompress.
For compress, the number of bits can be calculated as Math.ceil(Math.log2(dict.length))
But how do I calculate the resetValue? Math.ceil(dict.length/2) ?
dict should be a string, e.g. "0123456789ABCDEF"


[$500] Copy pasted text in the compose box loads when opening any report

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.30-0
Reproducible in staging?: y (occasionally reproduced)
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1706024319438839
Action Performed:

Open any report
Copy paste the text in compose box
Log out login or open any other chat

Expected Result:
Should not appear the copy pasted text
Actual Result:
Text appears in some other chat
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/43996225/a93f6556-7b88-4403-a973-d6b211d26f46

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~014eb6c8e6cf9fe6eb
Upwork Job ID:<PHONE_NUMBER>824427520
Last Price Increase: 2024-01-24

Same root cause as https://github.com/Expensify/App/issues/34296 https://github.com/Expensify/App/issues/31705

This seems like desired behaviour - saving draft messages by reportId untill manually cleared.
Other apps like slack do this also.
Prevents progress and data loss

Unable to reproduce it.


Remove Display for {Alignment,ArchitectureSize}

These display representations are easy to get confused with the previous return values of u32 which do implement Display, but the Display here isn't as applicable as it used to be. As a stopgap remove the Display implementations entirely to help identify locations that need to be updated to explicitly use an accessor or otherwise to calculate the size/align information.

Oh, yeah, sorry for forgetting about Display. I also disabled Display to fix code generation, on the other hand quite a lot of places in wit-bindgen needed Display. So it was trading quickly being able to recompile against correctness.
I feel turning Display off is the more safe choice in the long run.


Automatically upgrades character versions like Dependabot

The current version of Character is manually maintained on a regular basis and I would like to refer to the Dependabot automated upgrade version.
Dependabot is a Github standard, not suitable for non-standard like Catalog, you may need to do roundtrips based on Github Actions, like paketo-buildpacks/samples/blob/main/.github/workflows/update-tools.yml.
References:

https://docs.github.com/zh/code-security/dependabot
https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
https://github.com/paketo-buildpacks/samples/blob/main/.github/workflows/update-tools.yml

Another alternative to Dependabot: Renovate  - Universal dependency automation tool


Create ast iterator and optimize global variable access

Codecov Report

Merging #185 into lablua will increase coverage by 0.94%.
The diff coverage is 90.9%.

Impacted Files
Coverage Δ

titan-compiler/scope_analysis.lua
100% <100%> (+10.34%)
:arrow_up:

titan-compiler/coder.lua
85.83% <100%> (+0.48%)
:arrow_up:

titan-compiler/ast_iterator.lua
87.05% <87.05%> (ø)

titan-compiler/global_upvalues.lua
91.8% <91.8%> (ø)

titan-compiler/checker.lua
93.04% <0%> (+1.95%)
:arrow_up:

Continue to review full report at Codecov.

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


{AKS} Upgrade API version to 2022-09-01 for ACS module

Related command

Upgrade API version to 2022-09-01 for ACS module.

Upgrade azure-mgmt-containerservice to 20.6.0.
Regenerate test recordings.

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

AKS

Recording files are manually updated to pass CI.
Regenerating recording files via pipeline.

/azp run


Philips Hue dimmer switch error

i have here a error with the dimmer RWL021
uncaught exception: Invalid cluster id: manuSpecificPhilips.

@kirovilya is the zcl-id and zcl-packet on my latest version?

ahh .. i updated the project selfmate.. and i forgot the dependency
sry

new problem
at new FuncPayload (/opt/iobroker/node_modules/zigbee-shepherd/node_modules/zcl-packet/lib/functional.js:41:15)
at /opt/iobroker/node_modules/zigbee-shepherd/node_modules/zcl-packet/lib/zcl.js:33:22
at Dissolve. (/opt/iobroker/node_modules/zigbee-shepherd/node_modules/zcl-packet/lib/zcl.js:121:9)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Dissolve.emit (events.js:211:7)
at Dissolve. (/opt/iobroker/node_modules/dissolve-chunks/index.js:73:29)
at emitNone (events.js:106:13)
at Dissolve.emit (events.js:208:7)
at emitReadable_ (/opt/iobroker/node_modules/dissolve/node_modules/readable-stream/lib/_stream_readable.js:456:10)

Is zigbee-shepherd also at the latest version? Can you post more logging?

so new turn... del zigbee2mqtt project and new istall
https://github.com/Koenkk/zigbee2mqtt/issues/1237

is better


[release-v1.11] Adding description for the buildin event types of our duck sources

OCP / midstream port of PR #7263

/cherry-pick release-v1.10
just for better metadata ...


Simplify must_gather_shell, get all args from user

Summary by CodeRabbit
Release Notes

New Features

Enhanced command handling with optional namespace argument and improved error messaging.
Introduced new Kubernetes resources including DeploymentConfigList, DaemonSet, and various others for better resource management.
Simplified command syntax by removing the -k flag for resource kind in commands.

Bug Fixes

Improved error handling and messaging for command execution failures.

Documentation

Updated README to reflect new command syntax and examples.

Tests

Added unit tests for command execution and resource retrieval to ensure reliability.

Configuration

Updated pre-commit configuration to include additional type stubs for better type checking.

Report bugs in Issues
The following are automatically added:

Add reviewers from OWNER file (in the root of the repository) under reviewers section.
Set PR size label.
New issue is created for the PR. (Closed when PR is merged/closed)
Run pre-commit if .pre-commit-config.yaml exists in the repo.

Available user actions:

To mark PR as WIP comment /wip to the PR, To remove it from the PR comment /wip cancel to the PR.
To block merging of PR comment /hold, To un-block merging of PR comment /hold cancel.
To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
verified label removed on each new commit push.
To cherry pick a merged PR comment /cherry-pick <target branch to cherry-pick to> in the PR.

Multiple target branches can be cherry-picked, separated by spaces. (/cherry-pick branch1 branch2)
Cherry-pick will be started when PR is merged

To build and push container image command /build-and-push-container in the PR (tag will be the PR number).

You can add extra args to the Podman build command

Example: /build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=<commit_hash>

To add a label by comment use /<label name>, to remove, use /<label name> cancel
To assign reviewers based on OWNERS file use /assign-reviewers
To check if PR can be merged use /check-can-merge

Supported /retest check runs

/retest tox: Retest tox
/retest python-module-install: Retest python-module-install
/retest all: Retest all

Supported labels

hold
verified
wip
lgtm

@jpeimer please verify (I verified but don't trust me)

/retest build-container

@jpeimer did you check if all working?
if so please verify and merge :)

/verified

@myakove yes I checked, and it looks like all is working :)


Cannot run Windows Update API

Describe the bug
Fail to run list catalog entries
To Reproduce
Steps to reproduce the behavior:

Go to 'Windows Updates'
Click on 'GET list catalog entries'
Consent 'WindowsUpdates.ReadWrite.All'
Click on 'Run Query'
See error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: Windows 11
Browser: Edge
Version: 131.0.2903.70

Additional context

Hi @guliteb ,
This is likely an issue with the Windows Updates API. Please post this question on the Microsoft Graph Q&A forum where the appropriate team will be able to help you out.


heron helm chart issues and features

Moving the discussion from this pull to here
Background
I have a bare metal kubernetes install which uses rook-ceph for storage and prometheus for metrics. I use helm for many pieces of my cluster. I was previously running heron 0.17.8 without the helm chart, but after the helm chart got updated to use apache/bookkeeper:4.7.3 I wanted to switch to using helm for my heron install.
Build
Since there has not been an official helm chart released since upgrading to apache/bookkeeper:4.7.3(that I know of), I grabbed the helm files from master, replaced "VERSION" with 0.17.8 in the Chart and values yaml template files, and removed ".template" from the end. I then helm installed from that directory.
Problems Encountered (and at least temporarily solved)
bookie.yaml

the new image, apache/bookkeeper, does not appear to have netcat(nc) installed, which causes the initContainer to break. Commenting it out was a functional temporary fix.
If using "baremetal" or "aws" there is inconsistent volume naming in these lines of bookie.yaml. Bookie is trying to mount a volume called data-disk, but if you choose these platforms that volume is called ledgers-disk. This results in an error. I opted to just use the minikube "platform" for my bare-metal install instead, which suited my storage needs better.

tools.yaml

Got an error that helm could not find the requested resource. The variables set at the top of the file use "{{- " and " -}}" to remove white-space, but it seems like it may have removed too much. Ended up looking somthing like this "#  under the License.apiVersion: v1". Removing the first "-" from line 18 fixed the issue.
Had various strange errors that were ultimately caused by having a space in between the service name and port instead of a colon. Delinquent lines included L73,  L134, and L138.
Had issues with some package names that started with org.apache. Changing them to com.twitter fixed my issues. Modfied the following lines: L136 and L148-L149 (although its possible L151-L155 would have similar issues if I tried a different packing option).

Features Needed

Option to specify kubectl image/version from values.yaml. Currently it is hardcoded to latest at this line
Option to change storage class from default in bookie.yaml and zookeeper.yaml.
Option to use volumeClaimTemplates in bookie as part of baremetal install rather than specifying minikube when I'm not using minikube.
Option to enable Prometheus metrics for bookkeeper

Thanks again for your help. Hopefully I'll be able to put in a pull request for some of the changes I had to make if that would be helpful

Cool. Thanks!

i think im done with my feature/helm branch for now. let me know if theres any modifications needed before it can be accepted. thanks!

looks like branches got merged, I can roll with this for a while. I'm good with closing this, thanks again guys


Modify docker image name for vllm-hpu

The vllm image for xeon is opea/vllm, which is the backend of opea/llm-vllm. The llm means microservice layer for vllm. To be consistent, hpu image should be renamed as opea/vllm-hpu, remove the llm prefix.
Description
See https://github.com/opea-project/GenAIExamples/pull/728

I think we need define a clear rule for user to create/build docker image for opea microservice and its docker dependencies.

I think we need define a clear rule for user to create/build docker image for opea microservice and its docker dependencies.
Definitely. Feel free to close this PR once you have a plan for the naming rules.


Cask request: Thonny

Cask details
Please fill out as much as possible. Before you do, note we cannot support Mac App Store-only apps.
Name: Thonny
Homepage: http://thonny.org/
Download URL: https://bitbucket.org/plas/thonny/downloads/thonny-2.1.11.dmg
Description: Python IDE for beginners

I looked at (how to add a cask)[https://github.com/caskroom/homebrew-cask/blob/master/doc/development/adding_a_cask.md] but I didn't understand how to do it in the terminal. It should look something like this:
cask 'thonny' do
  version '2.1.11'
  sha256 '346d5ba542d37ece44732c4b438ba0b45bc5e4323e251892457ceef4bb777ac4'

  url 'https://bitbucket.org/plas/thonny/downloads/thonny-2.1.11.dmg'
  name 'Thonny'
  homepage 'http://thonny.org/'

  app 'Thonny.app'
end

https://github.com/caskroom/homebrew-cask/pull/37767


Options from plugins not processed in Application#bootstrap

In https://github.com/TypeStrong/typedoc/pull/610 a change was made to Application#bootstrap. In this change, the argument to this.options.read was changed from options to this.options.getRawValues(), however getRawValues only returns the options that were already successfully parsed. At the point those options were parsed, plugins had not yet been loaded (since they depend on Prefetch), so custom options added by plugins are ignored if they are passed as part of the options object.
While this doesn't negatively impact parsing CLI arguments, it means that custom options passed to gulp-typescript are not parsed correctly.

This has now been fixed, see #1016. Will be released in v0.16.0


Create a Recruiting Contributors Playbook

1 - do some discovery on what works and doesn't with other cncf projects
2 - more research
3 - collaborate on a playbook
4 - win.
//will update this issue with more information soon

This is staged while waiting for TOC rep approval.

/close
we're live!


Unexpected behavior of customized @Builder when @Builder.Default is used

When customizing @Builder like this:
@Getter
@AllArgsConstructor
@Builder
public class MessagePublishRequest {
	private String recipient;
	private Map<String, Object> payload;
	private String control;
	private MessageType type;
	@Builder.Default
	private LocalDateTime scheduledFor = LocalDateTime.now();

	public static class MessagePublishRequestBuilder {
		private final static ScheduleTimeFactory scheduleTimeFactory = new ScheduleTimeFactory();

		public MessagePublishRequestBuilder between(LocalDateTime from, LocalDateTime to) {
			scheduledFor = scheduleTimeFactory.scheduleBetween(from, to);
			return this;
		}
	}
}

The following test fails:
def "should schedule within given period"() {
        given:
        def from = LocalDateTime.now().plusDays(2)
        def to = LocalDateTime.now().plusDays(3)

        def request = MessagePublishRequest.builder()
                .between(from, to)
                .build()

        expect:
        request.scheduledFor.isAfter(from) || request.scheduledFor.isEqual(from)
        request.scheduledFor.isBefore(to)
    }

One might be surprised by an unexpected behavior of the code above. The reason is that between() is not setting scheduledFor$set = true so scheduledFor is overwritten by the default value on build(). The correct usage would be to use MessagePublishRequestBuilder::scheduledFor() instead of setting the field directly like this:
public MessagePublishRequestBuilder between(LocalDateTime from, LocalDateTime to) {
	scheduledFor(scheduleTimeFactory.scheduleBetween(from, to));
	return this;
}

I wonder if such problem could be avoided or at least better documented.

Just FYI, you can make that between method a line shorter: return scheduledFor(scheduleTimeFactory.scheduleBetween(from, to)); :)

It's not a matter of documentation. It is a matter of making a distinction between 'feel free to mess with these' and 'hands off / don't mess with these unless you really know what you are doing', and then documenting how you can recognize the 'dont touch those' fields. Which kinda takes care of itself if we chuck a $ in there, because the (hopefully?) universally agreed upon java-ese for 'no touchy'.
Any field marked with @Singular or indeed @Builder.Default has custom behaviour associated with it, and should result in the fields used for these to be hands-off!-ized with a dollar. @Singular already does this for maps. It should also do so for sets and lists. Any field protected by @Builder.Default already generated a dollarized $set boolean field, but should also dollarize the value field, presumably by appending $value to it.
If we apply this change it's gonna mess with all existing code that touches these fields directly, which is backwards incompatible, but the odds are increased that such code is doing the wrong thing already. Which makes the breaking change warranted.
I'm positively inclined to dollarizing ALL fields involved in special treatment, be it singular, or default.
The upcoming release doesn't have any breaking changes yet. Let's push this forward to 1.18.10.

Good point @rzwitserloot. I imagine the perfect solution to make such mistakes impossible altogether would be to wrap the fields of the builder in a bean and use setters. That would make the delomboked code unreadable or at least overcomplicated. That's why I suggested just to put some documentation on this. I can agree that dollarizing the value field is a better idea and should solve the problem.

Just bumped into this breaking change. I thought you are supposed to increase major version for those, not patch version, or are you not following semver?

Would it be possible to set the default value of the field in the Builder to the same value as what's defined for the field annotated with Builder.Default? Instead of having a marker to check if it was set or not.
I find that it's super easy to fall into the trap when you add custom variants in the generated builder.
And there are no good ways around it. The only one would be to use a different name for the custom method, but that's not always great from an API perspective.
Another issue that makes it hard to have builder customizations+default values is because Lombok doesn't generate the different setters in the builder if there is a custom variant with the same name. If this was taking in consideration the full signature then people could delegate to the generated version in most situations.

@Sam-Kruglov project lombok does not believe semver as an absolutist concept makes sense. Almost any change is 'breaking', provided a sufficiently academic case.
We bump minor version if we feel the cases where things do break are plausible if exotic and it's not in an experimental feature (we don't as a rule break common stuff at all, of course). We did not find messing with the singular-generated field as plausible, but evidently some are doing this. We did consider that, but then realized that, as this bug report shows, most of those uses are probably broken already; making your compiler now error out on this is in fact doing you a favour.
Perhaps you disagree with our assessments, but no going back now.
Not seeing those fields is the point. You're not supposed to interact with these fields, what we do with em is too tricky to try to encode in a set-in-stone spec. If we did that, people would start relying on that behaviour. It's unfortunate we were unclear about how that's a bad idea, but we've fixed that now.
@EugenCepoi no, because the field(s) used in the builder may not even be of the same type. You can use @Tolerate to 'hide' a method from lombok.

Even if they are not of the same type, this doesn't necessarily prevent you from doing the defaulting in a different way that plays more nicely with custom code.
One problem is that you seem to do the defaulting in the generated build method, perhaps you could instead do it at initialization time.

This has caused an incompatibility issue with Jackson.  Jackson's BeanDeserializer looks for the $set version of the property at this line, doesn't find it and so doesn't override the default.

My apologies ^^^ - turns out the test had a bug and the upgrade merely highlighted that bug.  Nothing to see here, move along.

@EugenCepoi We can fix your case but then we break another case.
Imagine this scenario:
class Foo {
    private static final AtomicInteger UNIQUE_ID_COUNTER = new AtomicInteger(1000);
    @Builder.Default int id = UNIQUE_ID_COUNTER.incrementAndGet();
}

If lombok initializes the builder field with the default value, then we'd be incrementing that counter every time you invoke builder(), even if you then explicitly set the id counter.
We can do one of four things here:

Break the above case and fix your case.
Find a voodoo magic unicorn that backwards-compatibly fixes all concerns. I don't think it exists here.
Keep things as is (the above case continues to work, your case is confusing)
Rejigger a few things in the API design. For example, dollarize ALL the fields and in general take away the ability to extensively mess with what builder makes, then find ways to restore needed functionality, such as: Add an explicit way to add alternative call scenarios. This would break backwards compatibility and be quite an undertaking.

Perhaps if we did it all over again we'd have shot down the 'the default expression has side effects' case and thus opened the door to ditch the $set variable. But we didn't. The decision is made now, so now unfortunately making the case for catering to your case and ditching the 'side effects' case has to bear the additional burden of justifying the backwards break. Whilst I can probably be convinced your case is more important than the side effects case, I don't think it's more important enough to warrant the break.
But here's one idea: It's a bit of work and therefore may not make it (there's so much to do, and not enough time to do it all, but we would accept PRs if this idea ends up being worthwhile), but what if lombok 'scans' the explicitly written builder class for any attempt to set that variable that has an associated $set boolean, and effectively demands that any write to that field is either immediately preceded by, or succeeded by, a write to the $set field, and failure to do so generates a compiler warning? So if you wrote this:
@Value @Builder class Whatever {
    @Builder.Default long x = System.currentTimeMillis();

    public static class WhateverBuilder {
        public WhateverBuilder x(Instant i) {
            this.x = i.toEpochMilli();
        }
    }
}

That lombok will generate a warning on the this.x =  line. This warning goes away if that assignment has this.x$set = true either directly above or directly below it (in fact, this.x$set = [i do not care what you write here] is good enough, if you go out of your way to mess with it, I assume the author is aware of how lombok works and knows what they are doing, it doesn't have to be a true literal.. or should we demand a true literal?
It's a bit complicated (we'd have to scan for this.x, and in theory, WhateverBuilder.this.x, and x = but not if there is a local var shadowing x, etc - we don't have the benefit of the compiler having already sorted out what x refers to, so we'd have to write all that. That's why I'm pretty sure the value-for-cost analysis on this upgrade implies this upgrade is way down the list, but, assuming it's a good idea, at least we can then endorse 'PRs accepted' on it ;)
What do you think?

Thinking on it, there is a magic unicorn, but I'm not sure we want it: Instead of detecting if you fail to invoke $set = true, what if we... generated it for you? This is trickier than it seems like, e.g. we'd have to turn:
for (int i = 0; i < 10; i++) if (i == 5) x = 10;
into:
for (int i = 0; i < 10; i++) if (i == 5) {x = 10; x$set = true;}
and we'd have to flag as error something like:
for (x = 0; x <10; x++) { /* error - you can't set x in one of the 3 'for' components */)
as well as:
while (x = 0 != 10) /* error, can't use the assignment as expression */
but we could theoretically do all that.

I would still be worried about the different ways to access the field.
   foo.x = 7;

Should we fix that? Well, we might.
...
FooBuilder copyXInto(FooBuilder foo) {
    foo.x = this.foo;
    foo.x$set = true;
}
...
void resetFoo() {
   x = 0;
   foo.x$set = false;
}
...

The only thing I can image is to disallow direct field modification, and generate private setters.

Hey thanks for giving this a second thought :)
Regarding the side effect use case, this feels somewhat unnatural to me. I'd expect it to have similar semantics as default values for attributes in Java, which does run that code anyway even if you provide a different value through the constructor or some other mean. I wonder in practice how common are either use cases. I can definitely say that the issue I mention occurred in the project I'm working on several times, to my self and colleagues of mine. And is not related to some technical aspect in our code base, but mostly just about how we imagine this API would work.
From an outside perspective the different options sound quite complex, I really would just imagine something that sets the default value "statically" which stays close to std Java and keep generating the setter if there isn't another one with the same signature.
That said, I've been using the Tolerate workaround so far and delegated to the generated setter which does the job, so I'm fine with that :) Thank you!


Add simple rekor-cli command to verify artifact

Using the SHA256SUMS release artifact from https://github.com/SanCloudLtd/meta-sancloud/releases/tag/v6.1.0 as an example, I have uploaded the signature to the rekor transparency log. I feel that I should now be able to verify the file integrity using just rekor. There is currently a convoluted way to do this:

Search rekor for the file hash: rekor-cli search --sha "sha256:$(sha256sum SHA256SUMS | cut -d' ' -f1)" > uuid.txt

Retrieve the rekor log entry using the UUID given by the above command, isolate the signature content using jq, decode it and store it in a file: rekor-cli get --format json --uuid $(< uuid.txt) | jq .Body.RekordObj.signature.content | tr -d '"' | base64 -d > SHA256SUMS.asc

Retrieve the appropriate PGP key from keys.openpgp.org (where email address verification has taken place): gpg --search-keys<EMAIL_ADDRESS>

Verify the signature using gpg: gpg --verify SHA256SUMS.asc

It would be great to have a simpler, more integrated way to achieve this. Perhaps a rekor-cli verify-blob ... command.
Note that in step 3 I get the PGP key from a different source. This is because if we rely on the public key embedded in the rekor log then there is no guarantee that it actually belongs to the organization or individual who made the release. Obviously this is where trusting the public key you've got becomes an interesting problem in itself but I think that's a different topic for another day.

Hey @pbrkr! The way that you have described it is what cosign verify-blob performs. (caveat: I think cosign may not support pgp signature searching)
In my opinion, the functionality for rekor-cli verify (which exists) is that it takes in a Rekor entry information and verifies that the entry is in the log. Although Rekor verifies the signature before storing an entry in a log, it is not a signature validation tool (like cosign, openssl, or gpg are), but rather a transparency log that can attest to whether something was included in the log. So imo, verifying the signature should be performed by a signature verification tool.
Note: you can also retrieve the PGP key from the rekor entry as well.in (3)
You also do not need to perform the search via the redis index (search by sha, which can result in multiple entries because multiple people can sign on that file). To retrieve the log entry and verify that it is in the log:
$ gpg --export<EMAIL_ADDRESS>> pubkey.key
$ ./rekor verify --artifact ~/Downloads/SHA256SUMS --signature ~/Downloads/SHA256SUMS.asc --public-key pubkey.key  --format json

Closing since this functionality exists in Cosign


Non-lbex services attempt to delete non-existent resources

I0420 03:36:39.094273       1 controller.go:193] syncServices: deleting service: staging/zonar-ac-39
I0420 03:36:39.094513       1 stream.go:82] deleting /etc/nginx/conf.d/staging-zonar-ac-39.stream.conf
W0420 03:36:39.094597       1 stream.go:86] Failed to delete /etc/nginx/conf.d/staging-zonar-ac-39.stream.conf: remove /etc/nginx/conf.d/staging-zonar-ac-39.stream.conf: no such file or directory
I0420 03:36:39.095656       1 controller.go:259] syncEndpoints: deleting removed endpoint: staging/zonar-ac-39
2

Closed with commit message that had a typo ;(


Parenthesis instead of square brackets

\lbrack and \rbrack are rendered to left and right parentheses (), but they should be rendered to left and right square brackets [].
Moreover, the parser parses a left parenthesis ( to a SymbolAtom containing the name lbrack. I guess the error above arises from the confusion about what lbrack and rbrack are.

Fixed it! I could write a PDR, but I have different VS2017 settings, and its only a few lines in 4 different files, so please have a look at this commit.
Let me know if this is fixing it!

Thanks, I'll take a look.


Increase threshold for failed code coverage checks

Let's use https://about.codecov.io/ consistently across repos and also increase threshold for failed checks.

[ ] https://github.com/neurobagel/tools/issues/7
[ ] https://github.com/neurobagel/api
[ ] https://github.com/neurobagel/query-tool/issues/62
[ ] https://github.com/neurobagel/federation-api
[ ] https://github.com/neurobagel/bagel-cli

At the moment, our code coverage checks (e.g., via coveralls) fail when coverage decreases by any amount. For example, see https://github.com/neurobagel/api/commit/a93d476f4ffbfd6ab7413de5c1fba7f92882c0a4 which failed the coverage check due a 0.7% decrease.
To avoid possibly superfluous tests just for the sake of ensuring 0% coverage decrease, I propose we bump up the threshold so that coveralls / codecov only complains when coverage has decreased 1% or more.

Could we make it relative to the PR rather than the codebase? I.e. we allow up to X% (maybe 20%?) of new or changed lines in a PR to be uncovered? % of the whole codebase is a bit harder to judge for me

I configured the global settings here: https://app.codecov.io/account/gh/neurobagel/yaml
coverage:
  status:
    patch:
      default:   # default is the status check's name, not default settings
        target: auto
        threshold: 5

My understanding is that this will apply a 5% threshold on patches: https://docs.codecov.com/docs/commit-status

Hey @surchs, just thought of something: would you mind in your PRs also updating the README badges for coverage in the repos that have it? Currently they use coveralls ones I believe.


How do i use password instead of passphrase

I dont like passphrase. Is there a option here to use password instead?

Is there a option here to use password instead?

No.

I dont like passphrase.

What specifically don't you like about passphrases?


[docs] Fix images width overflow on Firefox

[x] I've read and followed the contributing guide on how to create great pull requests.
[x] I've updated the relevant documentation for any new or updated feature.
Closes #2860

Before
After

Any idea about what firefox is doing differently?

I feel it might be related to this issue in Firefox where in the absence of an explicit max-width, it sets width to be max-content, but I could be wrong: https://bugzilla.mozilla.org/show_bug.cgi?id=1670151


Delay reporting MSQ ingest success until segments are loaded

Affected Version
26.0.0-SNAPSHOT
Description
I am creating a Jupyter notebook to illustrate how to us the new Druid catalog. As part of that task, I submit an MSQ ingestion task, wait for the Overlord to report task completion, then query the table. Each ingestion uses REPLACE and usually creates a new datasource.
When running queries, I occasionally (about 20% of the time) get an error saying that there is no such table. Yet, if I wait a few seconds, and try again, the query succeeds. The reason is clear: MSQ reported success as soon as ingestion is complete. It takes a while for the new segments to be loaded onto my one historical node. During that time, the Broker knows nothing about the new table.
To be very specific:

No segments for the target table exist.
Call /sql/task to submit an MSQ REPLACE query.
Poll Overlord waiting for the task to be marked as completed.
Immediately issue a /sql query against that same table.

This creates a race condition. Druid reports that the ingest is done, but it is not really done. The client has to be smart enough to know that the resulting query error is due to a race condition, not to one of possibly many other problems. This puts the burden on the client. Or, in my case, I have to add extra verbiage that says "if this query fails, wait a while and try again", which doesn't scream "easy to use."
The MSQ ITs (and now the Jupyter notebook) use a two-part wait loop: first wait for segment load, then wait for a simple SQL query to succeed. This approach works, but means that each client (the Druid console, the Jupyter notebook, custom clients) must all discover the issue, discover the workaround, and code up the workaround every place that an MSQ query is run followed by a SELECT query. Again, this is not "easy to use."
The ask is for MSQ to wait for segments to be loaded before declaring completion. That way, a client that waits for MSQ task completion can be assured that, when the task is complete, the table is actually ready to be queried. If we don't feel that such a check is generally useful, then provide an option do do the wait when requested (say with a query context parameter.)

I think https://github.com/apache/druid/pull/14322 completes all the requirements mentioned in the PR. cc: @adarshsanjeev


183235265 drawn object not selectable

Ticket:
https://www.pivotaltracker.com/n/projects/2441242/stories/183235265

Implemented all your changes @kswenson , and got the variable chip object to drag by adding a onMouseDown event handler. Merging now.


command line for package.json script

What is a command line I need to run to get results with karma-tap?
I want to run my test with testling.

See karma-tap-example: this is a karma plugin, and running tests is the same as for any other karma test suite: ./node_modules/karma/bin/karma start to start.*
(that's what karma recommends)

Making some clean ups on old issues.


Can we put an 'are you sure' when navigating 'back' from the notebook

On a mack laptop I often accidentally make the 'back' gesture when attempting to scroll up. This is very annoying from within my notebook! If I have a cell that takes several minutes to run, that progress is lost. Could we put an 'are you sure?' popup there?

Sort of. We can intercept all page transitions while you're in a notebook, but I don't know if we can differentiate the kind of navigation, e.g. back button vs clicking a link.

I'm happy to confirm even if it's a forward nav. Any nav except hitting the 'x' to close button

Investigate/prototype

duplicate of #470


[BUG] Model info doesn't show when re-opening the UI

To reproduce
Steps to reproduce the behavior:

Load model
Settings page [pic 1]
Close UI
Open UI
Settings page [pic 2]

Screenshots
Pic 1:

Pic 2:

Seems like the controls are destructed when the UI is closed.
So a solution is to add a way to listen to have the model info control pull from the model info instead of having it push on model staging changes.

Note to self: OnUIOpen(), SendControlMsgFromDelegate, OnMsgFromDelegate

A very simple fix would be to just call NAMSettingsPageControl::SetModelInfo inside NeuralAmpModeler::OnUIOpen.
As controls are destructed but model seem to stay loaded and in current version SetModelInfo is only called after new model is loaded.


Can't update to v1.0.2 via composer

Hi, there is no latest version on packagist because of license error.
Could you fix it?

The problem not in the license, but i will accept the pr #7

So, now it should be the latest version on the packagist.


Ctrl+C is not good, use Esc or some other key

Ctrl+C is not easily used when the script thinks it won, but actually lost. One key usage is better than a combo.

Clicking Q is the quickest way. Esc is already bound to pausing/unpausing the game.


expose magic polygon subcells

+ add configuration variable MAGIC_GDS_POLYGON_SUBCELLS
~ minor formatting changes to other variables documentation
During caravel gf180 development. This greatly enhanced the performance of generating the chip's gds with magic

I should probably review this.  The "gds polygon subcells" will have a large impact on reading the foundry GDS, specifically for the I/O corner cell layout which has large structures at 45 degree angles with narrow separation.  It had better have zero impact on writing GDS, or you're doing something wrong.

Offhand, I'd say that the issue is that EXTRA_GDS_FILES should only contain cells that are not in the PDK library and for which a .mag view does not exist.

@RTimothyEdwards It is the case for caravel that extra gds doesn't contain anything from the pdk.
set ::env(EXTRA_GDS_FILES) "\
    $gds_root/copyright_block.gds \
    $gds_root/open_source.gds \
    $gds_root/user_id_textblock.gds \
    $gds_root/caravel_logo.gds \
    $gds_root/caravel_motto.gds \
    $gds_root/caravel_power_routing.gds \
    $gds_root/chip_io.gds \
    $gds_root/caravel_core.gds"

About specifically using gds polygon subcells, I was told that the following statements impacted the performance of gds generation:
gds ordering on
gds polygon subcells true
gds flatten true
gds flatglob *_CDNS_*`

and only gds polygon subcells true had an impact

Another enhancement we can do is have the ability to load mag files. Would that be simply achieved by iteration of a list mag file and called load <file> ?

@kareefardi Do I want to merge this now or wait?

@kareefardi :  The problem is that this flow is not designed for reading in chip_io from GDS.  However, as you are running the above commands with the gds readonly true option set, then it should be okay to read in with polygon subcells true.  However, it would be preferable to let magic generate output for all layout except for the core, as that is the way the flow was designed to work.  But in the above script, the inefficiency caused by pulling all the GDS separately should not be much of an issue.

@kareefardi :  Meaning that I'm okay with the script above, as long as we can confirm that the final GDS is correct.

@RTimothyEdwards I see. I will generate layouts using both methods and compare the layouts.

@donn We can potentially wait till I verify the layout generated. Or we can have it merged now and remove it later if it proves to be dangerous.

@donn The comparison was found to be ok. I think we should merge this

To be more verbose, there were differences however they originated from the source gds files not because of the magic command


Default num_spin_reversal_transforms to 1 in SpinReversalTransformComposite

I believe that this will lead to less surprising behavior.

SpinReversalTransformComposite was moved to dwave-preprocessing, this issue has been moved as well.


[Bug]: Your request was missing a required header. Missing headers: x-goog-credential

Please confirm that you have:

[X] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
[X] Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?
App, Extension, Function
Expected behavior
It should have worked
Actual behavior
It didn't work
Verbose output
Releasing a new app version as part of checkout-app

2024-07-12T16:44:48.877Z: Creating directory at /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/f99f968e5af3a9f89960353c39a8868e...
2024-07-12T16:44:48.877Z: Sync-creating directory at /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/8cc8a248e48bd2841ffdeed28ef46951/bundle...
2024-07-12T16:44:48.877Z: Creating an empty file at /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/8cc8a248e48bd2841ffdeed28ef46951/bundle/.shopify...
2024-07-12T16:44:48.880Z:
Running system process:
  · Command: npm exec -- javy-cli --version
  · Working directory: /Users/kani/shopify-apps/checkout-app

2024-07-12T16:44:52.105Z: Deduplicating React dependency for /Users/kani/shopify-apps/checkout-app/extensions/custom-checkout-banner, using /Users/kani/shopify-apps/checkout-app/node_modules/react/index.js
2024-07-12T16:44:52.110Z: Deduplicating React dependency for /Users/kani/shopify-apps/checkout-app/extensions/discount-code-banner, using /Users/kani/shopify-apps/checkout-app/node_modules/react/index.js
2024-07-12T16:44:52.111Z: Deduplicating React dependency for /Users/kani/shopify-apps/checkout-app/extensions/pre-purchase, using /Users/kani/shopify-apps/checkout-app/node_modules/react/index.js
2024-07-12T16:44:52.112Z: Deduplicating React dependency for /Users/kani/shopify-apps/checkout-app/extensions/custom-checkout-field, using /Users/kani/shopify-apps/checkout-app/node_modules/react/index.js
2024-07-12T16:44:52.113Z: Deduplicating React dependency for /Users/kani/shopify-apps/checkout-app/extensions/custom-header, using /Users/kani/shopify-apps/checkout-app/node_modules/react/index.js
       custom-banner │ Bundling UI extension custom-banner...
discount-code-banner │ Bundling UI extension discount-code-banner...
       product-offer │ Bundling UI extension product-offer...
        custom-field │ Bundling UI extension custom-field...
       custom-header │ Bundling UI extension custom-header...
    product-discount │ Building function product-discount...
    product-discount │ Building GraphQL types...
2024-07-12T16:44:52.129Z:
Running system process:
  · Command: npm exec -- graphql-code-generator --config package.json
  · Working directory: /Users/kani/shopify-apps/checkout-app/extensions/product-discount

    cart-transformer │ Building function cart-transformer...
    cart-transformer │ Building GraphQL types...
2024-07-12T16:44:52.135Z:
Running system process:
  · Command: npm exec -- graphql-code-generator --config package.json
  · Working directory: /Users/kani/shopify-apps/checkout-app/extensions/cart-transformer

       custom-banner │ custom-banner successfully built
       product-offer │ product-offer successfully built
       custom-header │ custom-header successfully built
        custom-field │ custom-field successfully built
discount-code-banner │ discount-code-banner successfully built
    product-discount │ Bundling JS function...
2024-07-12T16:44:53.298Z: Generating dist/function.js using generated module:
2024-07-12T16:44:53.298Z:
import __runFunction from "@shopify/shopify_function/run"

import { run as runRun } from "user-function"
export function run() { return __runFunction(runRun) }
    cart-transformer │ Bundling JS function...
2024-07-12T16:44:53.304Z: Generating dist/function.js using generated module:
2024-07-12T16:44:53.304Z:
import __runFunction from "@shopify/shopify_function/run"

import { run as runRun } from "user-function"
export function run() { return __runFunction(runRun) }
    product-discount │ Running javy...
2024-07-12T16:44:53.307Z: Generating world to use with Javy:
2024-07-12T16:44:53.307Z: package function:impl;

world shopify-function {
  export %run: func();
}
2024-07-12T16:44:53.307Z: Writing some content to file at /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/0c6ce264f75cd5678d62999e7a69122a/javy-world.wit...
2024-07-12T16:44:53.311Z:
Running system process:
  · Command: npm exec -- javy-cli compile -d -o /Users/kani/shopify-apps/checkout-app/extensions/product-discount/dist/function.wasm dist/function.js --wit /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/0c6ce264f75cd5678d62999e7a69122a/javy-world.wit -n shopify-function
  · Working directory: /Users/kani/shopify-apps/checkout-app/extensions/product-discount

    cart-transformer │ Running javy...
2024-07-12T16:44:53.313Z: Generating world to use with Javy:
2024-07-12T16:44:53.313Z: package function:impl;

world shopify-function {
  export %run: func();
}
2024-07-12T16:44:53.313Z: Writing some content to file at /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/a77304bbc3614e70d34368a64e11df01/javy-world.wit...
2024-07-12T16:44:53.314Z:
Running system process:
  · Command: npm exec -- javy-cli compile -d -o /Users/kani/shopify-apps/checkout-app/extensions/cart-transformer/dist/function.wasm dist/function.js --wit /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/a77304bbc3614e70d34368a64e11df01/javy-world.wit -n shopify-function
  · Working directory: /Users/kani/shopify-apps/checkout-app/extensions/cart-transformer

    product-discount │ Done!
    cart-transformer │ Done!

2024-07-12T16:45:06.799Z: Zipping /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/8cc8a248e48bd2841ffdeed28ef46951/bundle into /private/var/folders/qx/2rv835c93f36595hfhmd0frc0000gn/T/f99f968e5af3a9f89960353c39a8868e/bundle.zip
2024-07-12T16:45:06.868Z: Sending "Partners" GraphQL request:
  mutation functionUploadUrlGenerateMutation {
    functionUploadUrlGenerate {
      generatedUrlDetails {
        url
        moduleId
        headers
        maxBytes
        maxSize
      }
    }
  }

With request headers:
 - User-Agent: Shopify CLI; v=3.64.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-12T16:45:07.020Z: Sending "Partners" GraphQL request:
  mutation functionUploadUrlGenerateMutation {
    functionUploadUrlGenerate {
      generatedUrlDetails {
        url
        moduleId
        headers
        maxBytes
        maxSize
      }
    }
  }

With request headers:
 - User-Agent: Shopify CLI; v=3.64.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-12T16:45:07.409Z: Request to https://partners.shopify.com/api/cli/graphql completed in 387 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"f10334b70ec1f862c9920bd58b013cb4"
 - x-request-id: 3ce1d3bf-5078-45bc-9eaf-fc3830bd43ed-1720802707

2024-07-12T16:45:07.411Z: Reading the content of file at extensions/product-discount/dist/function.wasm...
2024-07-12T16:45:07.485Z: Request to https://partners.shopify.com/api/cli/graphql completed in 610 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"169362a42c1ae9fcf78d01ea71ef2256"
 - x-request-id: 9ffc00e0-fcf4-43ee-b82b-4ab0c9760af1-1720802706

2024-07-12T16:45:07.487Z: Reading the content of file at extensions/cart-transformer/dist/function.wasm...
2024-07-12T16:45:14.562Z: Request to https://storage.googleapis.com/runtime-engine-production-bytecode/32d3aa76-b674-478c-b6c3-026da90a3f7d.wasm?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=partners-production%40shopify-tiers.iam.gserviceaccount.com%2F20240712%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240712T164507Z&X-Goog-Expires=120&X-Goog-SignedHeaders=host%3Bx-goog-content-length-range&X-Goog-Signature=110bb3ac34fb3349b3880da8f40d7137a550c45bc68ebd9fde4f580486a8d0c9e9d58a15838d924230aceee55c8a68e8b377c62e6f0dc60c7e05a049f06932fff427939404ae840a22ea12b10f3eef6d40efe090f02d36d26d3d503fb3d88b185a781ca8a7cd3acee42a20674ef500d153bb452fe3b331ef9d4822a50e44d55c25a5701833c6ca76a89fd6f4bac42b8d7540b628741c970079beda23ea868f4d98d28f9e143700402f92616605b62b6e61c468294bcda1159e2e1fcb3a8c19ff053eda964c7b05a8766e5dcc584218e798bb1a180966298ab32f810966b6e2c87527248212f10c063ad307b4cabd7b60af447ac17c2e0fad24b0b31919e178a4 completed in 7146 ms
With response headers:

╭─ error ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                │
│  request to https://storage.googleapis.com/runtime-engine-production-bytecode/32d3aa76-b674-478c-b6c3-026da9  │
│  0a3f7d.wasm?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=partners-production%40shopify-tiers.iam.gse  │
│  rviceaccount.com%2F20240712%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240712T164507Z&X-Goog-Expires=12  │
│  0&X-Goog-SignedHeaders=host%3Bx-goog-content-length-range&X-Goog-Signature=110bb3ac34fb3349b3880da8f40d7137  │
│  a550c45bc68ebd9fde4f580486a8d0c9e9d58a15838d924230aceee55c8a68e8b377c62e6f0dc60c7e05a049f06932fff427939404a  │
│  e840a22ea12b10f3eef6d40efe090f02d36d26d3d503fb3d88b185a781ca8a7cd3acee42a20674ef500d153bb452fe3b331ef9d4822  │
│  a50e44d55c25a5701833c6ca76a89fd6f4bac42b8d7540b628741c970079beda23ea868f4d98d28f9e143700402f92616605b62b6e6  │
│  1c468294bcda1159e2e1fcb3a8c19ff053eda964c7b05a8766e5dcc584218e798bb1a180966298ab32f810966b6e2c87527248212f1  │
│  0c063ad307b4cabd7b60af447ac17c2e0fad24b0b31919e178a4 failed, reason: Client network socket disconnected      │
│  before secure TLS connection was established                                                                 │
│                                                                                │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

2024-07-12T16:45:14.583Z:
Running system process:
  · Command: npm prefix
  · Working directory: /Users/kani/shopify-apps/checkout-app

2024-07-12T16:45:14.777Z: Obtaining the dependency manager in directory /Users/kani/shopify-apps/checkout-app...
2024-07-12T16:45:14.781Z:
Running system process:
  · Command: ruby -v
  · Working directory: /Users/kani/shopify-apps/checkout-app

2024-07-12T16:45:14.817Z: Request to https://storage.googleapis.com/runtime-engine-production-bytecode/1664f8cb-81b9-4e04-b239-466553104239.wasm?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=partners-production%40shopify-tiers.iam.gserviceaccount.com%2F20240712%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240712T164507Z&X-Goog-Expires=120&X-Goog-SignedHeaders=host%3Bx-goog-content-length-range&X-Goog-Signature=5403872a9fa69def543c36bbbc6a1a95eef7ec42c97ae67d0d9e3466f5e6467798d681e022035c453cc2f03b7649cf6759b637f662a90f2cb0708b8e1c997650b27c72888ffb45c0a0060803c0c0165167cf6a576ebf0ccb88fa8fbdefc96ff3a5970e693bb21ebb8ee80d8e6f7f7df9d988eb4e207b3520a8a7d7c32a053e46d963cd8bbda27e3f69d56c722d1e167a3f74c81530c74f82bb75c176b2c2cd7b3b5ad36e774629f70ed9684e24945ff62ecbdf20f45253f81c6023c097758674e6633c8bd493cce695c2f8f2a7785c8c0394ad0e84f7d884763f9228d9270b1ad714183d4117dc99d343daf46bb76cee8b3db2168fe082124aba956851e3b44d completed in 7329 ms
With response headers:

2024-07-12T16:45:15.085Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 277 ms
With response headers:
 - x-request-id: 38087e29-8231-4904-a9b6-03505693cada

2024-07-12T16:45:15.087Z: Analytics event sent: {
  "command": "app deploy",
  "time_start":<PHONE_NUMBER>955,
  "time_end":<PHONE_NUMBER>577,
  "total_time": 34622,
  "success": false,
  "cli_version": "3.64.0",
  "ruby_version": "2.6.10",
  "node_version": "20.14.0",
  "is_employee": false,
  "uname": "darwin amd64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\"]",
  "env_shell": "zsh",
  "env_device_id": "345ef4676d56df25c32d6df24a19618b1d92a651",
  "env_cloud": "localhost",
  "env_package_manager": "npm",
  "env_is_global": true,
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_deploy_flag_message_used": false,
  "cmd_deploy_flag_version_used": false,
  "cmd_deploy_flag_source_url_used": false,
  "cmd_app_all_configs_any": true,
  "cmd_app_all_configs_clients": "{\"shopify.app.checkout-app.toml\":\"fd36e6acf48f842a756d01eb9e60b3b1\",\"shopify.app.toml\":\"1093acf0908e1fb5376ff2c4dc247bfe\"}",
  "cmd_app_linked_config_used": true,
  "cmd_app_linked_config_name": "shopify.app.checkout-app.toml",
  "cmd_app_linked_config_git_tracked": true,
  "cmd_app_linked_config_source": "flag",
  "cmd_app_linked_config_uses_cli_managed_urls": true,
  "project_type": "node",
  "app_extensions_any": true,
  "app_extensions_breakdown": "{\"ui_extension\":5,\"function\":2}",
  "app_extensions_count": 7,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": true,
  "app_extensions_function_count": 2,
  "app_extensions_theme_any": false,
  "app_extensions_theme_count": 0,
  "app_extensions_ui_any": true,
  "app_extensions_ui_count": 5,
  "app_name_hash": "81d043309745c8578f2d42bd2b5296a53a7e5857",
  "app_path_hash": "44743c59f3f967b012fbd3b34401ac70dea4a45b",
  "app_scopes": "[\"read_customers\",\"read_markets\",\"read_shipping\",\"write_cart_transforms\",\"write_discounts\",\"write_products\"]",
  "app_web_backend_any": true,
  "app_web_backend_count": 1,
  "app_web_custom_layout": true,
  "app_web_framework": "remix",
  "app_web_frontend_any": true,
  "app_web_frontend_count": 1,
  "env_package_manager_workspaces": true,
  "partner_id": 2571774,
  "api_key": "****",
  "cmd_deploy_include_config_used": true,
  "cmd_deploy_config_modules_breakdown": "[\"access_scopes\",\"application_url\",\"auth\",\"embedded\",\"handle\",\"name\",\"pos\",\"webhooks\"]",
  "cmd_deploy_config_modules_updated": "[\"access_scopes\",\"application_url\",\"auth\"]",
  "cmd_deploy_confirm_new_registrations": 7,
  "cmd_deploy_confirm_updated_registrations": 0,
  "cmd_deploy_confirm_removed_registrations": 0,
  "cmd_deploy_confirm_cancelled": false,
  "cmd_deploy_confirm_time_to_complete_ms": 2783,
  "cmd_all_timing_network_ms": 14499,
  "cmd_all_timing_prompts_ms": 2782,
  "cmd_all_launcher": "npm",
  "cmd_all_topic": "app",
  "cmd_all_plugin": "@shopify/cli",
  "cmd_all_force": false,
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "44743c59f3f967b012fbd3b34401ac70dea4a45b",
  "cmd_app_reset_used": false,
  "cmd_all_timing_active_ms": 17339,
  "cmd_all_exit": "expected_error",
  "args": "--verbose",
  "error_message": "request to https://storage.googleapis.com/runtime-engine-production-bytecode/32d3aa76-b674-478c-b6c3-026da90a3f7d.wasm?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=partners-production%40shopify-tiers.iam.gserviceaccount.com%2F20240712%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240712T164507Z&X-Goog-Expires=120&X-Goog-SignedHeaders=host%3Bx-goog-content-length-range&X-Goog-Signature=110bb3ac34fb3349b3880da8f40d7137a550c45bc68ebd9fde4f580486a8d0c9e9d58a15838d924230aceee55c8a68e8b377c62e6f0dc60c7e05a049f06932fff427939404ae840a22ea12b10f3eef6d40efe090f02d36d26d3d503fb3d88b185a781ca8a7cd3acee42a20674ef500d153bb452fe3b331ef9d4822a50e44d55c25a5701833c6ca76a89fd6f4bac42b8d7540b628741c970079beda23ea868f4d98d28f9e143700402f92616605b62b6e61c468294bcda1159e2e1fcb3a8c19ff053eda964c7b05a8766e5dcc584218e798bb1a180966298ab32f810966b6e2c87527248212f10c063ad307b4cabd7b60af447ac17c2e0fad24b0b31919e178a4 failed, reason: Client network socket disconnected before secure TLS connection was established",
  "app_name": "niche-venture-app",
  "env_plugin_installed_all": "[\"@shopify/cli\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2024-07-12T16:45:15.092Z: Reporting handled error to Bugsnag: request to https://storage.googleapis.com/runtime-engine-production-bytecode/32d3aa76-b674-478c-b6c3-026da90a3f7d.wasm?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=partners-production%40shopify-tiers.iam.gserviceaccount.com%2F20240712%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240712T164507Z&X-Goog-Expires=120&X-Goog-SignedHeaders=host%3Bx-goog-content-length-range&X-Goog-Signature=110bb3ac34fb3349b3880da8f40d7137a550c45bc68ebd9fde4f580486a8d0c9e9d58a15838d924230aceee55c8a68e8b377c62e6f0dc60c7e05a049f06932fff427939404ae840a22ea12b10f3eef6d40efe090f02d36d26d3d503fb3d88b185a781ca8a7cd3acee42a20674ef500d153bb452fe3b331ef9d4822a50e44d55c25a5701833c6ca76a89fd6f4bac42b8d7540b628741c970079beda23ea868f4d98d28f9e143700402f92616605b62b6e61c468294bcda1159e2e1fcb3a8c19ff053eda964c7b05a8766e5dcc584218e798bb1a180966298ab32f810966b6e2c87527248212f10c063ad307b4cabd7b60af447ac17c2e0fad24b0b31919e178a4 failed, reason: Client network socket disconnected before secure TLS connection was established
2024-07-12T16:45:15.161Z:
Running system process:
  · Command: npm prefix
  · Working directory: /Users/kani/shopify-apps/checkout-app

2024-07-12T16:45:15.343Z: Obtaining the dependency manager in directory /Users/kani/shopify-apps/checkout-app...

Reproduction steps

npm run deploy -- --verbose
It had been working two days ago. But suddenly it started asking me to log in again frequently. And now it can't work any more.
My app and extensions can work when I run npm run dev without include functions, when I included functions, it will run into this issue.
It will run into this issue when npm run deploy for any situation
I have try to init new apps for testing, but same result
I'm using VPN and based China. I have try to use Phone data too
I have try to logout、clear cache、restart system

Operating System
macOS Ventura 13.4
Shopify CLI version (check your project's package.json if you're not sure)
@shopify/cli/3.64.0 darwin-x64 node-v20.14.0
Shell
zsh
Node version (run node -v if you're not sure)
v20.14.0
What language and version are you using in your application?
Node Remix

fixed via uninsatll & install the new shopify-cli


Moving all Rules to the Network class (WIP)

This is an attempt to define rules per network.
A second commit will come that puts rules that are specific to a network in the Networks project.

Closing this is will be done in another PR


Make module run script names unique

Description
Make the script phase name unique per module so multiple modules can be embedded into a host app.  Ran the integration tests, and you can see the updated script names there.
Related Issues
Fixes https://github.com/flutter/flutter/issues/60223
Tests
Integration tests already test that these scripts are embedded and run.
Checklist

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] I signed the [CLA].
[x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
[x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change

[x] No, no existing tests failed, so this is not a breaking change.
[ ] Yes, this is a breaking change. If not, delete the remainder of this section.

Started Google testing for this PR

Google testing passed!


CI: Audit JavaScript dependencies

Dependabot produces more spam and stress than value. It's a good effort, Microsoft, but I need more flexibility in what and where gets reported.

I don't want to be greeted with "OMFG YOU HAVE 47 CRITICAL AND 582 HIGH SEVERITY VULNERABILITIES!  Even if I got paid for this, I wouldn't want to be experiencing it.
Introduce our own dependency audit thing, which is basically the same npm audit under the hood, but with some tweaks:

Customizable severity levels for reports
Examples are checked only in master
Release branches check only non-dev dependencies

Run this for every pull request made against any branch, for every push made after a pull request, and daily for all long-term branches.
For now, only JavaScript dependencies. Later this could be expanded to more languages (cargo audit would be an easy one, for example).
Once you're all good with these reports and language coverage, let's disable Dependabot for the repo, okay? 🥺
Checklist

[x] Change is covered by automated tests
[X] The coding guidelines are followed
[X] Example projects and code samples are up-to-date
[x] Changelog is updated (do we need a line?)

Changelog is updated (do we need a line?)

i don't think we need anything in changelog.
re: npm audit — great effort! i was thinking about adding Snyk, but i'm not sure if their report are better than dependabot

should we turn off dependabot if we run our own workflow for audit? or re-configure via dependabot.yaml?

should we turn off dependabot if we run our own workflow for audit? or re-configure via dependabot.yaml?

Oh, right. It should be possible to disable it only for some package managers. Say, now that npm is covered by a custom script – disable Dependabot for npm but keep it running for everything else...

i think we should enable npm checks first, and only then disable dependabot. it doesn't ask to eat, so...

Well, I'm not sure it is possible, since "Dependabot alerts", "Dependabot security updates", and "Dependabot version updates" look like separate features.
We never had "version updates" enabled (bot submitting PRs to update outdated dependencies). "Security updates" got disabled because of how unpredictable and annoying the PR stream was.
Now, I don't really see any documentation on how to disable "alerts" specifically for certain package managers. So initially I assumed all-or-nothing, so the suggested plan would be to merge this PR, then maybe throw in more audit checks for whatever wrappers actually have dependencies (many do not), and then finally disable Dependabot completely. In the meantime, I'd just dismiss pending warnings (thankfully, there is a button for that now).

So, what about this thing?
I've synced it up with master, let's see if the build is still passing...

19 vulnerabilities (5 moderate, 5 high, 9 critical)

Well but of course!

Okay... So I've bumped even more of React Native stuff to "resolve" all "critical" things that npm audit found there.
I've tried running it on the RN example. There are still, like, 5 of those "critical" things there. However, I could not fix them, since apparently that also requires updating React Native there, and released version of Themis depends on the old version – for some reason that leaks into examples, despite being a dev-dependency?
Then when I tried fixing it up, I ran out of disk space on my computer, so apparently React Native is not for me.
@radetsky, could you please look into the examples?

let's disable Dependabot for the repo, okay? 🥺

heheh

@radetsky plz take a look

Meanwhile, GitHub has removed those "We found potentials security vulnerabilities" banners from UI, so that's one reason for anxiety gone.
Is there any merit in customized severity levels for audit? What do you think?

Is there any merit in customized severity levels for audit? What do you think?

hard to tell, we can try.
GitHub moved these alerts to https://github.com/cossacklabs/themis/security/dependabot


Add KeyManager for managing curve key pairs

Codecov Report
Attention: Patch coverage is 43.13725% with 58 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (protodrg@42b756e). Click here to learn what that means.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

@@             Coverage Diff             @@
##             protodrg      #12   +/-   ##
===========================================
  Coverage            ?   64.73%
===========================================
  Files               ?       71
  Lines               ?     4526
  Branches            ?        0
===========================================
  Hits                ?     2930
  Misses              ?     1596
  Partials            ?        0

Files
Coverage Δ

smartsim/_core/config/config.py
96.19% <50.00%> (ø)

smartsim/_core/utils/security.py
42.85% <42.85%> (ø)


Merge main in in-dev

Bumps codacy/codacy-analysis-cli-action from 1.1.0 to 4.3.0.

Release notes
Commits

updated-dependencies:

dependency-name: codacy/codacy-analysis-cli-action
dependency-type: direct:production
update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot]<EMAIL_ADDRESS>
Add a workflow

Wow… I did that PR to create 1 workflow on the in-dev branch… Now, I lost my brain…

Hey @Yagi-404, can you review?


Update CHANGELOG.md

Included the changes I made to our Report as well as README file given the issues are I was assigned. Added changes related to the Report Summary, Introduction, and Methods section, as well as the updated ABOUT section in the README. Addressing issues of them being to vague and not enough reasoning originally.

NIce! Greatly enhanced the overall understanding and quality of our documentation


autocomplete - no indication for optional properties

Hi guys,
i have created a basic interface with 3 properties, one of them is optional.
interface IClass1Params {
    name: string;
    phoneNumber: number;
    description?: string;
}

when i'm trying to create a new instance that implement the interface, i'm using the autocomplete as my guideline, but i have no indication which property is mandatory or optional..

as a result i need to check the interface explicitly by going to the definition and observe the structure
it's a little pain..
thanks,
Elior

Sample:
interface IClass1Params {
    name?: string;
    phoneNumber: number;
}
var foo:IClass1Params = {
    /*here*/
}


Failing to connect dl.elv.sh

~ $ curl -v https://dl.elv.sh/linux-amd64/elvish-HEAD.tar.gz
*   Trying <IP_ADDRESS>:443...
* Connected to dl.elv.sh (<IP_ADDRESS>) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 444 certificates in /run/current-system/profile/etc/ssl/certs
* GnuTLS ciphers: NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509:-VERS-SSL3.0
* ALPN: offers h2
* ALPN: offers http/1.1
* gnutls_handshake() failed: Internal error
* Closing connection 0
curl: (35) gnutls_handshake() failed: Internal error

Firefox: SSL_ERROR_INTERNAL_ERROR_ALERT
Chromium: ERR_SSL_PROTOCOL_ERROR

#1558

Works for me both using curl and my browser. However, my system connected to <IP_ADDRESS> which is a swc.cloud server. Whereas host <IP_ADDRESS> reports a NXDOMAIN error which makes sense since it is a private address. So apparently you're going though a local proxy that is causing problems.

@krader1961 Thank you!


Update scala-library to 2.12.14

Updates org.scala-lang:scala-library from 2.12.13 to 2.12.14.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (2.12.13).
You might want to review and update them manually.
.github/workflows/mdoc.yml

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-lang", artifactId = "scala-library" } ]

labels: library-update, semver-patch, old-version-remains

missing compiler plugins

Superseded by #136.


Enhance renderAjax method to control bundles from registering again

Related issue #4522. I will submit a PR with the following enhancements to the renderAjax method.

Add a new parameter to renderAjax method named unsetBundles
The unsetBundles can be a bool or array

if set to false no bundles will be unset.
if set to true all bundles will be unset.
if set to an array, the list of specified bundles will be unset. For example ['yii\web\YiiAsset', 'yii\web\JqueryAsset']

This is important for rendering content via ajax and preventing injection of AssetBundle assets that are already rendered on the main page. However scripts/css registered via registerJs and registerCss will be embedded (and would need to be handled separately).

Prevent js files.
Prevent css files.

This enhancement is specific for AssetBundles only - not for individual JS/CSS files as I mentioned in the last part of my post.

This is important for rendering content via ajax and preventing injection of AssetBundle assets that are already rendered on the main page.

AssetBundles are injected with the ajax always, true. But then Yii 2 filters it (see my last message).
With this you are just saving a few bytes - avoiding lines in the ajax response.

But then Yii 2 filters it (see my last message).
It does not filter assets loaded by AssetBundle in renderAjax method - as tested and seen on the DOM.

Try to test an ActiveForm first loaded in a div on normal load. Then try to load the same form in the same div on click of a button via renderAjax.
You should see the following scripts getting loaded below the activeform again:

yii\web\YiiAsset',
yii\web\JqueryAsset
yii\widgets\ActiveFormAsset
yii\validators\ValidationAsset

@kartik-v it does: https://github.com/yiisoft/yii2/blob/master/framework/assets/yii.js#L262
Please re-check it with 2.0.2 release code or master.

@samdark will check and test in case I do not have the latest version.

@samdark will check and test in case I do not have the latest version.
Still, I would suggest doing it from PHP before the JS, would be a faster option.

Faster — maybe (I doubt it), more reliable — nope since JS could be loaded inside of other JS, by directly inserting <script tag etc.

You can try directly unsetting the unneeded bundles at the end of the ajax view.

@qiangxue - yes that would work but needs to be done for every view file rendered via ajax. Easier to set the renderAjax method with one additional param from the controller - especially if one wants to selectively unset bundles.

You may also do this: Yii::$app->assetManager->bundles['xyz'] = false. I don't quite like introducing Controller::validateBundles() as it seems irrelevant to a controller.

There are following approaches currently to do this from PHP:

Manually unset bundles in the view or view layout. However when using a view layout, it seems using the render method works better than renderAjax due to some reason (the layout file has to be trimmed of the other content).
Edit the assetManager as shown.
Use the code I have in the PR and reuse it across the actions in a Controller.

Will check if there is anything better on this.
The JS initScriptFilter is useful. But currently, the only issues with this are:

You are rendering the script files and then unsetting from JS
You are depending on yii.js to be loaded (should be true for most scenarios - but what if not).

I don't quite like introducing Controller::validateBundles() as it seems irrelevant to a controller.

@qiangxue this could be a static method that could be embedded in the View class as well.

The JS initScriptFilter is useful. But currently, the only issues with this are:

You are rendering the script files and then unsetting from JS
You are depending on yii.js to be loaded (should be true for most scenarios - but what if not).

You actually don't render the js files.
Well, if you are returning html code and not only data, perhaps you are using pjax. Pjax has it's own way of handling it.

You may actually be saving a lot of bytes depending on the size of the assets in the asset bundle.

@kartik-v This can be true. But maybe this is too specific and could add unnecessary ~complexity~.
Not sure about this, but in a scenario where AssetBundle add  'new files' to the 'layout' in response to an ajax response, you may need the $depends in order to it properly work (when a user goes directly to the page).

Removing Asset Bundles after they have been registered does not sound as a correct way to solve the issue. It is better to prevent thier registration instead of doing double work: first register bundles, then unregister them.
The most simplest way to achieve this is set AssetManager::bundles[$name] = false.
This can be easy done inside the view file:
<?php
/* @var $this yii\web\View */
if (Yii::$app->request->isAjax) {
    Yii::$app->assetManager->bundles['yii'] = false;
}
?>
...

Another possible solution is introduction of pair of methods in the yii\web\View, which will disable/enable bundle registration for the view:
<?php
/* @var $this yii\web\View */
?>

some content

<?php $this->disableBundleRegistration() ?>
some code with widgets here
<?php $this->enableBundleRegistration() ?>

rest content

But I am usure it is better, then my previous comment.

@klimov-paul both approaches look good.
I still feel whatever approach we take... the final enhancement is needed within the Controller::renderAjax method - for this to be beneficial. This is because the choice of how to render the view file with what AssetBundle for an ajax render... can be controlled centrally from the controller action - rather than calling such methods in each view file. This may help reduce lines of code probably as well as improve and ease maintenance of code significantly for those who wish to use this feature.

I don't understand why it should be setup at controller action.
Asset Bundle belongs to the 'view' layer and should be handled there.
I don't think we can easy wrap this into some method, because the issue is not trivial.
While rendering some view via renderAjax() it is actually unknown which Asset Bundles should be registered and which are not.
If you render some area, which contains JUI widget, via AJAX, you want to disable 'jQuery' bundle to be loaded, but 'JUI' bundle should be registered. Still if you rerender it second time both those bundles shuld be excluded.
Such things are better to be handled at the client side, because only there you actually know which files are already loaded and which are not. At the server side there could not be elegant solution anyhow.

I don't understand why it should be setup at controller action.

The use case is when one wants to use the renderAjax method and it is part of the Controller method currently.
Currently there is no way I can control the AssetBundles registered via renderAjax
The proposed approach to skip bundles is ONLY BY updating within the view  object

Where the above is tedious and difficult to maintain:

a page which has several sections rendered using a single Controller Action using various AssetBundles but different view files... e.g. tabs, menu sections, master-detail sections etc.
the above content will need to use a normal render on init
will need to use renderAjax for refreshing via ajax

Most validation of such control is done within a single Controller Action and using renderAjax method to play with different view files.

@llfm  @samdark  https://github.com/yiisoft/yii2/blob/master/framework/assets/yii.js#L262
I am using Yii 2.0.4 and every default Yii asset bundle are loaded with the ajax form

My only concern is double js scripts may cause conflicts which I havent seen yet. I would be nice that Yii 2 should not loaded those bundles if it is an ajax request because those bundles have been loaded by main page.

Hi,
our problem is some of clients are using yii2 developed site over proxy (mobile internet) which has a compression feature. So all the js, css files are automaticaly included into tha main dom (caching speeding up the sites.) The only problem that js, css cannot removed after ajax call. Site is broken after an ajax call.
do you have a method how should we use yii2?

Fixed in 2.0.7 by query filtering.
Please, update your framework version

How is it fixed? I'm using the latest version (2.0.10-dev) and I still see all assets included again with renderAjax() which sometimes causes conflicts.

This will be filtered out with a javascript on client side. So if your code is modified by a proxy (scripts included automatically into the html - not any more tags) than the javascript cannot filter it out any more.
our sollution was inserting a code into the main controller.
public function init() {
    try{
        Yii::$app->response->headers->set('Cache-Control','no-transform');
    } catch(Exception $e) {}
}

@papppeter I think this is a different problem, I don't use proxy at all. The problem is that when I use renderAjax() the assets registered (for example jquery, bootstrap, etc) are going to get registered (inserted into the DOM) again, see the image uploaded by @duynguyen0511

@pappfer ajax render sends the same amount of js as the normal renderer would. Just on client side there is a filter js function which filters the allready registered js out. On our case a proxy (mobile internet, etc) modified the output so yii2 js could not remove scripts and it was insereted into the DOM.

I am not sure what the status of this issue is, but I have a custom bootstrap implementation and I use a PJAX request to return a form which uses the Bootstrap  activeform implementation. Additionally, i use the asset compression tools built into the framework. When I run my site in Dev mode...the PJAX request returns the bootstrap css as being required even though it is already loaded by the main page, which isn't a huge amount of overhead. However when I run the site in production and my minified CSS file which contains all the CSS for the site is called on the PJAX request...that is a little expensive. It only does it once, but I'm wondering whether it should at all given it is already loaded. Additionally, the browser doesn't even cache the file because of the cache settings in the request. Is there a solution to this or a strategy to overcome the limitation?

@Ariestattoo sounds like your setup with compressed assets is not correct.

@cebe Anything jump out at you?
<?php
/**
* Configuration file for the "yii asset" console command.
*/
    // In the console environment, some path aliases may not exist. Please define these:
     Yii::setAlias('@webroot', __DIR__ . '/../web');
     Yii::setAlias('@web', '/');

    return [
        // Adjust command/callback for JavaScript files compressing:
        //'jsCompressor' => 'java -jar  /usr/local/bin g/yui-compressor/yui-compressor.jar --type js {from} -o {to}',
        'jsCompressor' => 'java -jar /home/steve/Apps/closure.jar --js {from} --js_output_file {to}',
        // Adjust command/callback for CSS files compressing:
        'cssCompressor' => 'java -jar /usr/share/yui-compressor/yui-compressor.jar --type css {from} -o {to}',
        // Whether to delete asset source after compression:
        'deleteSource' => false,
        // The list of asset bundles to compress:
        'bundles' => [
             'frontend\assets\AppAsset',
             'yii\web\YiiAsset',
             'yii\web\JqueryAsset',
             'frontend\assets\CroppieAsset',
             'yii\bootstrap\BootstrapPluginAsset',
             'yii\widgets\ActiveFormAsset',
             'yii\validators\ValidationAsset',
             'yii\bootstrap\BootstrapAsset',
             'yii\widgets\PjaxAsset',

             'frontend\assets\JquerySortableAsset',
             'frontend\assets\ProfileFormAsset',
             'frontend\assets\FontAwesomeAsset',
             'frontend\assets\RotaryProgressAsset',
             'frontend\assets\SearchAsset',
             'frontend\assets\SlickAsset',
             'frontend\assets\SliderAsset',
             'frontend\assets\TouchPunchAsset',
             'frontend\assets\UploadAsset',
             'frontend\assets\WowAsset'
        ],
        // Asset bundle for compression output:
        'targets' => [
            'all' => [
                'class' => 'yii\web\AssetBundle',
                'basePath' => '@webroot',
                'baseUrl' => '@cdn',
                'js' => 'js/all-{hash}.js',
                'css' => 'css/all-{hash}.css',
            ],
        ],
        // Asset manager configuration:
        'assetManager' => [
            'basePath' => '@webroot/assets',
            'baseUrl' => '@web/assets',
            'bundles' => [
                'yii\bootstrap\BootstrapAsset' => [
                    'css' => [
                        'bootstrap.css' => '../../css/bootstrap.css'
                    ]
                ]
            ]
        ],
    ];

I'm sorry to comment again in a closed issue after a long time but this is still not working for me. I'm using the latest version of the framework.
I have a lot of scripts in my site and when I include a div using renderAjax() and it will register the same scripts again.
In the screenshot you may see that Bootstrap hasn't been registered again and it is because I manually deregistered it using Yii::$app->assetManager->bundles['yii\bootstrap\BootstrapAsset'] = false;.

Anyway, even if it would work for me, is it a good solution to remove these scripts from the client side? Does that mean that the browser downloads those scripts again and they just get removed from the DOM?
@papppeter Thank you, it makes sense now, however it wasn't the case for me. I tried it but it didn't work for me.
@kartik-v Are you happy with the provided solution? Actually I'm using your yii2-grid's ExpandRowColumn to include the content using renderAjax() and all scripts gets registered again.

I had a bit of a look into the code of yii.js, specifically the initAssetFilters function and seems css tags actually get removed from the dom. However, js work differently - they get included in the dom, however when the browser tries to 're-request' that js, it aborts and the javascript should never get reloaded. If you try this with a simple script with say, alert("Hello World"); you'll see it only gets called once even though it is shown in the dom twice.
Ideally, maybe yii.js should also remove duplicate <script> tags in the dom just to keep it clean (even though it doesn't appear to affect anything functionally).

Ideally, maybe yii.js should also remove duplicate

I meant when there are 2 or more script tags that are the same (ie. one already exists in the dom like in the picture above, there are 2 x jquery.js and others). Are you saying they need to be duplicated to make the new content work? If that's true, makes sense..

I have same problem, but ...
if i set
assetManager->appendTimestamp = true
and use
controller->renderAjax()
the jquery.js reload again
it think the initAssetFilters() dont recognized the timestamp variable

Q
A

Yii version
<IP_ADDRESS>

PHP version
5.6.27 (Homebrew)

Operating system
Mac OSX 10.11.6


Bucket IAM Binding input docs misaligned

What happened?
The input descriptions of the IAM binding resource are wrong - looks like a bunch of docs from the members input is in the bucket input and the members input description is empty.
Example
https://www.pulumi.com/registry/packages/gcp/api-docs/storage/bucketiambinding/#bucket_yaml
Output of pulumi about
.
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

I am fairly certain that this happened because the heading for member is member/members which won't produce a match in docs discovery.
This is probably worth a patch on our end if it's a prominent resource, but not something that should be categorically addressed. I'll push a patch and see if that addresses it.

Same issue for DNS IAM Binding: https://www.pulumi.com/registry/packages/gcp/api-docs/dns/dnsmanagedzoneiambinding/
There's a handful of others. Might be worth making a docs edit rule.


Menu bar

@javierarce could you take a look?

Except for my suggestion, the rest is :+1:
Once it's fixed, :shipit: so I can use it :)


Problem when inserting a string P.K value in master detail entity.

I am using a string primary key, and I create master detail entity but when inserting the child entity the primary key value is set to null and neglect its default value which appears in the detail grid .
also I trace all code and the P.K value is not null but at somewhere this value is set to null.
please advice

Don't use a default value for the foreign key field of the detail rows, the MasterDetailRelation will take care of that anyway.

I set a default value for the primary key not for the F.K because I am using P.K of type string not int,so I need to set the P.K value before inserting the detail record.

Ah ok, then you should try to override getIdProperty() in your ...GridEditor.ts class (the one based on GridEditorBase)

already overridden and return the right value.
protected getIdProperty() { return xxxxRow.idProperty; }

Ok I just checked MasterDetailRelationBehavior.cs
Seems not to be supported. In SaveDetail(), an empty PK is used as a flag for an new detail row. Would never work if the PK is already set in the client.
I see two solution: Create your own Behavoir, or set the PK of the detail rows on database level (i.e. insert trigger)

Thanks for your time & fast response.
I will do the second solution.

Close the issue?


Flag repo open for contribution

add a CONTRIBUTING.md file
https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors
https://fastapi.tiangolo.com/contributing/

https://blog.codacy.com/best-practices-to-manage-an-open-source-project/
https://github.blog/2012-09-17-contributing-guidelines/

https://makeapullrequest.com/


runtime-dom.esm-bundler.js 不安全问题

Vue version
3.3.4
Link to minimal reproduction
runtime-dom.esm-bundler.js
Steps to reproduce
runtime-dom.esm-bundler.js
1430 line
container.innerHTML = "";
What is expected?
while (container.firstChild) {
container.removeChild(container.firstChild);
}
What is actually happening?
Uncaught TypeError: Failed to set the 'innerHTML' property on 'Element': This document requires 'TrustedHTML' assignment.
This document requires 'TrustedHTML' assignment.
System Info
No response
Any additional comments?
No response

Link to minimal reproduction
runtime-dom.esm-bundler.js

This is no reproduction.

please provide a runnable reproduction next time.


[WIP] Titan blob GC by merge

tikv/titan#121
What have you changed?
Please explain in detail what the changes are in this PR and why they are needed:

Summarize your change
How does this PR work? Include a brief introduction for any changed logic (optional)
Separately describe each logical change (optional)
Describe any limitations of the current code (optional)

Don't assume reviewers understand the original issue.
What is the type of the changes?

New feature (a change which adds functionality)
Improvement (a change which is an improvement to an existing feature)
Bugfix (a change which fixes an issue)
Engineering (engineering change which doesn't change any feature or fix any issue)
Misc (other changes)

How is the PR tested?

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Does this PR affect documentation (docs) or should it be mentioned in the release notes?

Does this PR affect tidb-ansible?

Refer to a related PR or issue link (optional)
Benchmark result if necessary (optional)
Any examples? (optional)

/bench
workload:
  threads: 512

/bench

/run-all-test

@sre-bot /run-all-test

/run-all-tests

@sre-bot /run-all-tests

@sre-bot /bench

@sre-bot /release make dist_release

@sre-bot /release

@sre-bot /run-integration-test

@sre-bot /run-integration-tests

@sre-bot /bench

@sre-bot /bench
workload:
  threads: 1024

@sre-bot /bench
workload:
  threads: 512


prepending a hostname to the name option of file loader breaks compilation

Bug report

What is the current behavior?
build compilation does not work :
 λ npm run build

><EMAIL_ADDRESS>build C:\Users\cypri\projets\typescript-sass-modules-boilerplate
> node scripts/build.js

Creating an optimized production build...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
ts-loader: Using<EMAIL_ADDRESS>and C:\Users\cypri\projets\typescript-sass-modules-boilerplate\tsconfig.json
No valid rules have been specified

stuck here.
If the current behavior is a bug, please provide the steps to reproduce.
add a file loader to a webpack.config.prod.js like following:
 {             loader: require.resolve('file-loader'),             exclude: [/\.js$/, /\.html$/, /\.json$/],             options: { 		    name: 'http://test-vad/build/static/media/[name].[hash:8].[ext]',             },           },

What is the expected behavior?
build works, hostname prepended to files urls

I can provide an example repo tomorrow
Other relevant information:
webpack version:  3.8.1
Node.js version: 8.11.2
Operating System: win10
Additional tools:

issue resolved by setting PUBLIC_URL to .env


How can I have 'sticky' on left and 'scrolling' on right

Hi developer,
I wonder if there is an easy way to change the sides of 'scrolling' and 'sticky' element in the "sticky-side" layout (https://russellgoldenberg.github.io/scrollama/sticky-side/).

you can re-order the dom elements, so put the figure before the article tag and it will swap them!


Q: is it possible to initialize with items in the command history ?

i'm thinking about using this in a software prototype. wondering if i can initialize with items in command history so that user can simply use up-arrow to find previous commands thus won't have to type, avoiding mistakes / interrupting flow of testing.
thanks, dmc
ps, super cool project !

Hey! This is actually something I wanted to implement a while ago, very simple change. It should be released in 1.5.0 in a couple of minutes.

this is amazing ! thank you very much.


nuxt swiper to be server side render as before

Describe the feature
https://nuxt.com/modules/swiper
i have issue with it i can't use in server side only in clintonly tag i swith to older version of it it was perfect but when try to download older version of it make issus with code and not working at all
Additional information

[x] Would you be willing to help implement this feature?
[x] Could this feature be implemented as a module?

Final checks

[x] Read the contribution guide.
[x] Check existing discussions and issues.

Hi,
this is the framework repository, which has little to do with the swiper module. You report it in the repo of the module - https://github.com/cpreston321/nuxt-swiper
Also, please include a reproduction with the actual error messages you're getting.


Add benchmarking code

I'd like to have benchmarking code here for at least the following 3 cases

PMU cycles for platforms
PERF performance for systems where access to the PMU cycles counters is not possible, but perf is compiled into the Kernel.
APPLE  for Apple Mx cores based on https://gist.github.com/dougallj/5bafb113492047c865c0c8cfbc930155#file-m1_robsize-c-L390

https://github.com/slothy-optimizer/pqax has all that and is licensed under MIT which means we can take some of that code.
Am I missing something?
At some point it would be nice to have automatic benchmarking on a number of platforms at some point.

Good idea. Github Action supports Apple M series just recently. Other CPUs are run under QEMU.
Other than Apple M series, Circle CI and Github Action don't specify the actual CPU, my quick 5-min search show the options are: armv7 or aarch64.
I would vote for the Apple counter, and PERF for other ARM CPUs so it's can be as generic as possible.

I doubt that we can benchmark on the Github runners. But we can host our own runners eventually.
I wasn't aware of the M1-based runners. Testing on those would be nice. It looks like they are not free to run, right? Maybe we keep that in mind, but first having qemu-based testing is sufficient I think.

Let's separate the issue of provisioning the benchmarking code from provisioning benchmarking automation / CI.

Completed in #81


Correct Erroring Default Variable Assignments on Systems with unique file paths

🗣 Description

Make  DefaultOutPath work on UNC file systems.
Add a try catch to the DefaultOPAPath assignment.

💭 Motivation and context

Closes #1315
Closes #1369
🧪 Testing

Try to run Import-Module .\PowerShell\ScubaGear on a non-Windows system.
Try to run  Import-Module .\PowerShell\ScubaGear on system using UNC file paths.

✅ Pre-approval checklist

[x] This PR has an informative and human-readable title.
[x] PR targets the correct parent branch (e.g., main or release-name) for merge.
[x] Changes are limited to a ~single~ related goals ;) - eschew scope creep!
[x] Changes are sized such that they do not touch excessive number of files.
[x] These code changes follow the ScubaGear content style guide.
[x] Related issues these changes resolve are linked preferably via closing keywords.
[x] All relevant type-of-change labels added.
[x] All relevant project fields are set.
[x] All relevant repo and/or project documentation updated to reflect these changes.
[x] All relevant functional tests passed.
[x] All automated checks (e.g., linting, static analysis, unit/smoke tests) passed.

✅ Pre-merge checklist

[ ] PR passed smoke test check.

[ ] Feature branch has been rebased against changes from parent branch, as needed
Use Rebase branch button below or use this reference to rebase from the command line.

[ ] Resolved all merge conflicts on branch

[ ] Notified merge coordinator that PR is ready for merge via comment mention

✅ Post-merge checklist

[ ] Feature branch deleted after merge to clean up repository.
[ ] Verified that all checks pass on parent branch (e.g., main or release-name) after merge.

I tested this successfully on a Mac. Worked after manually installing the executable.

I tested on a windows system using UNC paths. No errors.