ci: Release automation

Closes: https://github.com/distribution/distribution/issues/4025
This PR adds automation for generating release as described in https://github.com/distribution/distribution/issues/4025. Semantic Release is set to run monthly (initially), or when it is manually trigger. I'm still testing out the release automation and how it will behave exactly on my fork. One thing that needs to be figured out is if and how a scheduled workflow can target multiple branches.

I think we should start with "on tag".
How do rc/beta releases work?

Semantic release is the one that creates the tag (and GitHub release). It is possible to have semantic release create a tag, and then have the build be triggered by that. However, this can leave broken release where the release is created but the images aren't pushed (although I'm not sure how the release artifacts would work here).
I'd appreciate if you can also have a look at https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration. That describes how rc/beta releases work and can be configured. I'm still in the process of figuring out what the best setup for this will be and appreciate any help and input.

Right, I guess by "on tag" I really meant I don't think we should start with an automatic monthly release. We should be building main into :edge/:main, and be able to trigger 3.0.0-rc1 manually. When we get to a stable state we could consider monthly.

Looking at the doc, I guess we would need to cut the 3.x branch and use:
"branches": [{name: "release/3.0", range: "3.0.x", prerelease: "beta"}]

Playing with it all in your org might be best for now. I guess you can manually trigger the release action in the GitHub UI?

The v3 release (and the default release branch) will be main. For maintenance release we can create new branches off of tags as needed. I'm just not sure how that will work with pre-releases in a more dynamic way. However, I do think we'll likely only need alpha, beta and rc for major versions so it shouldn't come up very often. Major versions are also kind of covered by next and/or next-major. So I guess creating the v4.0.0-alpha.1 release would be done by merging the next or next-major branch into the alpha branch.
I've just started playing with creating an alpha, beta, and rc branch and seeing how the releases go for that.
The workflow can be manually triggered from the GitHub UI:

Why wouldn't we make a 3.0 release branch? Isn't that where we would want fixes/patches?
3.1 would be for features, so after 3.0 is released, main would become 3.1.

We don't need to create a release branch until we have a reason to backport something. For example:

v3.0.0 is released from main
a fix is pushed to main releasing v3.0.1
a new feature is pushed to main releasing v3.1.0

Now a CVE is discovered that we want to backport to v3.0.x users

A fix for the CVE is pushed to main releasing v3.1.1
We create the v3.0.x branch from the v3.0.1 tag
The fix is pushed to the v3.0.x branch releasing v3.0.2

So we don't need to pre-create release branches for backporting fixes, they can get created once they are needed. I think that will also make the Git tree more understandable.

OK, I can see how that would work.
We should decide what level of patching we support. Will we support 3.0.x after 3.1.0 is released?

If we adhere to proper SemVer I don't think that would be necessary, since a minor version only includes new features. We might still want to support patch fixes for whatever reason, since the release automation is setup to be able to.

Is there a pr gate that stops a FEAT going into a patch branch?

Isn't it too late once the commit is in the branch, unless we start to allow force push to remove it?

Good point. Need to check how you deal with that exactly. I do remember reading about that in the semantic release docs somewhere.

I guess something like dry-run for prs? https://semantic-release.gitbook.io/semantic-release/usage/configuration#dryrun

I'm already using dry-run in the release so we can get the version to build the artifacts with, then they get built, and afterwards it runs without dry-run. However, it might be a good idea to run semantic release dry-run on PRs to catch bad merges into branches. I'll need to test and see what it does exactly with a bad commit in a PR.
Also, this seems like it might have some interesting info in it. https://shinesolutions.com/2021/07/21/learning-to-use-semantic-release-the-hard-way/

@milosgajdos @Jamstah @thaJeztah @wy65701436 @deleteriousEffect What needs to be done to get this over the line?


Fixed "condtion_type" to "condition_type"

Description:
Fixed "condtion_type" to "condition_type"

Hi @rsnodgrass,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

This also needs updating inside lokalise.


Consolidate/refactor code from notebooks to package

Some notebooks contain duplicate code, or code that might be useful in the scope of the package. This could should be refactored into the package.

Closed by #25 #28


Update dependencies - 7thMay

Purpose
Related to #417
Updated the dependencies, uploaded a document and then asked a question on it.

This will clear all the outstanding dependabot issues - but will be merged after #798

LGTM.
out of curiosity, can dependabot update these dependencies too ?

It could; but until we have test coverage of everything, I like to check these manually


Event detail smallfix

before
after

(I had to update the gemfile lock at the same time because the code was out of sync with the versions listed.)

plz merge if you like my changes

:+1:


How to disable GraphQL Introspection in Strawberry-graphql?

I have tried the following to achieve it, but didn't get success.
graphql_app = GraphQL(schema, graphiql=False, debug=False)
I am using Fastapi. Maybe in other framework syntax will be different.
It is related to the security concern and must be taken in high preference.
Thank you.

GraphQL-Core already has a no introspection validation rule: https://github.com/graphql-python/graphql-core/blob/v3.1.6/src/graphql/validation/rules/custom/no_schema_introspection.py
So using the AddValidationRule extension you can disable introspection like this:
from graphql.validation import NoSchemaIntrospectionCustomRule
import strawberry
from strawberry.extensions import AddValidationRules

schema = strawberry.Schema(
	Query,
	extensions=[
		AddValidationRules([NoSchemaIntrospectionCustomRule]),
	]
)

I think we should probably package this up into a DisableIntrospection extension so it's easier to find.

@jkimbo we have documented this in our docs https://strawberry.rocks/docs/extensions/add-validation-rules#more-examples

@jkimbo we have documented this in our docs https://strawberry.rocks/docs/extensions/add-validation-rules#more-examples

@patrick91 that's true but do you think it warrants a dedicated extension?

definitely 😊 that should also make it easier to find it

Is it possible to make introspection only possible for clients that are, e.g., authenticated?

@mecampbellsoup you should be able to access the schema context inside the on_validation_start() hook where you can also set what validation rules to run. For example using the Django integration (I haven't tested this):
from strawberry.extensions.base_extension import Extension
from graphql.validation import NoSchemaIntrospectionCustomRule

class DisableAnonymousIntrospection(Extension):
	def on_validation_start(self) -> None:
		schema_context = self.exection_context.context
		request = schema_context.request

		if not request.user.is_authenticated:
			self.execution_context.validation_rules = (
				self.execution_context.validation_rules + tuple([NoSchemaIntrospectionCustomRule])
			)


Failed to install livekit on ARMv8 processor

I encountered an error installing the livekit python SDK. ($ pip install livekit)
Does rust-sdks not support ARMv8 processors?

reference issue: https://github.com/livekit/python-sdks/issues/153

refer the issue: https://github.com/livekit/python-sdks/issues/153


add missing default regions

Which problem is this PR solving?

closes #91

Short description of the changes

Add ap-southeast-3 and ap-northeast-3 to list of regions to publish. Note they are added to REGIONS_NO_ARCH as they only support x86_64 and not arm64.

Can this be moved to done as we manually uploaded these layers to the regions added to the publish script?


Add raspberry pi3 cluster

Signed-off-by: Taras Drozdovskyi<EMAIL_ADDRESS>Description
While working from home (only one PC), I built a cluster of Raspberry Pi 3 - 4pcs and use it for testing. The LF Edge community also uses such clusters and it may be interesting for external developers.
I made a description of how you can start the edge-orchestration on a cluster.

Type of change

[x] Documentation update

How Has This Been Tested?
Follow the Raspberry Pi3 cluster guide!
Test Configuration:

Firmware version: Ubuntu 18.04 and latest Rasbian OS
Hardware: x86-64, ARM
Toolchain: (e.g., Docker and Go versions)
Edge Orchestration Release: Coconut

Checklist:

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

LGTM. Its good to have the cluster support. Was thinking should we think of a use case using cluster and make a PoC.

Please explain what you mean. I have been using the cluster for testing for two months now. Or do you mean prepare some with using a cluster?

LGTM. Its good to have the cluster support. Was thinking should we think of a use case using cluster and make a PoC.

Please explain what you mean. I have been using the cluster for testing for two months now. Or do you mean prepare some with using a cluster?

Ya I mean to say can we think of some use case using cluster. Something like one R Pi detecting user and another doing a match with predefined patterns and the third making a decision(like send command to smart lock to unlock). Just a thought for making some blueprints of Home Edge.

LGTM. Its good to have the cluster support. Was thinking should we think of a use case using cluster and make a PoC.

Please explain what you mean. I have been using the cluster for testing for two months now. Or do you mean prepare some with using a cluster?

Ya I mean to say can we think of some use case using cluster. Something like one R Pi detecting user and another doing a match with predefined patterns and the third making a decision(like send command to smart lock to unlock). Just a thought for making some blueprints of Home Edge.

I completely agree with you. A living example of use will only benefit. And I will think about it.


[Feat]: Provide linux-arm64 binary in GitHub Releases

Is your feature request related to a problem? Please describe.
We use the self-hosted runners of arm64 architecture in GitHub Actions. Currently, this project does not provide linux-arm64 binary.
Describe the solution you'd like
It would be nice if linux-arm64 binary is provided.
Thanks.

@int128 Thank you for your request and sorry for our late response. We're going to handle it in a couple of weeks.

Since the latest release <IP_ADDRESS>, we started to provide linux-arm64 binary. Please try it.
I'm closing this issue.

Since MagicPod 1.3.0, you can download magicpod-api-client linux arm64 binary by Web API.
Please try the following commands.
export MAGICPOD_API_TOKEN=[YOUR_API_TOKEN]
export FILE_NAME=magicpod-api-client
curl -L "https://app.magicpod.com/api/v1.0/magicpod-clients/api/linux_arm64/latest/" -H "Authorization: Token ${MAGICPOD_API_TOKEN}" --output ${FILE_NAME}.zip

@nkns165 I confirmed the new release works in our arm64 runner. Thanks a lot!
jobs:
  run-magic-pod:
    runs-on: my-arm64-runner
    steps:
      - run: |
          curl -L "https://app.magicpod.com/api/v1.0/magicpod-clients/api/linux_arm64/latest/" -H "Authorization: Token ${MAGICPOD_API_TOKEN}" --output magicpod-api-client.zip
          unzip -q magicpod-api-client.zip
        env:
          MAGICPOD_API_TOKEN: ${{ secrets.MAGICPOD_API_TOKEN }}
      - run: ./magicpod-api-client batch-run --help


NACM read response with no read permit

Hello.
I am using netopeer2 v2.1.36.
I configured read/write/exec permission with deny as default, and I did not configure permit action in rule list for specific test yang.
edit-config and user-rpc returned access-denied error while trying to access this test yang. This access-denied error is expected and correct.
However, get returned rpc-reply with no data. According to M-Plane specification, netopeer2-server replies access-denied error for get rpc just like edit-config and user-rpc. Is this expected behavior?
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
  <enable-nacm>true</enable-nacm>
  <read-default>deny</read-default>
  <write-default>deny</write-default>
  <exec-default>deny</exec-default>
  <enable-external-groups>false</enable-external-groups>
  <groups>
    <group>
      <name>usergroup</name>
      <user-name>username</user-name>
    </group>
  </groups>

[edit-config]
ERROR
	type:     protocol
	tag:      access-denied
	severity: error
	path:   xxxxxx
	message:  Executing the operation is denied because "username" NACM authorization failed.

[user-rpc]
ERROR
	type:     protocol
	tag:      access-denied
	severity: error
	path:     xxxxx
	message:  Executing the operation is denied because "username" NACM authorization failed.

[get]
DATA
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"/>

Thanks.
James

According to M-Plane specification...

Well, netopeer2 is compliant with the standardized specification in RFC 8341 and behaves accordingly.


v2.1.0 not on NPM

v2.1.0 is not updated on npm.
Sorry if this is just part of the release flow - just thought I'd report.

hey @simon-am, thanks for creating the issue. We'll push this asap on NPM, just dealing with a little pain regarding NPM accounts.

please, quickly 😛

It's here 🎉  ! https://www.npmjs.com/package/gulp-mjml


Reassessment of stimulation as schema, in techniques, and in protocols/behavioral protocols

This issue is related to the discussion that started in controlledTerms PR 293
Issue: we need a cleaner solution between stimulation as technique, stimulation concepts and stimulation as in-depth schema to describe exactly how a stimulation was applied.
The following lists represent the current status of stimulation and its occurrences in openMINDS:
Stimulation Techniques in openMINDS:
• current step stimulation
• checkerboard visual stimulation
• drifting grating visual stimulation
• electrical stimulation
• figure-ground visual stimulation
• Gestalt visual stimulation
• microstimulation
• natural image visual stimulation
• natural sound auditory stimulation
• optogenetic stimulation
• photon stimulation
• single pulse electrical stimulation
• static grating visual stimulation
• transcranial magnetic stimulation
• whisker stimulation
Behavioral protocol schema:
• described in (→ DOI/File/URL)
• description
• name
• internal identifier
• stimulation (→ Stimulation)
Protocol schema:
• description
• name
• stimulation (→ Stimulation)
• technique (→ Technique)
Stimulation schema:
• description
• lookup label
• stimulation approach (→ StimulationApproach)
• stimulus type (→ StimulusType)
• custom property set (→ CustomPropertySet)
• data location (→ File/FileBundle)
StimulationApproaches in openMINDS:
• auditory stimulation
• gustatory stimulation
• interoceptive stimulation
• olfactory stimulation
• tactile stimulation
• visual stimulation
StimulusType in openMINDS:
• direct current
• moving checkerboard
• moving grating
• moving symbol
• natural movie
• natural scene
• static checkerboard
• static grating
• static symbol
• textured surface
• vibrating object
• vibrating surface

@Peyman-N and @apdavison please have a look at this issue and the idea below for our discussion on stimuli and stimulations:
@UlrikeS91 and I discussed this issue briefly and ended with the following idea:

We extract the stimulation techniques out of the Technique terminology and collect them separately in StimulationTechnique (new terminology).
The names/labels of these StimulationTechnique terms will always combine from stimulus type and stimulus approach (e.g., current step stimulation electrical stimulation, checkerboard visual stimulation). Generic approaches can be covered here as well (e.g., electrical stimulation, visual stimulation).
We delete the Stimulation schema from core and remove also it linkage from BehavioralProtocol and Protocol. Instead we link from BehavioralProtocol and Protocol just to the new StimulationTechnique.
In the openMINDS_stimulation extension we should have at least one stimulation activity per stimulation approach (AuditoryStimulation, GustatoryStimulation, InteroceptiveStimulation, OlfactoryStimulation, TactileStimulation, VisualStimulation). These stimulation activities can be extended from a generic Stimulation schema.
I would assume that the generic Stimulation schema inherits from the Activity schema (or ExperimentalActivity schema).
In addition we should think about schemas that in in-depth describe the parameters of the different stimuli (e.g., checkerboard stimulus schema that defines if it is moving or static, how many number of rows and columns, etc).

NOTE: the extension does not have to include all at once. We can start with the use cases we have. Also, please take the idea really as idea we can use to discuss further.

@tgbugs please feel free to comment as well in this issue

results of further discussion:

make stimulus type a category and split terminologies up according to stimulus approaches

prominent issue with electrical stimulations:

each stimulus may be generated by a different device
each stimulus is delivered through a electrode contact and not the electrode / electrode array device

Note : specifically the last point is not solved consistently yet. Schema model needs further discussion for this.

use cases for pure electrical stimulations that may help the discussion:
A) Single Electrode; one Cell; one Stimulus repeated 100 times
B) Single Electrode; one Cell; three Stimuli; each repeated 100 times; composition conditions: random (with or without delay between stimuli) OR alternating (with stimulus block of 2; with or without delay between stimuli, and/or with or without delay between stimulus blocks)
C) Electrode Array (electrode/contact X is stimulated); cell population; one Stimulus repeated 100 times
D) Electrode Array (electrode/contact X is stimulated); cell population; three Stimuli; each repeated 100 times; conditions: random OR alternating (with stimulus block of 2)

note for future extensions, stimulus or stimulation activity potentiality needs a location

Nearly all aspects of this issue were now solved in the openMINDS_stimulation and openMINDS_ephys extension.
@UlrikeS91 let's discuss and coordinate on the TODOs outside of the two extensions.
TODOs for openMINDS_controlledTerms:

separate terminology for StimulationTechnique from Technique
move "electrical stimulation" from Technique to StimulationApproach
add "optical stimulation" to StimulationApproach
split terminology StimulusType into approach specific types (e.g. ElectricalStimulusType)
separate terminology for AnalysisTechnique from Technique

TODOs for openMINDS_core:

change property "stimulation" in BehavioralProtocol and Protocol to link to StimulationTechnique, and StimulationApproach
add property "analysis" to Protocol with link to AnalysisTechnique
update links in "technique" under DSV to all techniques terminologies (Technique, AnalysisTechnique, StimulationTechnique)
delete Stimulation schema from core


I am trying to convert HTML with amcharts 3 graph into PDF.

I have multiple charts using amChart3 and try to conver them into PDF like following.
      const { jsPDF } = window.jspdf;
      const doc = new jsPDF('l', 'pt', 'a4', false);
      doc.html(document.body, {
        callback: function (doc) {
        doc.save();
        },
        x: 10,
        y:
 });

But, I am getting multiple errors like these.
Error loading svg
This page contains the following errors:
error on line 1 at column 167: AttValue: ' expected
Below is a rendering of the page up to the first error.

jsPDF dose not support charts?

here is jsfiddle
https://jsfiddle.net/masaos/w5rv07bt/2/

The heavy-lifting of the html method is done by html2canvas. I assume html2canvas simply does not support SVG.
Since the chart is mostly SVG, you might try the svg2pdf plugin.


Tax - Unable to save valid tax rate amount when changing currency for the first time

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.73-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-internal team
Action Performed:
Precondition:

Workspace has enabled tax rate.
Workspace currency default is tax exempt (0%).
Foreign currency default have different tax rate (non-zero rate).

Go to + > Submit expense.
Enter amount (maintain local currency) > Next.
On confirmation page, click Tax amount.
Change the currency to any foreign currency.
After changing to foreign currency, the tax rate will automatically adjust to the non-zero tax rate (Foreign currency default).
Enter a valid tax amount (now that the rate is no longer 0%).
Save it.

Expected Result:
User will be able to save the tax amount as long as the tax amount falls within the limit of the new rate (Foreign currency default).
Actual Result:
When saving a valid tax amount, error shows up. The maximum rate amount in the error message still follows the previous tax rate (Workspace currency default). User will need to save 0 tax amount and return to Tax amount after saving to save the new tax amount.
Workaround:
Unknown
Platforms:

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

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

Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/ff9c40a2-b457-4ccf-bcb3-7baade482511

View all open jobs on GitHub

@abekkala I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

We think this issue might be related to the #collect project.

Production
https://github.com/Expensify/App/assets/115492554/65d88ea9-fc3d-4803-b9e9-63d91279ebc2

@ShridharGoel's proposal works good. The RCA seems to be correct as well. We are always taking into account the transaction currency rather than the selected currency.
🎀 👀 🎀 C+ reviewed

This one seems to be the offending PR. @MonilBhavsar could you please have a look at this deploy blocker?

ah, sorry @lakchote , it seems you were on it already 🙇
Unassigning myself.

@ShridharGoel feel free to raise a PR whenever you can so we can test it timely and fix the blocker.

ah, sorry @lakchote , it seems you were on it already 🙇 Unassigning myself.

Haha, we were in sync 😄
Decided to go with following the contributor's proposal as we can't really revert the offending PR, and the proposal explains the RCA clearly.

PR merged. Asked for a CP here.

PR CP'd, @lakchote confirmed it's fixed on staging so marking NAB!

I hired your in Upwork @ShridharGoel, I'll check tomorrow to see if I can pay it out.
@allroundexperts - I'll finish up the payment summary once the checklist is done, thanks!

Checklist

https://github.com/Expensify/App/pull/40443
N/A since this was a regression
N/A
A regression test would be helpful. The test steps look simple enough to me!

Payment Summary

@allroundexperts owed $250 via Manual Requests in NewDot
@ShridharGoel paid $250 via Upwork (LINK) - Pending acceptance

@JmillsExpensify - Payment request incoming.

@ShridharGoel - Please accept the Upwork job so it can be paid?

I am out of the office from June 3-10 - If you need BZ action in that time please reach out in Slack to ask for an assist.

Contributor paid out. @allroundexperts going to close this issue and see you again when I receive the payment request.

$250 approved for @allroundexperts


parallelScheme FEATURE : Generating runners with number of feature files present in project. Only matching tag runner should get generated.

pom.xml
 <parallelScheme>FEATURE</parallelScheme>
 <tags>"@google"</tags>
 <filterFeaturesByTags>true</filterFeaturesByTags>

There is only one feature file has tag @google. but runner classes are generated for non matching or no tags on features file. which is unexpected.
Feature with only matching tag should get filtered.
** Edited
sorry it was mistake from my side. Configuration property
<filterFeaturesByTags>true</filterFeaturesByTags> must be true with
 <parallelScheme>FEATURE</parallelScheme>
 <tags>"@google"</tags>

Still if we use following combination runner should not generate runner for all other non matching or empty Feature tag match.
<filterFeaturesByTags>false</filterFeaturesByTags>
 <parallelScheme>FEATURE</parallelScheme>
 <tags>"@google"</tags>

You just missed Feature Filter. I'm working on it. will pull new request with tagFilter.matchingFeature(feature)

Is this still an issue with 2.0.2?
If so, please can you give me an example?  I'm not sure I understand the above.

@temyers  Yes.
Lets take an example suppose we have 5 feature files with tag on 3 and 2 are not tagged.
TestFeature1.feature
@feature1 @smoke
Feature: Feature1

 @scenario1
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

 @scenario2
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

TestFeature2.feature
@feature2 @smoke
Feature: Feature2

 @scenario1
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

 @scenario2
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

TestFeature3.feature
@feature3 @smoke
Feature: Feature3

 @scenario1
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

 @scenario2
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

TestFeature4.feature
Feature: Feature4

 @scenario1
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

 @scenario2
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

TestFeature5.feature
Feature: Feature5

 @scenario1
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

 @scenario2
  Scenario: Generate Junit Runner for each feature file
    Given I have feature files
    When I generate Maven sources

Now if i have setting as
<filterFeaturesByTags>true</filterFeaturesByTags>
 <parallelScheme>FEATURE</parallelScheme>
 <tags>"@smoke"</tags>

It should generate runner from only those feature file which have "@smoke" tag.
and if i have setting as
<filterFeaturesByTags>false</filterFeaturesByTags>
 <parallelScheme>FEATURE</parallelScheme>
 <tags>"@smoke"</tags>

It should not generate runner from all 5 feature files.
Even we are generating runner based on Feature tag it will take much more time to execute scenarios sequentially rather it will good if we don't give user an option to set
<filterFeaturesByTags>false</filterFeaturesByTags>

properties true or false , lets keep it only two options
 <parallelScheme>FEATURE</parallelScheme>
 <tags>"@smoke"</tags>

In this case we have 3 features with "@smoke" tag but each feature has 2 or more scenario (just example) then lets generator generate runner like if we are running scheme by scenario. i.e for feature1.feature it will generate 2 runner per scenarios , for feature2.feature it will generate 2 runner and so on. But strictly runner should be generated from those feature which has only matching tag from property.

If I understand it correctly then the issue is that filterFeaturesByTags is superfluous. It must always be true when tags are present and has no effect when there are none. It can be set to true without any ill effect.
So removing it would be sensible.

@mpkorstanje yes Removing it would be sensible. Thank you.

4.0.0 should be available in Maven Central shortly.


active_adapter = model.active_adapters[0] TypeError: 'method' object is not subscriptable

System Info
trainer = Trainer(
model=model,
train_dataset=train_data,
eval_dataset=val_data,
args=transformers.TrainingArguments(
per_device_train_batch_size=micro_batch_size,
gradient_accumulation_steps=gradient_accumulation_steps,
warmup_steps=100,
num_train_epochs=num_epochs,
learning_rate=learning_rate,
fp16=True,
logging_steps=10,
optim="adamw_torch",
evaluation_strategy="steps" if val_set_size > 0 else "no",
save_strategy="steps",
eval_steps=saving_step if val_set_size > 0 else None,
save_steps=saving_step,
output_dir=output_dir,
save_total_limit=1,
load_best_model_at_end=True if val_set_size > 0 else False,
ddp_find_unused_parameters=False if ddp else None,
group_by_length=group_by_length,
report_to="wandb" if use_wandb else None,
run_name=wandb_run_name if use_wandb else None,
label_names=['labels']
),
data_collator=transformers.DataCollatorForSeq2Seq(
tokenizer, pad_to_multiple_of=8, return_tensors="pt", padding=True
),
)
model.config.use_cache = False
Who can help?
No response
Information

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

Tasks

[ ] An officially supported task in the examples folder
[ ] My own task or dataset (give details below)

Reproduction
trainer.train(resume_from_checkpoint=resume_from_checkpoint)

Expected behavior
I am currently using peft-0.3.0 and transformers " Version: 4.46.3"

Since I don't know the whole code, I can't reproduce the error. But given that you use a very old PEFT version (with a very recent transformers version), the best tip is to install a more recent PEFT version and see if it fixes the error. If you still get it, please show enough code to reproduce the error, or at the very least, paste the whole error message.

Ahh! Thank you for your response, I upgrade to "transformers version: 4.46.3" and peft-0.13.3. It is working.


Accept style tuples in description argument

What is the problem that this PR addresses?

...
How did you solve it?

Accept style tuples in description argument
Checklist

[ ] I have read the Contributor's Guide.
[ ] I will check that all automated PR checks pass before the PR gets reviewed.

Hi @weiduhuo thanks for the PR, but this is my fork of the project. If you would like to support it, feel free to open the PR into the original repo 😄. Here you can find the original dos for contributions, hope to see you contribution there, happy holidays


Entity issue

From the test build of NEIDs (the first of many array issues):
http://pastebin.com/G9V0NSPe

full log pls.

That's the report...
unless you're saying the entire forgelog...

Weird, it's working now after I started a new world.

More explained in #7


Cannot find objects inserted outside of preexisting placeholders

When I insert an object into a PowerPoint, but not into a placeholder that is directly from the Slide Master, there doesn't seem to be a way to directly find it, such as in slide.shapes.placeholders.  Is there an equivalent for finding items added through code like shapes.addtable or shapes.add_shape?

Please ask support questions on StackOverflow (SO) using the python-pptx tag. This issues list is for feature requests and suspected bugs. Support effort is kept low by answering questions like this one on SO where folks can easily find the answer on search. Most questions there get an answer within 24 hours.

I've tried to get questions answered on StackOverflow before; I just get downvoted until the thread is locked for "not being specific enough", not including sample code, or just to be rude (just read the threads, a lot of rude people there).  So I ask here, because if there isn't a way yet, I can request one.

I think you might need to work a little harder to figure out how to work within SO's guidelines; they're there to make things work for both sides, askers and responders. A question is hard to answer if it's too long, not specific, or doesn't contain code.
shapes.add_shape() returns a Shape object, which has a shape_id (guaranteed unique on that slide), a name (not guaranteed unique), and a position in the list of shapes for that slide:
>>> shape = shapes.add_shape()
>>> shape
<pptx.shapes.Shape object at 0x...>
>>> shape.shape_id
8
>>> shape.name
Rectangle 9
>>> shapes.index(shape)
5

You can access it directly from shapes by index:
>>> shapes[5] == shape
True

If you want to access it by name or shape_id you'll need to iterate through the shapes to find it:
def get_shape_by_id(shapes, shape_id):
    """Return shape in `shapes` having `shape_id`, or None if not found."""
    for shape in shapes:
        if shape.shape_id == shape_id:
            return shape
    return None


FR: enhanced parameter sorting options

Sourced from the Cycling '74 Forums:
https://cycling74.com/forums/add-custom-css-for-rnbooscquery-runner-browser-interface?replyPage=1#reply-6666b220681e680014cfc299

It would be great if the parameters could be ordered in the browser interface e.g. by the restore order attribute or a meta value in the patcher inspector. So related parameters could be displayed next to each other.

accidentally linked PR #114 to this instead

[param] already has a displayorder attribute that we could expose via the runner to enable an additional sorting option here.


Custom CSS?

Hello, thanks a ton for the really amazing theme! I'm a newcomer to Hugo and so that might be the reason, but I can't figure out how to add my own CSS to this theme. Is it possible? Thanks in advance! 🙂

Hello, I guess the simplest way is to modify /static/css/main.css file as you like.
Or you can adopt a new custom css by editing toml and html files like below.
https://mangolassi.it/topic/21569/how-do-i-use-custom-css-with-this-hugo-theme

Ah, thanks a lot! Editing the main.css file works perfectly fine for me. 🙂


Fix Ctrl+Backspace bug after Select All in chat search popup

Description
fixes #4461
PR fixes Ctrl+Backspace not working properly in chat search popup

Adds event filter to SearchPopup class.  Filters for Ctrl+Backspace and clears text if entire text is selected.

Do you see anything potentially bad with this change @Mm2PL? I don't think we do hotkeys on inputs other than the split input one so this should be alright

@vchuynh,
Thank you! As a first-time contributor, you can now add yourself to the contributors list that's shown inside the About page in Chatterino.
If you want this, you can open a new PR where you modify the resources/contributors.txt file and add yourself to the list. Make sure to read the comments at the top for instructions.
Please create new branches (from our master) for new PRs. My suggestion would be discarding all commits from your master and replacing it with upstream:
$ git remote add upstream https://github.com/Chatterino/chatterino2
$ git fetch --all
$ git checkout master
$ git reset --hard upstream/master

For new PRs, I just use:
$ # assuming origin is your remote name (which by default it is)
$ git checkout -b <new-branch-name>
$ # ... do the changes ...
$ git push origin <new-branch-name>
$ # ... do more changes ...
$ git push


autosave scroll to the top of the new section

@clarascu i re-based with next and running i do not have any problem but Coverage fails in some lines also from before and im not sure why this happens. Maybe you can check that why this is failing? :/


DRAFT: baseless nested routers working (appx +50 bytes)

Description
This adds a new way to nest routers, by passing the entire router as a handler.  With this method, child routers do not need explicit base paths set.
const child = Router().get('/', () => 'child')

const parent = Router()
                 .get('/', () => 'parent')
                 .all('/child/*', child)

Notes

This will only work with simple prefixes, not ones like /child/:foo/*.  For that to work, specify the base path in the child router as before.
Specifying the base path of child routers will still be faster, as no per-request manipulation needs to be done

Type of Change (select one and follow subtasks)

[ ] Documentation (README.md)
[ ] Maintenance or repo-level work (e.g. linting, build, tests, refactoring, etc.)
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)

[x] I have included test coverage

[ ] Breaking change (fix or feature that would cause existing functionality/userland code to not work as expected)

[ ] Explain why a breaking change is necessary:

[ ] This change requires (or is) a documentation update

[ ] I have added necessary local documentation (if appropriate)
[ ] I have added necessary itty.dev documentation (if appropriate)

This adds support for a few simple scenarios, while still requiring complex explanations/bypasses for more complex ones.  In the end, that is likely not worth the bytes.

Closing this one for now until we are able to achieve the desired effect

[ ] in a way that doesn't sacrifice performance (path concat should be done once, rather than at each route test)

[ ] without a low enough byte count to justify the inclusion

[ ] in a more universal way than I was able to achieve (e.g. normal route params should work in nested paths)
router.all('/:collection/*', collectionRouter) // should work without defining base path in child router

In the meantime, I was (sadly) unable to satisfactorily check all of those issues in the same attempt.


Split this tutorial in with and without Room.

You should split this codelab in two separate codelabs, where the first is w/o Room and the second with Room. As it is now, (new) users may get confused when the two solutions are in one codelab session.
RG

Thanks for the suggestion. Given that the UI layer implementation would be the same, having another codelab would lead to partially duplicated content and double the maintenance cost.


Overwrite Errors & Cookies

Describe the bug
I was getting this error every time I logged into Bolt:

(No other browsers or windows opened, or used)
So, I cleared my cookies, which revealed that the Chats I had on Bolt.new were all cached locally, somehow. It would be good to note this in the docs for others because while I go back to ZIP after every new feature is stable, others might lose everything if, for some reason, there's a cookie conflict or clearing that happens.

Now, if I go directly to the URL of my project, it still exists, but I get the same error every time I connect. There's no way to bring it back into my cache of recent chats.
Link to the Bolt URL that caused the error
Ask in Discord, this is publicly accessible.
Steps to reproduce

Use Bolt
Repeated messages when entering the project about overwrite.
Clear cookies (not cache)
Chats disappear

Expected behavior

Use Bolt
Save Files/Work
Re-Enter Bolt
No overwrite message
Chats cached on server not locally
Warning about clearing cookies

Screen Recording / Screenshot
No response
Platform
Winblows 11 (Current)
Microsoft Edge (Current)
Additional context
Thanks for taking a look.

Reimported the project from Github and I still get this every time I leave and return. Same browser, same window I've only closed the tab.

Continue to receive the fork errors every time I visit the project.

Get the errors in the middle of making changes without closing the tab/window.

See errors like 'Error connecting to StackBlitz' and then the stuff in the console ^.

1-Session for a few hours:

@fixfounder definitely adding this to the backlog for investigation, thanks for the detailed report!
In the meantime, maybe try moving the code into a StackBlitz native project, and importing that instead.

(Caught an odd error connecting to StackBlitz on the bottom-right)

Request URL:
https://stackblitz.com/api/projects/github-XXXXXXXXXXX
Request Method:
PATCH
Status Code:
409 Conflict
Remote Address:
<IP_ADDRESS>:443


Spec refers to EDUs and account data as "events"

The C-S spec refers to things like m.receipt and m.typing, and various bits of account data as "events". I think this is confusing - it gives the impression that such objects can appear in a room timeline, which is not the case.

also: the thing that is supposed to make an event an event is that they have a type and a content - and when m.receipt, m.typing and m.presence are sent over federation, they lack a type. (Instead they have an edu_type)

Was going to open this issue. I actually don't mind m.receipt and m.typing that much (Ruma calls these ephemeral room events) since they're still attached to rooms and immutable like all the other events, they're just not persistent.
What really doesn't make sense to me is global & room-specific account data being referred to as events.


Drawing is now only black*

Did skribbl.io patch it again so the script can't change the colours anymore? It seems like this happened at the same time as the update where the avatar of the person now shows below "(name) is choosing a word!"
*or whatever colour it was before the image gets dragged and dropped

Yep, the bot wont choose colours. whats going on? thanks

@catches lol your drawing doesn't match the word at all

Maybe a solution would be to simulate key presses right when the drawing starts.

Update: It seems to work again. Seems like skribbl.io reverted the update back to a previous version of the game.

Actually, it turns out that, apparently, 951707d fixed a small change to the UI. I knew that the game did this, but I didn't bother changing the status at the time because I thought it wasn't relevant and I forgot my thought process now that led up to that point lol.


fix typos

What is the purpose of the pull request
fix typos of 'stopped' and 'interval'

small changes， no need more Committer review this pr

Thanks for your contribution


Filter by Location field

The field we would like to show within the OSCP as an additional search filter is titled “Location” (from the job record). The values are Remote, In-person, and Hybrid. Please how to enable custom filtering using a custom field?

Hi
I am not sure the field is in the public API, so you can not do that with OSCP.
You need a solution that uses the Private (full) API
Self-promoting: Matador Jobs can do this with a click of a checkbox in the settings. We also have the option to add remote the list of locations https://matadorjobs.com/


Typo in NotifyOutboundSpamRecipients

Under the description of parameter -NotifyOutboundSpamRecipients "The specified recipients receive notifications when the value of the NotifyOutboundSpamRecipients parameter is $true." should read "The specified recipients receive notifications when the value of the NotifyOutboundSpam parameter is $true"

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

ID: 465aff8b-94d1-258b-0558-a35f2261fc0b
Version Independent ID: 3b7917f1-4d63-e881-5653-4fc4ac84038a
Content: Set-HostedOutboundSpamFilterPolicy (exchange)
Content Source: exchange/exchange-ps/exchange/antispam-antimalware/Set-HostedOutboundSpamFilterPolicy.md
Service: exchange-powershell
GitHub Login: @chrisda
Microsoft Alias: chrisda

@sbalogunpcgus I fixed this.


NgZone not defined

Hi there!
This is what I get when I load the page with monaco editor on it:
base-editor.js:102 Uncaught ReferenceError: NgZone is not defined
Is this something you have seen?

I have the same error

I have to say even after hours and hours of google I and trying to fix this I could not find a solution.

What are the angular, angular-cli, ngx-monaco-editor versions you are using?

That works like a charm. Thanks a lot @atul-wizni

Seems to not throw the error. The editor does not appear so far but that will be a mistake on my end I think.


Scikit-Learn wrapper cannot fit multi-class tasks

Environment info
Operating System: GNU/Linux (Fedora)
CPU: N/A
LightGBM: latest source checkout (commit 7dec4dec6ab45afa753cd9069f85dbbaaeefad43)
Python: 2.7 and 3.4
Scikit-Learn: 0.18.1
Error Message:
The function LGBMClassifier#fit(X, y) contains logic which is supposed to detect and properly handle multi-class classification problems. However, something doesn't work quite as expected, because the function invocation fails with "Objective and metrics don't match":
Traceback (most recent call last):
  File "multiclass.py", line 11, in <module>
    iris_classifier.fit(iris_X, iris_y)
  File "/usr/lib/python3.4/site-packages/lightgbm-0.1-py3.4.egg/lightgbm/sklearn.py", line 581, in fit
    callbacks=callbacks)
  File "/usr/lib/python3.4/site-packages/lightgbm-0.1-py3.4.egg/lightgbm/sklearn.py", line 406, in fit
    callbacks=callbacks)
  File "/usr/lib/python3.4/site-packages/lightgbm-0.1-py3.4.egg/lightgbm/engine.py", line 163, in train
    booster = Booster(params=params, train_set=train_set)
  File "/usr/lib/python3.4/site-packages/lightgbm-0.1-py3.4.egg/lightgbm/basic.py", line 1167, in __init__
    ctypes.byref(self.handle)))
  File "/usr/lib/python3.4/site-packages/lightgbm-0.1-py3.4.egg/lightgbm/basic.py", line 45, in _safe_call
    raise LightGBMError(_LIB.LGBM_GetLastError())
lightgbm.basic.LightGBMError: b"Objective and metrics don't match"

Reproducible examples
import pandas

iris_df = pandas.read_csv("Iris.csv")

iris_X = iris_df[["Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"]]
iris_y = iris_df["Species"]

from lightgbm import LGBMClassifier

iris_classifier = LGBMClassifier()
iris_classifier.fit(iris_X, iris_y)

Steps to reproduce

Download the Iris-Species dataset file Iris.csv.
Run the above Python script. The error persists even if the objective = "multiclass" argument is specified.

the default eval_metric="binary_logloss", you can pass "multi_logloss" to it for now, I will fix it
but should it be checked if eval_set=None? @guolinke

@wxchan I think it is not need to check metric when not passing validation data.
You can alter this logic in config.cpp as well.

Thanks, the LGBMClassifier instance is new able to detect the "arity" (ie. binary vs. multiclass) of the classification problem.


Infer that one value must be defined

Really sorry if this is a dupe. I tried looking, but couldn't find anything.
interface Blah { x: number; }

function demo(a?: Blah, b?: Blah): Blah {
    if (!a && !b) throw Error('One must be provided');
    return a || b;
}

The above fails with "Type 'Blah | undefined' is not assignable to type 'Blah'", but one of a or b must be defined at this point. Should this be inferred?

REPL demo https://goo.gl/mTgDL1

I don't think there is any logic to handle multiple variables at once -- only one at a time. The else branch of !a && !b doesn't tell us anything about a alone, or b alone, so it doesn't narrow the type of either variable.
The code will compile if you use a single variable:
const res = a || b;
if (!res) throw Error('One must be provided');
return res;

Ahh yes, that works, thank you!
Feel free to close, unless you think Typescript should have been able to track this.


2D raycast lighting

[x] tangent point calculation
[ ] raycast against polygons
[ ] raycast against circle
[ ] light -  color support and gradient
[ ] opacity

fork/lightrays

having some talk with @athaun and @PixelRifts about how to implement this the right, we didnt agree yet.
compute shaders and different solutions for dividing up the process were discussed.


Translation assistance

I need your webpage source to translate the website http://mine.elmakers.com/
But the link in wiki is invalid: https://github.com/elBukkit/MagicPlugin/wiki/WebSite
BTW, please take a look at the private message in Discord.
I'm looking forward to your reply.

Oh I moved it to a separate repo: https://github.com/elBukkit/MagicMeta/tree/master/src/web
Can you please tell me where you found that link so I can update it?

Just the link above
https://github.com/elBukkit/MagicPlugin/wiki/WebSite

Then which files include the text?

I mean where did you find that link? Is it on the wiki somewhere?
So a lot of the text you actually add to config.inc.php, that's where the main page description would go.
The rest of the text comes from your Magic config files, which you will need on the webserver, there is a location to edit in the config.inc.php file to point to your config YMLs
So if you've already translated the in-game text, use those translations in your configs and the website should pick them up.
There is also some text in index.php that won't be super easy to translate, unfortunately, since it's embedded in the HTML. But I don't think there's much of it, just the section headings I think.

It's in the wiki page WebSite
MagicPlugin web source

Thank you!

In fact I don't know about coding and how to set up a website,I will send you these files once I finish the translation.

So how to install it in my server?

I'm sorry, I think this may be too complex if you have no experience setting up a website :(
You would at least need to know how to enable php on your webserver.
If you want to try, just download that entire "web" folder from github and put it on your webserver.
But honestly you may be better off just skipping it. All of that information is basically available in-game, you can give out books to players with all of the spells in them, for instance, which will use your localization files.

Could you pack it into jar file to let me have a try?Or is it possible to set up a new website on your dev server?

Just go here: https://github.com/elBukkit/MagicMeta
And use the "Clone or Download" button, download it as a zip
The "web" folder is the one you want to put on your webserver
If you want to give me your localization files and I find the time, I can try to make the website have  a language selector. Not sure offhand how hard that'll be though.

Use this file:
https://github.com/elBukkit/MagicPlugin/blob/master/Magic/src/examples/localizations/messages_CN.yml

Ok, here you go:
http://mine.elmakers.com/?lang=CN
The intro page is not translated. If you'd like to try to translate it I can see about making a switch for that, too.
Here is (most of) that text:

		Welcome to the official Survival server for the Magic plugin by elMakers!

		Log in and play at mine.elmakers.com.

		You may also view our dynmap here.

		Magic is a plugin for the Bukkit minecraft server, you can find development builds on our Jenkins CI Server.

		Thanks for looking!</style>

Use the files in my fork:
https://github.com/qsefthuopq/MagicMeta/tree/CN/src/web

I just copied that in by hand
I had to change the filename to be consistent with the others for the language switch to work.


pip runs forever on MacOS Big Sur

Expected behaviour
I expect this to build fast. Any suggestion for this? or any way I can use a wheel built already?
Actual behaviour
After updating my MacOS to 11.0.1, I got stuck at wheels building.
pip install opencv-python==<IP_ADDRESS>
Collecting opencv-python==<IP_ADDRESS>
  Downloading opencv-python-<IP_ADDRESS>.tar.gz (88.9 MB)
     |████████████████████████████████| 88.9 MB 57.8 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.17.3 in ./venv/lib/python3.8/site-packages (from opencv-python==<IP_ADDRESS>) (1.19.4)
Building wheels for collected packages: opencv-python
  Building wheel for opencv-python (PEP 517) ... -^canceled
ERROR: Operation cancelled by user

Steps to reproduce

example code pip install opencv-python==<IP_ADDRESS>
operating system MacOS 11.0.1
opencv-python <IP_ADDRESS>

My python version is 3.8.2, thank you so much!

Python packaging tools do not support Big Sur yet: https://github.com/pypa/packaging/pull/319
Please wait for the tooling updates (pip, wheel etc.). If you wish to use opencv-python right now on Big Sur, you must build from source and that's going to take some time. It does not take forever, but most likely over 10 minutes depending on your hardware. OpenCV is a heavy C++ project.


Feature/20

Closes Issue #20

Please, if you can, add the label hacktoberfest-accepted when you'll merge this :D

Hi @Paola351, thanks a lot for the PR!
The editSprite.sh script can be used to resize the larger sprites (Kyogre, Groudon, Rayquaza, Deoxys) down so they'll fit a bit better.
For example, with groudon: ./editSprite.sh groudon 32 makes it a more appropriate size.
Could you resize those sprites so they will fit in the progress bar? Ideally, there should be no part of the sprites that overlap the edge of the progress bar.
Also, as a bit of a nitpick, could you please move the Jirachi sprite 1 pixel to the right, and 1 pixel down? That way none of the progress bar colour shows in front of the sprite

Deoxys is already 32x32, I'll apply the changes you requested to the other pokemons :D

please @kagof let me know it there's something wrong

Hi @Paola351, sorry for the belated review here, I've been away.
I think some clarification is needed RE gif sizing - although the gifs used in the plugin are generally 32x32 pixels, the actual space we have to work with in the progress bar is a bit smaller - the height of the progress bar is closer to 18px. So for sprites of smaller Pokémon (eg Jirachi), they fit fine as the full 32 pixels isn't utilized. However for Deoxys, some of the Pokémon is cut off, as you can see in this screenshot:

The editSprite.sh script I've created lets you "shrink" the sprite, then pad the border to make it 32x32 again. So, for example, I've done this with Blastoise, which is why the gif looks sort of blurry:

I'm not sure what the errors are that you're getting with the editSprite.sh script - we could potentially try to work through them and get the script working for you, or you could try to find an alternative to it.
As far as the other sprites go:

Kyogre isn't even showing up for me: possibly shifted off of the drawing area entirely?

Groudon is almost not visible:

Rayquaza is also not showing up for me, again possibly shifted off of the drawing area entirely?

Jirachi could be shifted down and to the right, see currently:

vs desired:

Is there anyway i can see the loading panel without installing the plugin? I use intellij idea 2019.3.4.
I'll try to solve the problem you described.

@kagof I fixed the comments


Update solution.md

Add message to know how to choose the next challenge (just like other challenge)

thanks!


Refresh stats data using interval, will involve proper data propagation and UI elements like timer and manual refresh button.

Since there's no really need to propagate the same data into other components I have decided to go with a really simple solution that can be extended later.
Solved in ba13bab4ccabaf5179e6fa779cb6239a52ed9fb0
Will create another issue for manual buttons (if decided to create).


2.107.3: apply_config.sh cannot download ver 2.19 of workflow-multibranch.hpi

Hi, jenkins/jenkins:lts image fails download workflow-multibranch.hpi plugin
It goes though a series of redirects, and hits http://archives.jenkins-ci.org/plugins/workflow-multibranch/2.19/workflow-multibranch.hpi - the whole /2.19 folder is not present on the server

This is working now


Can you guys do a deb for raspberry pi for v1.4.0?

I get this error on Ubuntu 14.04/16.04:
error: patch failed: tensorflow/core/platform/platform.h:45
error: tensorflow/core/platform/platform.h: patch does not apply

I create a Github project to package the Tensorflow's C/C++ API with debian packages to do inference and I have debian package releases there with the latest, bleeding-edge Tensorflow:
https://github.com/kecsap/tensorflow_cpp_packaging/releases
Sample codes are also included how to do the inference:
https://github.com/kecsap/tensorflow_cpp_packaging


Update quip to 5.2.26

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

note that 5.2.26 is from mas:
$ mas search quip
1003160018 Quip 5.2.26


Update changelog for 2024.02.13

Please let me know of any important changes that you want to make visible by adding to the Change log.

https://github.com/bazelbuild/intellij/pull/5978
https://github.com/bazelbuild/intellij/pull/6021
https://github.com/bazelbuild/intellij/pull/5969


chore(release): v1.1.6 🎉

:robot: I have created a release beep boop
1.1.6 (2022-12-23)
Bug Fixes

pkg: remove private flag from package description (a77fef4)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/ehmpathy/simple-artifact-builder/releases/tag/v1.1.6 :sunflower:


[FEATURE] Add ApplicationId as an alisa to ClientId to match Azure App Registration and Service Principal Object Model

PnP methods use the parameter ClientId to reference the Azure AD Application ID
To improve use and readability, the parameter should be changed to ApplicationId.
Existing methods should have ApplicationId as an alias for ClientId
New Methods should use ApplicationId and alias ClientId

@MSIH - which cmdlets are you referring to? Can you please specify?

for example Connect-PnPOnline
$clientId = "GET IT FROM APP REGISTRATION PAGE"
$thumbprint = "RETURNED WHEN RUNNING New-PnPAzureCertificate"
$tenantId = "GET IT FROM APP REGISTRATION PAGE"
$connectionsParams = @{
ClientId = $clientId
Thumbprint = $thumbprint
Tenant = $tenantId
}
$spoUrl = "https://tenant.sharepoint.com"
Connect-PnPOnline -Url $spoUrl @connectionsParams

this search show you all of them
https://github.com/pnp/powershell/search?q=clientid

If you look at the graph of the app registration or service principal, there is no clientid field! the unique ID for the app registration is the ApplicationId


Scale typeaheads and dropdowns with font size.

Fixes #30780

before
after

Looks great! I think we should let this dropdown get wider -- no reason to limit it and abbreviate the options when we have the space. This can be a follow-up.

I don't know if it's an issue with this PR, but a couple of times (not always), I got this error when turning on Dense mode:

This doesn't have JS changes, so I think that exception can't possibly be related to this. If you see it again, please post in #issues about it with any more detailed exception from the JS console. It looks like it's an exception reporting some other unknown exception, which could possibly be in third-party code (like a browser extension), but it's hard to tell.
Merged, thanks @amanagr!


integrate twist_mux into base diagnostics

tested on cob4-2: OK

apply this to (all) other robots, too?

applied config for all robots in #392

CR: OK


ERROR: Failed to resolve: com.github.Inconnu08:android-ratingreviews:1.2.0

Describe the bug
### ERROR: Failed to resolve: com.github.Inconnu08:android-ratingreviews:1.2.0

Have you followed the installation procedure properly?
installation
I think you don't have maven { url 'https://jitpack.io' } In your module level build.gradle


[HOLD for payment 2024-12-17] [$250] iOS - Attachment - No sliding in animation when opening attachment

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: 9.0.69-1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Issue reported by: Applause Internal Team
Action Performed:

Launch ND or hybrid app.
Go to DM.
Tap on the chat header.
Tap on the user avatar.
Note that there is no sliding in animation when opening avatar.
Submit an expense with a receipt.
Send an image to the chat.
Open the receipt from the expense.
Open the image attachment.

Expected Result:
There will be sliding in animation when opening attachment (production behavior).
Actual Result:
There is no sliding in animation when opening attachment. The app blinks slightly when the attachment is opened.
Workaround:
Unknown
Platforms:

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

Screenshots/Videos
https://github.com/user-attachments/assets/01669cc4-aeab-42b4-bbcb-b9835be86f19

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

Upwork Job URL: https://www.upwork.com/jobs/~021863486574634374199
Upwork Job ID:<PHONE_NUMBER>634374199
Last Price Increase: 2024-12-02
Automatic offers:

ikevin127 | Reviewer | 105182252

Issue OwnerCurrent Issue Owner: @ikevin127

Thai must be coming from the native stack change
@chrispader @hannojg @kirillzyusko for eyes
I dont think this is a blocker as users can open and view the attachment fine, teated on ios too

Catching up here - I think we're waiting on proposals, is that right @ikevin127?

Yes, unless somebody from our expert agencies wants to handle this - we're open for proposals based on the context mentioned in https://github.com/Expensify/App/issues/53362#issuecomment-2510775039.

Margelo will handle this one

This was scheduled to @chrispader who already started looking into it, can you pls comment @chrispader. Thanks!

Yes, i'm looking into it right now

I've created a PR with a fix for this specific issue here: https://github.com/Expensify/App/pull/53475
This fix is a hacky workaround tbh, since we're basically just delaying the navigation by 200ms.
The problem we see in this issue is the same as previous problems we had with RN modals/react-native-modals in the NativeStack PR. When modals are mounted/opened on a new screen - essentially at the same the time the screen mounts - the slide in animation will not be visible. Same thing for unmounting a modal. If the modal is hidden/unmounted at the same time as we navigate back from a screen, the animation cannot be seen.
This should ultimately by fixed with a more holistic solution, where we replace all legacy modals with modal (screens) from @react-navigation, though i think this should be handled in a separate PR.
For example in this issue, the problem is with the AttachmentModal component used in ProfileAvatar. It is used in many places. Same thing goes for other screens, that are essentially just modals. This won't work with NativeStack.

Thanks @chrispader - I added you to this GH. @mountiny and @ikevin127 does this solution sound good? https://github.com/Expensify/App/issues/53362#issuecomment-2514954175

Monitoring PR https://github.com/Expensify/App/pull/53475

PR was reverted as it had 2 regressions, we're probably looking at a re-work. No compensation required since the PR was reverted.

BugZero Checklist:

[ ] [Contributor] Classify the bug:

Bug classification

Source of bug:

[ ] 1a. Result of the original design (eg. a case wasn't considered)
[ ] 1b. Mistake during implementation
[ ] 1c. Backend bug
[ ] 1z. Other:

Where bug was reported:

[ ] 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
[ ] 2b. Reported on staging (eg. found during regression or PR testing)
[ ] 2d. Reported on a PR
[ ] 2z. Other:

Who reported the bug:

[ ] 3a. Expensify user
[ ] 3b. Expensify employee
[ ] 3c. Contributor
[ ] 3d. QA
[ ] 3z. Other:

[ ] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:

[ ] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:

[ ] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template

[ ] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:

Regression Test Proposal
Precondition:

Test:

Do we agree 👍 or 👎

Looks like we're ready for payment but I don't see anything about a regression test.
@ikevin127 do we need a regression test for this?
Contributor+: @ikevin127  owed $250 via Upwork (https://www.upwork.com/nx/wm/offer/105182252)

BugZero Checklist:

[ ] [Contributor] Classify the bug:

Bug classification

Source of bug:

[ ] 1a. Result of the original design (eg. a case wasn't considered)
[ ] 1b. Mistake during implementation
[ ] 1c. Backend bug
[ ] 1z. Other:

Where bug was reported:

[ ] 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
[ ] 2b. Reported on staging (eg. found during regression or PR testing)
[ ] 2d. Reported on a PR
[ ] 2z. Other:

Who reported the bug:

[ ] 3a. Expensify user
[ ] 3b. Expensify employee
[ ] 3c. Contributor
[ ] 3d. QA
[ ] 3z. Other:

[ ] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:

[ ] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:

[ ] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template

[ ] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:

Regression Test Proposal
Precondition:

Test:

Do we agree 👍 or 👎

PR was reverted as it had 2 regressions, we're probably looking at a re-work. No compensation required since the PR was reverted.

@Christinadobrzyn No payment required here as the PR was reverted. Not sure where we are with the issue, maybe @chrispader has more context on what happened after the revert regarding the issue.

Ah thank you @ikevin127 - really appreciate the clarity. @chrispader can you let us know your thoughts on next steps?

I think this still has to be handled, gonna make it weekly over the holidays

This issue would get fixed by https://github.com/Expensify/App/issues/53493, so i'm going to further push forward the modal migration solution


fix(package): add some more metadata to webpack package.json

I'm hopeful this will fix a few issues with the npmjs.com README missing.


Allow specifiying an FAQ link when dissolving parliament

If present this link will be displayed at the bottom of the message as follows:

Find out more on the Petitions Committee website

Where the part in bold will be the clickable link.  If no url is provided that sentence is not included in the warning notification at all.

:shipit:  the present change isn't worth bothering with

Made the query attribute change, also added :site_updated_at to the fragments used to invalidate the cache on the homepage.  Without this changing the Parliament model wouldn't refresh the home page block where the "parliament dissolved" notification now lives.


Data mismatch

I downloaded the data as per the readme, but after unzipping it, it doesn't match the 801 dataset settings, the unzip ends in nii, not nii.gz, I tried to run nnUNetv2_plan_and_preprocess -d 801 --verify_dataset_integrity, but it failed
ingerprint extraction...
Dataset801_LiverCT
Traceback (most recent call last):
  File "/home/lk/miniconda3/envs/lightmunet/bin/nnUNetv2_plan_and_preprocess", line 33, in <module>
    sys.exit(load_entry_point('nnunetv2', 'console_scripts', 'nnUNetv2_plan_and_preprocess')())
  File "/home/lk/workspase/python/segmentation/LightM-UNet/lightm-unet/nnunetv2/experiment_planning/plan_and_preprocess_entrypoints.py", line 182, in plan_and_preprocess_entry
    extract_fingerprints(args.d, args.fpe, args.npfp, args.verify_dataset_integrity, args.clean, args.verbose)
  File "/home/lk/workspase/python/segmentation/LightM-UNet/lightm-unet/nnunetv2/experiment_planning/plan_and_preprocess_api.py", line 47, in extract_fingerprints
    extract_fingerprint_dataset(d, fingerprint_extractor_class, num_processes, check_dataset_integrity, clean,
  File "/home/lk/workspase/python/segmentation/LightM-UNet/lightm-unet/nnunetv2/experiment_planning/plan_and_preprocess_api.py", line 30, in extract_fingerprint_dataset
    verify_dataset_integrity(join(nnUNet_raw, dataset_name), num_processes)
  File "/home/lk/workspase/python/segmentation/LightM-UNet/lightm-unet/nnunetv2/experiment_planning/verify_dataset_integrity.py", line 155, in verify_dataset_integrity
    assert len(dataset) == expected_num_training, 'Did not find the expected number of training cases ' \
AssertionError: Did not find the expected number of training cases (87). Found 0 instead.
Examples: []

how to solve this issue
thank you

Have you ever used nnUNet?
Maybe you should change the data format from nii to nii.gz first by yourself.
Note that "file_ending": ".nii.gz" in dataset.json.


Routing broken with react-router v5.1

Miss, Status, and Header are having no effect with react-router v5.1.
It seems like staticContext is no longer being passed into those components.
I'm still debugging and looking for a fix.

Ah sorry. My problem was actually because connected-react-router was being used server side.


Using the correct collapse class.

It looks like in the docs there is a wrong class mentioned stack-collapse while stack-space-collapse is the correct one.

Great catch. Thank you!


[BUG/ISSUE] (Beta) Update not disappearing from the list at the bottom + getting unstable after opening logs

Before submitting the issue

[X] I have checked that the bug is not a duplicate or, if it is, it needs to be reopened
[X] I have checked that I am running the latest version of WingetUI
[X] I have tried resetting and reinstalling WingetUI and the issue persisted or happened again
[X] I have checked the FAQ section for solutions

Describe the bug
After https://github.com/martinet101/WingetUI/commit/7955889e216fb3cdf73b82754391c30f353a00c4 this issue is happening again. I've tested it in the update section, so I am not sure if it happens in other sections:

if you don't click to show the log, the successful update message won't disappear.

If you click show the log, things get really confusing... (successful install seem to appear as failures and also don't disappear. It's kinda hard to explain, but it is really chaotic)

img 1 (before opening log)

img 2 (opening log)

img 3 (after opening log)

img 4 (after opening log)

Edit: this problem also appears in install/uninstall sections

In theory this issue shouldn't happen anymore. Could you please test the latest head?

It seems fixed! Good job!


No search option in TeamDrive

There is no search button in TeamDrive(For mobile view).
There is a short video (Ad) when we play a video. Somehow I can remove it 😅.
Streaming videos are crashed sometimes.

Somehow fixed 😅


Two buttons 'View Chat in sidebar' & 'View Chat in editor'

The inconvenience I am referring to is experienced when asking for Copilot assistance inside a code block (eg: highlighting lines of code and asking questions based on that.) Copilot currently gives the ability to expand the response generated by clicking the button 'View in Chat' which opens the response in the sidebar. At most times the default sizing of the sidebar view is not enough to comfortably view the chat in the sidebar in which case the three dots are clicked and 'Open Session in editor' is selected to view the chat in editor view.
My suggestion is to have the option to choose whether to open the chat in the sidebar view or in the editor view. So rather than a single button 'View in Chat' two buttons 'View Chat in sidebar' & 'View Chat in editor' in place of that would be handy.

Maybe there should be general setting to express preference of chat editor vs pancel chat


Tests failing on 32bit arch

Hello there,
I am a working on getting Traefik into Debian and because of that I end up packaging paerser which is a dependency.
While doing so I noticed that some of the tests are failing on 32bit arch. You can see the package status here.
The architectures for which the tests are failing are :

armel (see build logs)
armhf (see build logs)
i386 (see build logs)

I will try to find some time to submit a PR but if someone has the time to fix it before me it would be a pleasure.
Cheers!

Hello @creekorful,
Thank you for raising this issue.
Have you been able to move forward?
We ould be interested in such a fix, so do not hesitate to keep us updated following up on this issue.


'Seek' not working

I'm new to the project and am finding that seeking by dragging the progress indicator on the progress bar does nothing. If the audio is paused, the indicator will stay where I drop it, but only until I hit play, at which point it'll snap back to wherever it was before I dragged. If I drag while the audio is playing, the indicator just jumps snaps back right away.
I've tried with m4a, ogg, and webm files. Didn't seem to make any difference.
Any thoughts much appreciated!

Was a problem with my server -- didn't accept byte range requests.

@christianpbrink Ah that's pretty subtle, I'm glad you figured it out.  Thanks for opening this issue anyway, maybe it will save someone else with the same bug a headache.


Set RISC0_FEATURE_bigint2 in risc0-build to signal zkVM features

This is a proposal for how we might improve build debugging when someone tries to use bigint2, but it is not available. In this PR, an env var is added to invocations of cargo in risc0-build that is a positive signal to downstream crates that that a new "hardware" feature is available.
In the case of upcoming cryptography patches that only work with bigint2, we'd add the following snippet to the lib.rs file of each. The advantage being that we give an error and link to our docs rather than a linker error at the end of the build process. From there, we can provide better guidence on either upgrading the risc0-zkvm version or downgrading the cryptography patch version.
#[cfg(all(target_os = "zkvm", target_arch = "riscv32"))]
const _: () = {
    assert!(
        core::option_env!("RISC0_FEATURE_bigint2").is_some(),
        r#"
RISC Zero zkVM feature bigint2 is not available, and is required by this crate.

If you'd like to use bigint2, please upgrade to risc0-zkvm and risc0-build version 1.2.
Also see our documentation https://dev.risczero.com/api/zkvm/acceleration
"#
    );
};

This is written with bigint2 in mind. It could also be used when transitioning to the new ABI with zkVM revision 2.

OK, this seems reasonable. Minor nit about assert error message: should be 1.2 and all future versions.

Need to gate the setting of the env var behind an unstable flag

Ok @flaub, I added an unstable feature flag as a gate to risc0-build. I also added the compile-time assert (updated message also in PR description) to risc0-bigint2 so that it doesn't need to be added to each individual crate. I dropped mention of a specific zkVM version from the message and we can instead keep that information up to date in the docs.

@flaub , sorry I should have called it out specifically with a comment instead of just adjusting the description.
When I went to test this I found that my ECDSA program linked and built without setting unstable on risc0-zkvm, which was unexpected. Digging into the stability crate I found that the way the implement their macro [1], it doesn't play nice with no_mangle and the symbol will still be included.
So I made the changes to use cfg instead of stability to ensure that the symbol does not get included when the unstable flag is not set. I see now that this isn't quite right. Let me try another variation.
[1] https://docs.rs/stability/latest/src/stability/unstable.rs.html#85

It looks like CI isn't happy about it either: https://github.com/risc0/risc0/actions/runs/12060414268/job/33630808653?pr=2567

It looks like CI isn't happy about it either: https://github.com/risc0/risc0/actions/runs/12060414268/job/33630808653?pr=2567

So this I think is due to the unstable flag not being set on the jwt example guest. So similar to ECDSA, I was expecting this to fail as it is on main but it was working. 100439a8ab57c8aefa5850ff47c9b1c281f0b235

Ok, I tried a different variant with https://github.com/risc0/risc0/pull/2567/commits/91bd5208e316ad27ba74a05b774ac25de40f8fb2. It results in the expected behavior of the jwt example working when the guest Cargo.toml has unstable set and not without it. It is still not the exact same as whats on main, now the rust exports are provided even when the export-syscall feature is not set. I could add an extra cfg to avoid that if you think that would be better.

Looks like CI is failing with the cargo-platform related build failures. One solution to this in in https://github.com/risc0/risc0/pull/2584


set_ownership_ failing

I am trying to build wso2 imagaes for apim, when I tried with vagrant up, I am getting this error.  I followed the instructions as mentioned. what I could be doing wrong?
==> default: Error: /Stage[main]/Wso2base::Install/Exec[set_ownership_/mnt/wso2am-2.1.0]: Failed to call refresh: Working directory '/mnt/wso2am-2.1.0' does not exist
==> default: Error: /Stage[main]/Wso2base::Install/Exec[set_ownership_/mnt/wso2am-2.1.0]: Working directory '/mnt/wso2am-2.1.0' does not exist```

Hi @raviada
Are you still getting this issue ?


Documentation update for 'lws-body-parser'

Attempting to access a non-JSON request body
The docs here: https://github.com/lwsjs/local-web-server/wiki/How-to-access-the-body-of-an-incoming-request

are you asking me to update the documentation? What type of request body are you trying to access?

The two I have tried so far are text/plain and application/jwt - the data is just a base64 encoded string

i will update the docs tonight with some examples, thanks.
If you think you've found a bug, please post a reproduction case. Otherwise, try running ws with the --verbose flag to inspect all traffic..

Some examples would be great thank you.  I'm pretty certain the error is in my code.  I'm unclear as to whether we need to require the full require('koa'); app as per their docs here: https://github.com/koajs/bodyparser or if there's some heavy lifting done by lws-body-parser etc

The easiest option in the end was to revert to the application/json content-type and serialise & send the string inside an array - JSON.stringify([string]). In the handler I just had to call ctx.request.body[0];


Task removes Function App Host Key

When I run this task on a new deployed function app, it removes any custom Function App host key that I've defined. The host key no longer exists. If I was to then create a new host key, rerun the task, the host key remains. I can't see any option that may affect host key on the task. Why is being removed? Is this default behaviour? If so, what purpose does it serve? Or is this a bug?
Note
Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: here
Enter Task Name: here
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment

Server - Azure Pipelines or TFS on-premises?

If using TFS on-premises, provide the version:

If using Azure Pipelines, provide the account name, team project name, build definition name/build number:

Agent - Hosted or Private:

If using Hosted agent, provide agent queue name:

If using private agent, provide the OS of the machine running the agent and the agent version:

Issue Description
[Include task name(s), screenshots and any other relevant details]
Task logs
[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs
[Insert error from the logs here for a quick overview]

Hi @am8448, thanks for the feedback, could you please specify the task name, and version? Also could you please share the task definition from the pipeline?

Hi @DmitriiBobreshev, is it ok to provide the yaml task:
- task: AzureFunctionApp@1
  displayName: Deploy App
  enabled: true
  inputs:
    azureSubscription: ${{variables.serviceConnectionName}}
    appType: 'functionApp'
    appName: $(functionAppName)
    package: $(Pipeline.Workspace)/$(appArtifact)/AetherFuncApp.zip
    appSettings: -AADRole_London "$(AADRole_London)"
      -TimescapeDatabaseDataKeepDays "$(TimescapeDatabaseDataKeepDays)"

- task: AzureCLI@2
  displayName: 'Confirm Function App Host Key'
  enabled: true
  inputs:
    azureSubscription: '${{variables.serviceConnectionName}}'
    scriptType: pscore
    scriptLocation: 'InlineScript'
    inlineScript: |
      $functionAppKeyName = "functionAppKey"
      $functionAppKey = az functionapp keys list -g $(resourceGroup) -n $(functionAppName) --query "functionKeys.$functionAppKeyName" --output tsv
      If($functionAppKey){Write-Host "Found Function App Key: $functionAppKeyName"}
      Else{az functionapp keys set -g $(resourceGroup) -n $(functionAppName) --key-type functionKeys --key-name "$functionAppKeyName" --key-value "$(functionAppKey)"}

Thank's a lot! Unfortunately, our team don't own this task, but maybe @rvairavelu could help with it.


add cpu usage at the window corner

There's a memory usage in the window, can we add the cpu usage as wekk?

This functionality is already implemented in Spyder, check the preferences.

@fayeshine, you need the psutil package installed in your system for Spyder to show cpu show along with memory usage.


Nginx: [emerg] "modsecurity" directive is not allowed here.

Is it possible to only run modsecurity rules when a request skips fastcgi_cache.
When a request is served a static cached file, I'd like it to skip modsec.
I have tried doing something evil and putting modsecurity directives inside ifs, but it isn't allowed.
location ~ \.php$ {
    if ($skip_cache) {
        modsecurity_rules_file mod_security_file;
    }
}

I really would prefer not to run varnish or nginx as a cached reverse proxy infront of nginx with modsec.
 However, if you are interested in partially inspect the request you may want to configure your nginx with different hosts: one considering ModSecurity and another one, not considering.

I am wanting to put modsecurity behind caching, as per
https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/modsecurity-performance-recommendations/
I don't use varnish.
I have instead configured Nginx as a reverse proxy with caching up front, and ngxinx with modsec enabled upstream.


New package: SCRU128 v1.0.0

Registering package: SCRU128
Repository: https://github.com/wildart/SCRU128.jl
Created by: @wildart
Version: v1.0.0
Commit: 656a0fe5d98e524a1e5fe44d31d96de50bb69e7e
Reviewed by: @wildart
Reference: https://github.com/wildart/SCRU128.jl/issues/2
Description: SCRU128 Julia Implementation

[noblock]
The name of the package comes from the abbreviation: Sortable, Clock and Random number-based Unique identifier. It would be improper to use mixed case in the name.

[noblock]
As I explained above, the name of the package comes from the specific abbreviation, and I would like to keep it.


gutenberg parses static files

I use gutenberg 0.4.2. I have a custom theme 'cuervo' which includes MathJax for Math typesetting installed via Bower in its static dir. After updating to the current version of MathJax I get an error trying to build my site using gutenberg:
$ gutenberg build
Building site...
Failed to build the site
Error: Error parsing templates from themes
Reason:
* Failed to parse "[...]/themes/cuervo/static/components/MathJax/test/localization.html"
   --> 266:41
    |
266 | <li>IllegalMacroParam: \( \def\mymacro#1{#2} \mymacro{x} \) </li>
    |                                         ^---
    |
    = expected some content
* Failed to parse "[...]/themes/cuervo/static/components/MathJax/test/sample-macros.html"
  --> 22:27
   |
22 |       bold: ['\\boldsymbol{#1}',1]   // this macro has one parameter
   |                           ^---
   |
   = expected some content

Why is gutenberg trying to parse the static files in my theme? It's supposed to just copy them to the output dir.

The glob loading theme templates was too generic and was looking for .html files but not just in the templates folder.
This should be fixed in the next branch by the commit above, please try it if you have time!

Just tried it and it works :) Thanks!

Should this issue be closed if the problem has been resolved?


Repo.transaction returns {:error, :rollback} when unique constraint fails

Precheck

Do not use the issues tracker for help or support requests (try Elixir Forum, Stack Overflow, IRC or mailing lists, etc).
For proposing a new feature, please start a discussion on elixir-ecto.
For bugs, do a quick search and make sure the bug has not yet been reported.
Finally, be nice and have fun!

Environment

Elixir version (elixir -v): 1.6.6
Database and version (PostgreSQL 9.4, MongoDB 3.2, etc.): PostgreSQL 10.4
Ecto version (mix deps): 2.2.10
Database adapter and version (mix deps): postgrex 0.13.5
Operating system: Linux

Current behavior
Repo.transaction returns {:error, :rollback} when a unique constraint failed but was caught with unique_constraint in the changeset.
Example:
Repo.transaction(fn ->
  Repo.insert(User.changeset(%User{}, email: "already_present@example.com"))
end)

User.changeset in this example would have the line
|> unique_constraint(:email)

and the database would include the unique constraint on the email field.
Expected behavior
https://hexdocs.pm/ecto/Ecto.Repo.html#c:transaction/2-use-with-function says

If an unhandled error occurs the transaction will be rolled back and the error will bubble up from the transaction function. If no error occurred the transaction will be committed when the function returns.

The failing constraint is not an unhandled error, so I would expect the transaction to be commited and {:ok, result} to be returned.

I couldn't reproduce this on ecto 2.2.10, it behaves as expected:
iex(1)> Repo.transaction(fn -> change(%Post{}, title: "foo") |> unique_constraint(:title) |> Repo.insert() end)
{:ok,
 {:error,
  #Ecto.Changeset<
    action: :insert,
    changes: %{title: "foo"},
    errors: [title: {"has already been taken", []}],
    data: #Bloggy.Blog.Post<>,
    valid?: false
  >}}

could you create a sample app that reproduces the error?

I can't reproduce this in a clean project, either. some things that are special about the original case:

the unique index is over multiple fields and is a partial index: CREATE UNIQUE INDEX subscriptions_publication_id_member_id_index ON public.subscriptions USING btree (publication_id, member_id) WHERE (state = ANY (ARRAY['active'::text, 'in_trial'::text]))
one of those fields (publication_id) is set by a BEFORE trigger on insert

I've tried both in my example app, but still the {:error, :rollback} function isn't triggered. The function inside the transaction doesn't do anything besides building and inserting the new record. Any ideas where else to look?

After putting some IO.inspects into DBConnection and testing some more, I don't think it's related to the index kind or trigger. Even running
Repo.transaction(fn -> %User{} |> change(%{email<EMAIL_ADDRESS>|> unique_constraint(:email) |> Repo.insert() end) in IEx has the same result, while in my plain test project it returns {:ok, {:error, ...}} as expected.
Now I think the difference is in the "bad" project it seems I'm always in a nested transaction. I think that, because I've put IO.inspects into DBConnection.transaction_nested and they only print things in the bad project, not in the plain testing one.
I've no idea if that's really the case or how that could happen, though.
Also, please let me know if I'm spamming here. Not sure if that's an Ecto issue anymore, but I also don't really know how to find out. The Ecto codebase is pretty complicated and I'm having some trouble making sense of it.

@manukall as far as I understand your description of the problem, this is expected behaviour. Once an operation fails, for example because of a constraint violation, the database voids the whole transaction and puts it into rolled back state. So if you attempt to do any other operation, then it will cause those further operations to fail, with {:error, :rollback} reason.

@josevalim now i'm really confused. i would expect the behavior @wojtekmach described, which is also what happened when i generated a new app to reproduce my problem. are you saying what @wojtekmach is not expected?

@manukall how many DB operations are you doing within a transaction? If more than 1, I believe the last operation may return :rollback indeed.
When PG hits a constraint violation it refuses to make any other operations in that transaction.

@wojtekmach I'm running this (in IEx):
Repo.transaction(fn -> %User{} |> change(%{email<EMAIL_ADDRESS>|> unique_constraint(:email) |> Repo.insert() end)

Maybe it's because of read_after_writes fields in the schema? Otherwise I would assume it's only 1 DB operation.

@manukall you need to do further insert/update/delete operations in the transaction. If you are using nested transactions, the number of operations in the outer one is the one that counts.

@josevalim i'm pasting from iex:
iex(4)> Repo.transaction(fn -> %User{} |> change(%{email<EMAIL_ADDRESS>|> unique_constraint(:email) |> Repo.insert() end)
[debug] QUERY OK db=0.4ms queue=0.1ms
begin []
[debug] QUERY ERROR db=27.9ms
INSERT INTO "users" ("email","inserted_at","updated_at","id") VALUES ($1,$2,$3,$4) RETURNING "shipping_country_code", "shipping_last_name", "shipping_first_name"<EMAIL_ADDRESS>{{2018, 7, 13}, {12, 5, 17, 763527}}, {{2018, 7, 13}, {12, 5, 17, 763553}}, <<157, 138, 32, 216, 249, 106, 66, 170, 148, 199, 45, 108, 139, 166, 180, 238>>]
[debug] QUERY OK db=0.3ms
rollback []
{:error, :rollback}

I'm not aware of using nested transactions. Is there any way of something starting a transaction when my app is started, so that basically every other transaction is nested within that?

That's weird. Which pool are you using? Maybe something related to the PostgreSQL version?

I haven't configured a pool, so I guess the default one. If it's the PostgreSQL version it shouldn't work in the other app, so I've no idea. Should DBConnection.transaction_nested be called if it's not a nested transaction? I've got some GenServers running that access the database in regular intervals. Could those somehow interfere?

I've got some GenServers running that access the database in regular intervals. Could those somehow interfere?

I don't think they would. I think at this point, without a way to reproduce, there isn't much we can do. :(

I've managed to create a minimal app with a test that reproduces the issue: https://github.com/manukall/ecto_transaction_constraint_test
It seems like adding a has_many association to the schema makes Repo.insert run inside a transaction, which means Repo.transaction(fn -> Repo.insert...) results in nested transactions?

@manukall yes.

@josevalim is this intended behavior? it felt quite weird that that test failed after adding the seemingly unrelated has_many to the schema.

@manukall if you have no entries in has_many, then it should not fail. But if you are inserting something in the has_many too, then it should fail.

@josevalim In this test I'm inserting a user with the same email twice, without any other records. The second time, Repo.transaction returns {:error, :rollback}. I would assume that this test should pass and Repo.transaction returns {:ok, {:error, changeset}}.

Thanks, I will investigate. You are also using the SQL sandbox and that may affect things.

Thanks you. Please let me know if I can help.

I was unable to find 1020cfe2450a56ad97417e6bff68ebef94830522 so I couldn't be sure, is this fix released yet?

Good catch @lpil! I probably had to rebase or something and the SHA change, the correct SHA is: fa9490af749eade1cea38d343a39dfa19c229b6b

Thank you @josevalim!

This is some serious bad behavior on my part by commenting on this closed issue, but I've found myself writing my apps over the last few years around this behavior; not using transactions when I really should, etc and I have to ask if I'm missing something and every time I run into it, I feel dirtier and dirtier.
Consider this code. I'd expect this to always return either :ok or {:error, _error_code}. But this can sometimes return {:error, :rollback} depending on attrs and/or the implimentation details of the schema.
Repo.transaction(fn ->
  with {:ok, _first} <- create_record(attrs),
       {:ok, _second} <- create_record(attrs) do
    :ok
  else
    {:error, changeset} ->
      # Look at the problems and decide on an error code.
      # `determine_error_code` could raise if an unexpected cs is passed
      # I'd want to make sure I don't have `first` kicking around if `second` failed; this would be a big problem.
      changeset
      |> determine_error_code()
      |> Repo.rollback()
  end
end)

The contract holds until something about create_record changes; in our case it was a cast_embed. Or in this issue it was a has_many. This feels wrong, no? Furthermore, the fact that attrs may or may not contain the field that triggers the inner transaction means that this contract will sometimes hold and sometimes not. So instead we've to resorted to writing our own "rollbacks" by looking for records and deleting them in specific situations; this doesn't feel great, to say the least.
So my question is, if this is truly a feature and not a bug, am I missing an obvious way to avoid these problems?
Thanks a million for any advice!

Hi @coladarci! Can you please provide an example that reproduces the error? It will be much easier for us to give advice if we can look and run the code. Thanks!

Thanks @josevalim - as is typically the case, I can't FOR THE LIFE OF ME make this happen in a new project (which is, of course, why your request is a good one).
I assumed it was all invalid changesets; that's clearly not the case.
I then assumed it was db constraint errors, that's not the case.
I then assumed it had to do w/ belongs_to w/ constraints, that's not the case.
While I continue to debug this, one thing I wanted to point out is that if I do this:
Repo.transaction(fn ->
  with {:ok, _first} <- create_record(attrs),
       {:ok, _second} <- create_record(attrs) do
    :ok
  else
    {:error, changeset} ->
      |> Repo.rollback(:my_error_code)
  end
  |> IO.inspect() # <-- this shows me {:my_error_code}
end)
|> IO.inspect() # <-- this shows me {:error, :rollback}

So something is causing it to get lost in between. Does this clearly point to something that I am missing?
I'm going to continue to try and make this happen in a fresh project.

Thanks @josevalim I reproduced this in a new project and I suspect this is just me not understanding transactions. My failing tests WEREN'T when I was calling Repo.rollback(:error_code); those work. My problems came from when I was returning {:error, :error_code} w/out calling Rollback. As it happens, there was a use-case where there was nothing to rollback so I was just returning the error code.
**tl;**dr Returning {:error, :foo} from inside a transaction is not a good idea.  If you want to retain the error code, send it in a Rollback.
I assume this is "working as expected" - I just got tripped up. Thanks (as always) for quickly jumping in to help me.

Thanks for the follow up!


Borderless Gaming

Description of the new feature / enhancement
A hotkey that can snap a window to a predetermined position and size. Program example would be Borderless Gaming.
Scenario when this would be used?
Gaming mostly. Setting a game to full screen or borderless full screen, pressing the key to resize it to match the specs.
Supporting information
This has likely been requested already, but the ones I could find were closed and still don't do what I think the population is expecting.  Figured I'd resubmit a request.

/dup #1881