Corrupt result of flate2::read::GzEncoder

I am using flate2::read::GzEncoder to gzip a stream. However, when I try to ungzip the result I get an Err value: Custom { kind: InvalidInput, error: StringError("corrupt gzip stream does not have a matching checksum") }.
I'm doing probably something wrong. This is the code that I'm using:
// gzip Rocket body
let mut compressed = [0u8; 100];
success = GzEncoder::new(plain.into_inner(), flate2::Compression::default())
                        .read(&mut compressed[..])
                        .is_ok();

// In tests, ungzipping it
let mut s = String::new();
GzDecoder::new(&response.body_bytes().unwrap()[..])
    .read_to_string(&mut s)
    .unwrap();
assert_eq!(s, String::from(HELLO));

HELLO has the following value: "Hello world!", whose bytes are: [72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33].
&response.body_bytes().unwrap()[..] has the following value (these are the bytes of the corrupted gzip): [31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 1, 12, 0, 243, 255, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].
I have tried to ungzipping a custom vector of bytes without the final zeroes and I get the same error.
Am I doing something wrong? Something is missing?
Thanks.

You probably want to use read_to_end in the encoding phase:
let mut compressed = vec![];
success = GzEncoder::new(plain.into_inner(), flate2::Compression::default())
                        .read_to_end(&mut compressed)
                        .is_ok();

Thanks for answering in such a sort time.
I used read_to_end before, but I cannot use it because the compression should be done in a streamed manner (https://github.com/SergioBenitez/Rocket/pull/550).
I think that your read example is a form of doing read_to_end using read, so it would not be suitable for my case.
The problem is not reading less bytes because my test example has less than 100 bytes. I wonder if after reading all bytes is necessary to call a function to finish the gzip or something similar.
Do you guess what I'm doing wrong?

I have compared the results of using read and read_to_end, and these are the results.
Using read with a buffer of 100 bytes, the result is:
[31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 1, 12, 0, 243, 255, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Using read_to_end the result is:
[31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 1, 12, 0, 243, 255, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33, 149, 25, 133, 27, 12, 0, 0, 0]

The difference between the results are the last bytes 149, 25, 133, 27, 12, missing in the read result.
Maybe this finding can be helpful.

Ok. I had started using flate2::write::GzEncoder, but I was not using it correctly.
Thanks.

@vitalyd - How would you proceed to read out only the bytes written to the Cursors inner buffer? My use case involves payloads of varying size so that I'm initializing an oversized buffer, leaving me with unnecessary 0 values, which I would like to slice out to keep my footprint as small as possible.

I solved this by switching to the bufread implementation.

What an interesting ride. I've been using a few other de/compression libs, and they always output the total bytes read into the buffer, so when I ran into this issue; when using a buffer with read::GzEncoder it doesn't output the final 8 bytes for checksum and length. (I guess this is just the way it should be, you all seem far smarter than me. :-) )
Maybe I was being too obtuse, (it is late), but write::GzEncoder wouldn't work, because my use case was also overallocating a buffer then needed to see how many bytes were written to it; not how many bytes were written from the input as write::GzEncoder::write does.
Anyway, maybe this deserves a laugh? I got my desired output... :sweat_smile: Is there a better way?

// compute checksum
let mut crc = Crc::new();
crc.update(&data);

// Encode
let mut encoder = GzEncoder::new(data, Compression::new(level));
let n_bytes = encoder.read(slice)?;

// insert checksum as bytes into output
let mut checksum_bytes = crc.sum().to_le_bytes();
slice[n_bytes..n_bytes + 4].swap_with_slice(&mut checksum_bytes);

// insert data len as bytes into output
let mut data_len_bytes = (data.len() as u32).to_le_bytes();
slice[n_bytes + 4..n_bytes + 8].swap_with_slice(&mut data_len_bytes);

// Ka-pow, total bytes affected output
Ok(n_bytes + checksum_bytes.len() + data_len_bytes.len())


Migrate from structopt to clap v4

This removes the ansi_term dependency and resolves #55
The only real noticeable change is that the output of --help looks different. I think updated color support is in the works...

Old
New

After some quick testing, all functionality appears to be the same, but any testing would be appreciated as I am still inexperienced with this project. Let me know if you have any feedback or suggested changes!

I'm participating in Hacktoberfest 2022 and if this PR is approved it, it would be greatly appreciated if the PR could be labelled hacktoberfest-accepted, or even the repository labelled as hacktoberfest to allow PRs in this repository to count towards the competition!

Thanks! This looks good to me. Just starting the process of merging it. No idea about the color - clap seems to suggest it should do color by default? But it doesn't seem critical - we can always figure it out later.

No idea about the color - clap seems to suggest it should do color by default?

Did a quick search, this seems helpful. Sounds like a ✨better✨ color implementation will be coming soon™.

CI seems to be passing on GitHub, not sure what's up with the facebook internal checks... Is there anything I can help with or is this out of my hands now?

@lhvy internally we were using clap3, so just trying to upgrade our internals to clap4 so I can then land this patch. Out of your hands and sorry for the delay - definitely going to land just as soon as I can get clap4 onboarded. Usually that process takes an hour or so, but ran into some weird windows build issues with Starlark, so still figuring out that...

Thanks @lhvy! Let me know if we need to do anything else to give you hackathon credit - much appreciated :)

No problem at all, happy to help! And thanks for Hacktoberfest label, just checked and everything went through fine. :)


AOS on page bottom (footer)

AOS works fine until in the website footer. Most the content does not appear, if you manipulate the browser size e.g. it appears afterwards.
Any Ideas what cause the issue?
Thanks

The default offset is probably higher than the footer itself. Hence the problem. You might want to add data-aos-offset="0" on footer. Let me know if this helps @Crunky :)

Feel free to reopen this issue, if above solution won't work @Crunky ;)

Thanks. looks like this is realy in relation with this issue. In some cases it fixed the problem but in some it does not. I can reproduce it if i add some paddings to to footer element it work fine :) In my case i have to add paddings about 100px at top and bottom, a bit too much for an footer ;)

I'm also having this issue on sites near the bottom of the page and footer. I have the offset set to 0 and the sections and footer are definitely in view. Sometimes when it doesn't work the elements are almost at the top of the screen so not sure it's an offset issue. Thanks for your help and great animation library!

i am facing issue. if i zoom only then it works. i used offset=0 but no luck. i tried placement=bottom-bottom but no luck.  still no idea why it not getting triggered.


[gpio] Consider removing prim_flop_2sync for strap_en_i

This CDC flop was removed for Darjeeling in https://github.com/lowRISC/opentitan/pull/22390. We need to check whether the same change is needed / desired for Earlgrey.

The logic to use the gpio IP for strap sampling is not in the master branch, so there is no change to make for the next string of earlgrey milestones.
When the time comes to bring the IP changes over, it might be best to have a parameter to select the synchronizer. It seems a bit peculiar to me to require pwrmgr to run on the same clock as gpio.

Thx for analyzing the situation, @a-will. This SGTM


Remove Cockroach note

Fixes #1394

Pull Request Test Coverage Report for Build d059c33149700af7a5b7d473cbeee3568c8e330a-PR-1397

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 69.358%

Totals

Change from base Build b64adda2ce21d3daa67122faf5c5ca798131fb26:
0.0%

Covered Lines:
1426

Relevant Lines:
2056

💛  - Coveralls


dev: improving contstants definitions

Added separate definitions for constants:

constant.language.boolean.go
constant.language.null.go
constant.language.iota.go

This also is backward compatible, with existing style grammars (in order to keep existing formating "ok")

Thanks! This will add more customization options. But I think we can simplify it, please see my review.
Also, it will affect tests. Can you please run the tests? (e.g., make stress, make ready). See: Go Syntax Test Commands
Test
You need to install vscode-tmgrammar-test before running the tests.
Install it globally:
npm i -g vscode-tmgrammar-test

In the go-syntax directory, run the following tests:

Stress Test

vscode-tmgrammar-test ./test/stress.go && vscode-tmgrammar-snap ./test/stress.go -u

Semantic Tokens Test

vscode-tmgrammar-test ./test/semantic_tokens.go && vscode-tmgrammar-snap ./test/semantic_tokens.go -u

P.S. Many changes may occur in the tests, which is fine.

I did both tests, should I also include snap files in comimt? Not seams really usefull as long as it generated to be a part of commit.

Thanks. Yes, please add both of the snap files too (semantic_tokens.go.snap, stress.go.snap). This would be helpful to show the changes directly in git version control.

and done!

Thanks! I've published v0.6.7


[1.x] [ARTEMIS-1043] Support IPv6 in NettyConnector

Wrap the host added to the HTTP request headers with
IPV6Util.encloseHost to ensure that load balancers that reads the header
will have a valid IPv6 address.
JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1043

Pending PR for master: https://github.com/apache/activemq-artemis/pull/1245


Test/23-create-full-path-for-tracking-file

Pull Request Template
TL;DR
Provide a brief summary of the changes made.

pipfile.lock updated with latest versions
CONTRIBUTING.md updated withn better steps for setup

Problem Solved

Describe the problem your changes address.
Please mention the issue number if relevant

When creating a json log file, the whole path is not created. Current behaviour unknown
fixes https://github.com/444B/streamlit-analytics2/issues/23

Manual Testing

[X] You have manually tested all changes to ensure they work as intended. Replace the [ ] with a [X] if True.

How was this tested?
Describe the tests that you ran to verify your changes.

Replicated in branch and edited core files, reloaded streamlit and tested by providing a path to save_to_json()

fixes #23


Highest Credit "required" validator fails for 0 value(s)

https://github.com/moov-io/metro2/blob/542a9b84ebd2893d4f149fabfc8a52ecfaa88494/pkg/lib/base_segment.go#L124
The highest credit field in the base_segment.go struct has the required json flag, which doesn't allow for 0 int values:
https://pkg.go.dev/gopkg.in/go-playground/validator.v8#hdr-Required
This validates that the value is not the data types default zero value. For numbers ensures value is not zero. For strings ensures value is not "". For slices, maps, pointers, interfaces, channels and functions ensures the value is not nil.

According to the CRRG:
Highest Credit or Original Loan Amount
Report the following values in whole dollars only:
Line of Credit = Highest amount of credit utilized by the

consumer

Installment = Original amount of the loan excluding

interest payments

Mortgage = Original amount of the loan excluding

interest payments

Open = Highest amount of credit utilized by the

consumer, if applicable

Revolving = Highest amount of credit utilized by the

consumer

A zero value forHighest Credit or Original Loan Amount should be allowed. For example, a credit card that that has had no current balance.

@mfdeveloper508 could you take a look?

@ebisrat can you try out the latest release? https://github.com/moov-io/metro2/releases/tag/v0.5.1

just confirming that fix worked!


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target/pull/286 is merged into live branch.
Auto archive content to https://github.com/OPS-E2E-PPE/docs-archive-test-target.git

Docs Build status updates of commit 70bdf2e:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Release_Archive_master_2020-01-13-07-55-12 has been deleted or has been force pushed: fatal: couldn't find remote ref refs/heads/Release_Archive_master_2020-01-13-07-55-12

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


mruby-cli app can be released with task release

@hone @zzak here the results of our discussion. Thanks a lot, I find the result much cleaner than all the hacks and workarounds I can suggest :stuck_out_tongue: What do you think of this version?
Don't you think we should document which attributes should be set outside of the blocks?

ping?


One Click Deployment to Digital Ocean

Same error. Commented out the config yaml stuff and changed the py files to use os env vars instead and still same issue


updated the file with new name i.e EddieHub

closes #ISSUE-NO
What does this PR do?
Updated the template with a new name i.e EddieHub
Description of Task to be completed?
How can this be manually tested?
Any background context you want to provide?
What is the relevant issue link?
Screenshots (if appropriate)
Questions:

@bagladivyang03 #881

@SashoStoichkov Could u pls merge. It would be great :)

Sorry, I don't have write access

ok np @SashoStoichkov

Sorry for the delay everyone. This is a difficult one. I agree we should be consistent 👍
I think EddieHub alone is enough (I know the GitHub Org is appended with Community because the name was taken)


Cursor can not be moved upwards out of svelte editable component

I tried the demo on https://sibiraj-s.github.io/svelte-tiptap/

locate the cursor on the first paragraph.
move the cursor downwards with arrow down key until the last paragraph (everything works well)
move the cursor upwards with arrow up key, you'll set it is stuck in the editable component.

If you try the the demo on tiptap.dev , no such issue.

Thanks. Will check this. Sorry for the delay.

I looked into this bug last year and as far as I could tell was that svelte-tiptap creates an extra wrapper div and there are known browser bugs and inconsistencies that apply then. I read about it on ProseMirror forum. You can compare https://sibiraj-s.github.io/svelte-tiptap/ on Chrome and Firefox and both act differently. On Firefox you cannot even get out of the editable Nodeview with both up and down arrows so the bug is even worse.  I even considered a work-around to listen to the keypresses and calculate the next cursor position but did not get to it.
I think svelte-tiptap should remove the extra wrapper div.

Thanks @aivo0 . I did not notice your comment. Yes indeed that is the solution. Make sure to add contenteditable=false to the elements that are not intended to be edited.


[dv/jtag] Enable flow to verify the openOCD debugger in simulation

A flow to use jtag in simulation is created in https://github.com/lowRISC/opentitan/pull/16486. The code snipppets used to access jtag in silicon could be different than the snippets generated in by the DV flow, which could be problematic if we are unable to reproduce in dv issues found in silicon.
It would be desirable to have some way to either compare the silicon vs. DV sequences, or to feed the silicon sequences directly to the dv flow.

Found an old issue that became relevant again ;).
Assigning as nice to have for SV3 for now, given that we can't develop this full-time.
CC @matutem @a-will @moidx @jonmichelson


Connect-DbaInstance - Optimize code for StatementTimeout and ApplicationIntent

As StatementTimeout is an integer variable with a default from an integer configuration - this can never be $null. So we always set this.
But to not copy connection context if not needed, added a test like for Database and NonPooledConnection. Then did that also with ApplicationIntent to have them all aligned.

All tests pass and Shawn's changes have been addressed 👍🏼  Merging


Fix maas_common flake8 errors

These flake8 errors are preventing other patches from passing linting.
Related: #775

recheck - failed on adding maas repo apt key

:+1:

:+1: Let's get a backport as well


Refactor certbot pipeline

Right now any sort of failure midway through results in us losing new certs when the task runs next (the provisioned certs get blown away before being installed); if left too long, this can result in us hitting a cap at LE. Potential robustifications: - Provisioning certs from LE and installing them in our ELBs should be separate tasks that can fail independently. - Use S3 as an input and output between the tasks so we can still manually pull them out if needed.

This is obsoleted by @mxplusb's work on doomsday


Need to hack fish summary script to account for visual observations without lengths

There are two entries in electrofishing data for Weigert Creek site 197534_us_ef6 where there was a visual observation and no lengths were estimated. Ariana and the other guy who's name is eluding me right now did this site. Maybe they saw the fish briefly or it was too far away to get a good length estimate.

I'll just do a case_when so that these observations still show up in step 2. I'll write in the comments that lengths couldn't be estimated or something like that

Good idea. Important to watch that the VO still show up in the mapping geopackage too because sometimes it shows presence on the hillcrest served maps where otherwise the reader would not be aware that we know there are fish there. Check older repos like the Bulkley 2020 and elk 2020 and elk 2021 for examples of VO processing as I’m sure VO has been filtered out before and there might be other moves to also have them show in the gpkg. A find in file search for “vo” might bear fruit


chore(deps): update dependencies

Update bevy to v0.13.

Codecov Report
Attention: 93 lines in your changes are missing coverage. Please review.

Comparison is base (03882c3) 11.63% compared to head (698d9d0) 11.63%.

Files
Patch %
Lines

src/input_action_map.rs
0.00%
53 Missing :warning:

src/systems/input.rs
0.00%
20 Missing :warning:

src/systems/level.rs
0.00%
9 Missing :warning:

src/systems/auto_move.rs
0.00%
6 Missing :warning:

src/main.rs
0.00%
1 Missing :warning:

src/plugins/performance_matrix.rs
0.00%
1 Missing :warning:

src/systems/auto_solve.rs
0.00%
1 Missing :warning:

src/systems/render.rs
0.00%
1 Missing :warning:

src/systems/ui.rs
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
- Coverage   11.63%   11.63%   -0.01%
==========================================
  Files          22       22
  Lines        3325     3327       +2
==========================================
  Hits          387      387
- Misses       2938     2940       +2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[Feature][UI Next] Add process state statistics.

Purpose of the pull request
close #7714

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

Codecov Report

Merging #7781 (55bb494) into dev (081adf4) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev    #7781      +/-   ##
============================================
- Coverage     40.84%   40.84%   -0.01%
+ Complexity     3667     3666       -1
============================================
  Files           642      642
  Lines         26740    26740
  Branches       3006     3006
============================================
- Hits          10922    10921       -1
  Misses        14766    14766
- Partials       1052     1053       +1

Impacted Files
Coverage Δ

...er/master/dispatch/host/assign/RandomSelector.java
77.77% <0.00%> (-5.56%)
:arrow_down:

...dolphinscheduler/remote/future/ResponseFuture.java
81.96% <0.00%> (-1.64%)
:arrow_down:

...e/dolphinscheduler/remote/NettyRemotingClient.java
53.52% <0.00%> (+0.70%)
:arrow_up:

Continue to review full report at Codecov.

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


Create SECURITY.md

Security Policy
Supported Versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.

Version
Supported

5.1.x
:white_check_mark:

5.0.x
:Eth:        ✅

4.0.x
:white_check_mark: ☑

< 4.0
:trust wallet ✅

Reporting a Vulnerability
Use this section to tell people how to report a vulnerability.
Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.

git fetch origin
git checkout -b alexanderramos89-patch-4 origin/alexanderramos89-patch-4
git merge master

git fetch origin
git checkout -b alexanderramos89-patch-4 origin/alexanderramos89-patch-4
git merge master


[FEATURES] Dataset nodeAffinity should support matchFields

What feature you'd like to add:
For now, Fluid allow nodeAffinity.required.nodeSelectorTerms[i].matchFields to be defined in Dataset while it is ignored and takes no effect.
Dataset nodeAffinity should support matchFields like this:
nodeAffinity:
  required:
    nodeSelectorTerms:
      - matchFields:
        - key: metadata.name
           operator: In
           values:
           - target-host-name

Why is this feature needed:
To make affinity fields of Dataset be consistent with affinity fields of Pods.
This is useful when users want to deploy Runtimes on some specific hosts.

Sure! Thanks for your help! 👍
/assign @omerap12

Hi @TrafalgarZZZ, I've begun working on this issue. Could you take a quick look to make sure I'm heading in the right direction?
Btw, I noticed that the CI is running for draft pull requests. Is that expected behavior, shouldn't it only be running for finalized PRs?

Hi @omerap12, did you mean pull request #4292 ?
And it's expected behavior that CI runs for draft pull requests, we don't distinguish finalized and draft PRs in Github Actions for now.

Hey @TrafalgarZZZ , yes. If you just take a quick look that would be great :)
And got it thanks!

@omerap12 I just checked the feature and found it is already supported in #1063 , I am really sorry for mistakenly still making the issue open and label it as a "good first issue"🤕.
But I found there are some functions being unused in #1063 and not cleaned up until now. Would you like to help remove these codes in #4292 ?
Here's the functions I found unused:

https://github.com/fluid-cloudnative/fluid/blob/master/pkg/ddc/jindocache/worker.go#L157
https://github.com/fluid-cloudnative/fluid/blob/master/pkg/ddc/jindofsx/worker.go#L157

@TrafalgarZZZ , yeah of course :)


Makefile: force symlink creation to allow multiple installs

We install this project in a Jenkins job which currently fails succeeds in the first run but fails in subsequent runs because ln fails when the specified symlink already exists.

merged thx!


pixi global upgrade is missing from shell completion

Checks

[X] I have checked that this issue has not already been reported.

[X] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example
❯ eval "$(pixi completion -s zsh)"
❯ pixi global <TAB>
help     -- Print this message or the help of the given subcommand(s)
install  -- Installs the defined package in a global accessible location
list     -- Lists all packages previously installed into a globally accessible location via `pixi global install`
remove   -- Removes a package previously installed into a globally accessible location via `pixi global install`

Issue description
upgrade and upgrade-all are missing
Expected behavior
upgrade and upgrade-all are missing

Not sure what is happening there but it's there in main:
pixi on  main [$!] is 📦 v0.12.0 via 🦀 v1.73.0
➜ zsh
fedora% pixi global <TABTAB>
help         -- Print this message or the help of the given subcommand(s)
install      -- Installs the defined package in a global accessible location
list         -- Lists all packages previously installed into a globally accessible location via `pixi global install`
remove       -- Removes a package previously installed into a globally accessible location via `pixi global install`
upgrade-all  -- Upgrade all globally installed packages
upgrade      -- Upgrade specific package which is installed globally

Weird... I'm also using the version on main

Really old main?

Can you do a which pixi?

Okay no idea what happened but restarting the shell worked 😅


Update self-asserted-technical-profile.md

Fixed small spelling mistake.

Docs Build status updates of commit 7b70bdb:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Trying a close/reopen to clear the validation warning.

Docs Build status updates of commit 7b70bdb:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Looks good; thanks, @Casper-Olsen!
@MicrosoftDocs/public-repo-pr-review-team This PR can be merged after the Validation warning is resolved. I've opened a SiteHelp ticket.


Provision a database with helm alongside the API server

JIRA Ticket - AP-100
What
Adds an Helm configuration to the application to provision the application server and a postgresql database into staging environment (can do to production as well, but there's more configurations that need to be addressed maybe as part of AP-98)
How

Helm provision configurations includes a postgresql server chart as a dependency, which means, when the application is deployed, a postgresql server pod instance is also provisioned (as it can be seen by the screenshot). This, as noted in the JIRA ticket is a temporary solution and we will be moving to a RDS solution in the foreseeable future.

Changes to this can be found under the helm_deploy/ directory

Dockerfile and the docker-compose.yml now use a binary script bin/run as the start point of the server which includes some tasks such as:

checking that the database server is up and accepting connections

setup and/or migrate the database. this ensures that when the app is being started the migrations are always up to date

start the application server as per usual

Changes to this can be found in the Dockerfile itself, the docker-compose.yml and the scripts under docker/ directory

Added extra information to the /status endpoint to include the healthcheck status of the database

Changes to this can be found in the app/controllers/status_controller.rb and associated app/services/healthcheck.rb service.

To deploy the application, we executed the following command (this will be moved to an automated deploy as part of AP-98):
          helm upgrade ${APPLICATON_DEPLOY_NAME} ./helm_deploy/apply-for-legalaid-api/ \
                        --install \
                        --tiller-namespace=${KUBE_ENV_STAGING_NAMESPACE} \
                        --namespace=${KUBE_ENV_STAGING_NAMESPACE} \
                        --set image.repository="${ECR_ENDPOINT}/${GITHUB_TEAM_NAME_SLUG}/${REPO_NAME}" \
                        --set image.tag="${CIRCLE_SHA1}" \
                        --set ingress.hosts="{${STAGING_HOST}}" \
                        --set replicaCount="2" \
                        --debug

@bleach here's a summary of how I've addressed your bullet points:

move db health out of liveness check (if we want it to be in readiness check that's 👌 )

I've removed the database healthcheck from the status endpoint preserving the existent functionality

double check that it's safe to keep the db migration in the startup script for now (assumption: only one app container will run)

It's not safe, and it's something we might need to address going forward, I don't think it's necessarily a problem just now. I'm happy to create an issue to address this later on.

test on the shell that waits for postgres

I've tested getting the following output when the postgresql is not available:
[wait-for] [20180829130759] wait 'apply-for-legalaid-api-postgresql':'5432' up to '15'
[wait-for] [20180829130759] wait attempt 'apply-for-legalaid-api-postgresql:5432' [1]
[wait-for] [20180829130800] wait attempt 'apply-for-legalaid-api-postgresql:5432' [2]
[wait-for] [20180829130801] wait attempt 'apply-for-legalaid-api-postgresql:5432' [3]
[wait-for] [20180829130802] wait attempt 'apply-for-legalaid-api-postgresql:5432' [4]
[wait-for] [20180829130803] wait attempt 'apply-for-legalaid-api-postgresql:5432' [5]
[wait-for] [20180829130804] wait attempt 'apply-for-legalaid-api-postgresql:5432' [6]
[wait-for] [20180829130805] wait attempt 'apply-for-legalaid-api-postgresql:5432' [7]
[wait-for] [20180829130806] wait attempt 'apply-for-legalaid-api-postgresql:5432' [8]
[wait-for] [20180829130807] wait attempt 'apply-for-legalaid-api-postgresql:5432' [9]
[wait-for] [20180829130808] wait attempt 'apply-for-legalaid-api-postgresql:5432' [10]
[wait-for] [20180829130809] wait attempt 'apply-for-legalaid-api-postgresql:5432' [11]
[wait-for] [20180829130810] wait attempt 'apply-for-legalaid-api-postgresql:5432' [12]
[wait-for] [20180829130811] wait attempt 'apply-for-legalaid-api-postgresql:5432' [13]
[wait-for] [20180829130812] wait attempt 'apply-for-legalaid-api-postgresql:5432' [14]
[wait-for] [20180829130813] wait attempt 'apply-for-legalaid-api-postgresql:5432' [15]
[wait-for] [20180829130814] [ERROR] wait timeout of '15' on 'apply-for-legalaid-api-postgresql:5432'

Thanks!
Agreed offline that we will merge as-is and separately I will:

produce a branch demonstrating how to test shell
create a story for moving the db setup out of app startup


Add CappedBackoff and JitterBackoff

Adds two new backoff policies:

CappedBackoff which restricts the backoff of a base backoff policy to some maximal value
JitterBackoff which selects a random backoff value between zero and the result of a base backoff policy

Usage as described in the README:
import scala.concurrent.duration._
import atmos.dsl._

// capped: Waits 4 minutes, 8 minutes, then 10 minutes, 10 minutes, 10 minutes ...
retryForever using { exponentialBackoff { 4.minutes } capped 10.minutes }

// jitter: Waits some random time between 0 and 4 minutes, 8 minutes, 16 minutes ...
retryForever using { exponentialBackoff { 4.minutes } withJitter }

// both
retryForever using { exponentialBackoff { 4.minutes } capped 10.minutes withJitter }

Both of these motivated by: Exponential Backoff And Jitter

Build failed; I also saw this on master.
https://travis-ci.org/paradoxical-io/atmos/jobs/274678300#L856

Closing since this project appears dead.


SA1306 should also check fields starting with a single underscore

The following code should trigger SA1306 in my opinion (with SA1309 disabled and SX1309 enabled).
public class TestClass
{
    private int _TestField;
}

I would propose that we make the underscore for fields a property and that we adapt the different analyzers and code fixes to take this setting into account properly. I think with the correct set of properties we can wrap up SA1309, SX1309 and SX1309S into a single analyzer.

I'd like to wait and see how dotnet/roslyn#4616 and dotnet/roslyn#7064 are handled before I go too far on this. What do you think?

I'd prefer to solve this on a relatively short time frame, as I normally have SX1309 enabled and would prefer to also have SA1306.

I'd be OK with simply ignoring underscores for SA1306, regardless of the state of SA1309 and/or SX1309.


Add option to scope to have static content served from S3 instead

A second webpack config is added, and both configs are built into the scope binary
under two different generated files.
The second one only includes html assets, pointing to further assets in S3 instead.
The old (local static content) mode is used unless you pass -app.externalUI
make ui-upload will push the generated content to S3, which is run as a circle-ci
deploy step as long as our various weave-specific env vars are defined.
I've said S3 above but the code is fully repurposable for any other CDN or external hosting,
simply by changing output.publicPath in client/webpack.external.config.js.
By serving this content from S3, we defeat some race conditions involved with changing live
versions of scope during a rolling upgrade.

fixed trivial conflicts

I got this when trying to build:
Toms-MacBook-Pro:scope twilkie$ git status
On branch mike/static-content-from-s3
Your branch is up-to-date with 'origin/mike/static-content-from-s3'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	bin/do-setup-circleci-secrets
	experimental/

nothing added to commit but untracked files present (use "git add" to track)
Toms-MacBook-Pro:scope twilkie$ make clean
env GOGC=off go clean ./...
# Don't actually rmi the build images - rm'ing the .uptodate files is enough to ensure
# we rebuild the images, and rmi'ing the images causes us to have to redownload a lot of stuff.
#  docker rmi weaveworks/scope-ui-build weaveworks/scope-backend-build >/dev/null 2>&1 || true
rm -rf scope.tar .scope_ui_build.uptodate .scope_backend_build.uptodate \
		prog/scope vendor/runsvinit/runsvinit prog/static.go client/build/*.js docker/weave .pkg \
		report/report.codecgen.go render/detailed/detailed.codecgen.go vendor/github.com/ugorji/go/codec/codecgen/bin
Toms-MacBook-Pro:scope twilkie$ make
docker build -t weaveworks/scope-backend-build backend
Sending build context to Docker daemon 4.096 kB
Step 1 : FROM golang:1.6.2
 ---> 8ecba0e9bd48
Step 2 : RUN apt-get update && 	apt-get install -y libpcap-dev python-requests time file shellcheck && 	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Using cache
 ---> cb8d7a82af19
Step 3 : RUN go clean -i net && 	go install -tags netgo std && 	go install -race -tags netgo std
 ---> Using cache
 ---> eb05a19ec844
Step 4 : RUN go get -tags netgo 		github.com/fzipp/gocyclo 		github.com/golang/lint/golint github.com/kisielk/errcheck 		github.com/mjibson/esc 		github.com/client9/misspell/cmd/misspell && 	rm -rf /go/pkg/ /go/src/
 ---> Using cache
 ---> 4e7511f69270
Step 5 : COPY build.sh /
 ---> Using cache
 ---> 3beffefb4688
Step 6 : ENTRYPOINT /build.sh
 ---> Using cache
 ---> 06bbaf545dea
Successfully built 06bbaf545dea
touch .scope_backend_build.uptodate
docker build -t weaveworks/scope-ui-build client
Sending build context to Docker daemon 1.676 MB
Step 1 : FROM node:4.2.2
 ---> 8b747c3b9316
Step 2 : WORKDIR /home/weave
 ---> Using cache
 ---> 2fb69649eeda
Step 3 : COPY package.json /home/weave/
 ---> Using cache
 ---> 9588028fec79
Step 4 : ENV NPM_CONFIG_LOGLEVEL warn NPM_CONFIG_PROGRESS false
 ---> Using cache
 ---> 4752df5eade2
Step 5 : RUN npm install
 ---> Using cache
 ---> e29b4defb95c
Step 6 : COPY webpack.local.config.js webpack.production.config.js server.js .babelrc .eslintrc .eslintignore /home/weave/
 ---> Using cache
 ---> b4d9bedc364f
Successfully built b4d9bedc364f
touch .scope_ui_build.uptodate
mkdir -p client/build
docker run --rm -ti -v /Users/twilkie/Documents/src/github.com/weaveworks/scope/client/app:/home/weave/app \
		-v /Users/twilkie/Documents/src/github.com/weaveworks/scope/client/build:/home/weave/build \
		weaveworks/scope-ui-build npm run build

><EMAIL_ADDRESS>build /home/weave
> webpack --config webpack.production.config.js

clean-webpack-plugin: /home/weave/build has been removed.
Hash: 4b060859e5c2d0c70f83
Version: webpack 1.12.15
Time: 83968ms
                                 Asset       Size  Chunks             Chunk Names
               9261efa6762523d56be8.js     650 kB       0  [emitted]  vendors
  df7b648ce5356ea1ebce435b3459fd60.ttf     126 kB          [emitted]
2751ee43015f9884c3642f103b7f70c9.woff2    49.2 kB          [emitted]
                           favicon.ico  741 bytes          [emitted]
  b27e9be743c13cd5a0b881af39fc99e6.ico   57 bytes          [emitted]
  32400f4e08932a94d8bfd2422702c446.eot    70.8 kB          [emitted]
  f775f9cca88e21d45bebe185b27c0e5b.svg     366 kB          [emitted]
  a3de2170e4e9df77161ea5d3f31b2668.ttf     142 kB          [emitted]
db812d8a70a4e88e888744c1c9a27e89.woff2    66.6 kB          [emitted]
 a35720c2fed2c7f043bc7e4ffb45e073.woff    83.6 kB          [emitted]
 ba3dcd8903e3d0af5de7792777f8ae0d.woff    61.7 kB          [emitted]
               73ceaff15871b5836763.js     346 kB       1  [emitted]  app
               6750985b795d90fbdf36.js     346 kB       2  [emitted]  contrast-app
               1045349cc7704cead269.js    2.32 kB       3  [emitted]  terminal-app
                         style-app.css    24.7 kB       1  [emitted]  app
                style-contrast-app.css    24.5 kB       2  [emitted]  contrast-app
                style-terminal-app.css    24.7 kB       3  [emitted]  terminal-app
                         contrast.html  791 bytes          [emitted]
                         terminal.html  791 bytes          [emitted]
                            index.html  782 bytes          [emitted]
   [0] multi vendors 136 bytes {0} [built]
 [385] ./app/scripts/vendor/term.js 156 kB {0} [built]
    + 696 hidden modules
Child html-webpack-plugin for "contrast.html":
        + 3 hidden modules
Child html-webpack-plugin for "terminal.html":
        + 3 hidden modules
Child html-webpack-plugin for "index.html":
        + 3 hidden modules
Child extract-text-webpack-plugin:
        + 5 hidden modules
Child extract-text-webpack-plugin:
        + 6 hidden modules
docker run --rm -ti \
		-v /Users/twilkie/Documents/src/github.com/weaveworks/scope:/go/src/github.com/weaveworks/scope \
		-v /Users/twilkie/Documents/src/github.com/weaveworks/scope/.pkg:/go/pkg \
		--net=host \
		-e GOARCH -e GOOS -e CIRCLECI -e CIRCLE_BUILD_NUM -e CIRCLE_NODE_TOTAL \
		-e CIRCLE_NODE_INDEX -e COVERDIR -e SLOW -e TESTDIRS \
		weaveworks/scope-backend-build SCOPE_VERSION=c308c89 GO_BUILD_INSTALL_DEPS=-i prog/static.go
make: Entering directory '/go/src/github.com/weaveworks/scope'
cd client && npm run build
/bin/sh: 1: npm: not found
Makefile:138: recipe for target 'client/build/app.js' failed
make: *** [client/build/app.js] Error 127
make: Leaving directory '/go/src/github.com/weaveworks/scope'
make: *** [prog/static.go] Error 2

Ignore me, old code.

Some things need adding to the .gitignore:
Toms-MacBook-Pro:scope twilkie$ git status
On branch mike/static-content-from-s3
Your branch is up-to-date with 'origin/mike/static-content-from-s3'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	client/build-external/
	prog/externalui/
	prog/staticui/

nothing added to commit but untracked files present (use "git add" to track)

LGTM.  I'd consider not merging until tomorrow, unless you don't mind babysitting this for the rest of the evening.


Restrict zoom based on available memory

These changes restrict ZOOM based on available physical RAM and current window size. It should fix all out of memory issues we have at the moment.
Basically possible ChunkCache size is estimated at startup. Only a conservative amount of Chunks is reserved at that moment. Each time the user changes the window size or zooms, the ChunkCache is increased until we reach the initially estimated maximum. In case we hit that boundary, ZOOM is decreased automatically until the amount of visible Chunks matches the Cache again.
To achieve this, the ZOOM behavior was changed to:

a linear INDEX that is changed by the Mouse Wheel in increments of 1 for each typical scroll event
a zoom curve TABLE to map a desired zoom factor from the given index

Positive indices result in the well known zoom IN but with something like the new proposed exponential behavior. As it is implemented via a table-look-up any desired behavior is possible. I took Fibonacci numbers to achieve only integer multiples of Blocks.
Negative indices result in the new zoom OUT feature. Values are mapped like before:
-1 -> 2^1 -> 2:1
-2 -> 2^2 -> 4:1
-3 -> 2^3 -> 8:1
-4 -> 2^4 -> 16:1 one Chunk per pixel (maximum possible) demanding about 32..64G free RAM

The settings for experimental zoom out are removed, as it is working like desired.
Instead I added new settings to change the modifier keys which are used to determine what to do when the Mouse Wheel is scrolled. Default behavior is:

NO modifier key: normal zoom without the possibility the accidentally zoom out
CTRL modifier: zoom and also allow zoom out
SHIFT modifier: change the Depth Slider

Via keyboard, zoom out is always possible.
Please carefully review the changed zoom behavior.
Restricted zoom is something we can not circumvent anyway.

We might want to look at QEvent::TouchBegin etc for pinch to zoom etc in addition to the other zoom behaviour.

I do not have any touch devices running a Minutor build.
Another feature would be to zoom centered at current mouse position. This is the default behavior for Google Maps and other mapping applications users may be familiar with. Currently we zoom in the center of the window.


Support Schked 1.0

I released Schked recently https://github.com/bibendi/schked/releases/tag/v1.0.0 recently

Thanks for the pull request and congrats with schked 1.0!
However, tests are started to fail in redis gem (somewhere under Schked Redis locker). Maybe also add fakeredis to Gemfile?

I made Redis optional in a test environment.
Pushed schked 1.1.0.
I think we can just restart the tests.


Data generation fix.

LGTM!  Also- this is just part of synthetic testing, not mainline code right?  So fine if you just want to merge in I think?  Either way gets my stamp!


controllerServices undeploy not working as expected?

Howdy, as an extension of issue #12 - this is the problem I'm seeing with the controllerServices. I don't know if it's unique to this particular controller, or more, but the attached is an example flow with a DBCP controller that starts and works fine with a local postgres database I have, but refuses to undeploy. If halted and deleted manually, the deployment with NiFiDeploy.groovy works fine. The error encountered follows:
$ groovy NiFiDeploy.groovy -f dbtest.yml
Loading Process Groups from NiFi
Undeploying Controller Service: T1
[ERROR] HTTP call failed. Status code: HTTP/1.1 409 Conflict: This NiFi instance has been updated by 'anonymous'. Please refresh to synchronize the view.
Caught: java.lang.AssertionError: Terminated script execution. Expression: null
java.lang.AssertionError: Terminated script execution. Expression: null
	at NiFiDeploy$_run_closure2.doCall(NiFiDeploy.groovy:526)
	at groovyx.net.http.HTTPBuilder$1.handleResponse(HTTPBuilder.java:503)
	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1142)
	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1076)
	at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:515)
	at groovyx.net.http.RESTClient.put(RESTClient.java:163)
	at groovyx.net.http.RESTClient$put$0.call(Unknown Source)
	at NiFiDeploy._changeControllerServiceState(NiFiDeploy.groovy:510)
	at NiFiDeploy.stopControllerService(NiFiDeploy.groovy:470)
	at NiFiDeploy$_handleUndeploy_closure5.doCall(NiFiDeploy.groovy:78)
	at NiFiDeploy.handleUndeploy(NiFiDeploy.groovy:74)
	at NiFiDeploy.run(NiFiDeploy.groovy:539)

dbtest.zip
This is nifi 6.0.

Thank you, I will look into these in the next couple days.

Hi @hijakk . I've been testing this template re-deployment, and here's what I found.
I wasn't able to reproduce this particular error, but saw some other. I was able to get rid of them all by dropping the CS uuid reference from the deployment spec file, e.g.:
controllerServices:
  T1:
    state: ENABLED
    config:
      Database Connection URL: jdbc:postgresql://postgres/postgres
      Database Driver Jar Url: file:///opt/postgresql-9.4.1208.jre7.jar
processGroups:
  db service:
    processors:
      ExecuteSQL:
        config:
          # note this is dropped - Database Connection Pooling Service: bd5050da-d297-4e65-b73e-8209bf855670
          SQL select query: SELECT * FROM users;

I am able to re-deploy now. Would be interesting to see how the behavior changes when multiple CS of the same type exist and not auto-wired, will talk to the engineering team.

Confirming that removing the UUID reference in the processor appears to resolve the issue on my end too

Great, thanks for confirming.

Hey @hijakk , I might be onto something here, could you please update to the latest and have a few runs (with the UUID in YAML). I'm looking to see how the T1 controller UUID is changing (it seems to be different from the one in the template).

Howdy - different error for me this time. With the original file (with UUID) I'm getting:
Caught: java.lang.AssertionError: Client ID must be provided. Expression: client. Values: client = null
java.lang.AssertionError: Client ID must be provided. Expression: client. Values: client = null
	at NiFiDeploy.run(NiFiDeploy.groovy:544)

Actually, getting the same error even without UUID now

Yeah, that's just me closing a loophole, otherwise comment messages have 'null' as a user who made the change. Just ensure you have a client id specified either in the deployment spec or on cli.

Ah yeah, ok. Adding '-c' option works on the command line now. Both files (with/without UUID) successfully deploy, but the one WITH shows an error on the DB connection processor, as screen shotted here.

@hijakk I was able to get to the root cause of what was going on after talking to the NiFi team. Basically, NiFi will force-generate the new CS uuid upon template instantiation. The fact it works when uuid is omitted from a deployment stack is just a coincidence, it will break as soon as another CS of the same type is added.
To address this, I will be updating the code to resolve CS references by name.

Very interesting, thank you for the update and all the effort on this!
On Apr 25, 2016 6:59 AM, "Andrew Grande"<EMAIL_ADDRESS>wrote:

@hijakk https://github.com/hijakk I was able to get to the root cause
of what was going on after talking to the NiFi team. Basically, NiFi will
force-generate the new CS uuid upon template instantiation. The fact it
works when uuid is omitted from a deployment stack is just a coincidence,
it will break as soon as another CS of the same type is added.
To address this, I will be updating the code to resolve CS references by
name.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/aperepel/nifi-api-deploy/issues/14#issuecomment-214339846

Made improvements to support CS by reference. Check out https://github.com/aperepel/nifi-api-deploy/wiki/Advanced-Deployment-Spec-Syntax as well.


Xamarin change Icon File

Hi I tried to use Add version name sample to change the icon file on Android configuration  but is not working
The Android manifest is
android:icon="@drawable/icon"
my script line is , it is finding the file and updating the package name
sed -i '' 's/icon= "[a-z.@]*"/icon="'$APP_ICON'"/' $MANIFEST
the error form Appcenter is
sed: 1: "s/icon= "[a-z.@]*"/icon ...": bad flag in substitute command: 'i'
Thanks for your help.
Hernnado

Hi @hernandoz, probably your $APP_ICON variable contains the / character. Scape this character will solve your problem, e.g.:
APP_ICON = @drawable\/custom_icon
Another thing, your regex need contain every character your want to replace, so if the default value for icon is android:icon="@drawable/icon", your regex also needs the / character. Dot character is unnecessary in this case.
sed -i '' 's/icon="[a-z@/]*"/icon="'$APP_ICON'"/' $MANIFEST
I hope this help you!

Hi @ionixjunior , yes I did change the variable to APP_ICON = @drawable\/custom_icon
and also made some changes to this line using [[:graph:]]

The [[:graph:]] is same as [[:print:]], but matches non-blank characters like alphabets, special characters, numbers but excludes spaces, control characters  etc.

sed -i '' 's#icon=[[:graph:]]*"#icon="'$APP_ICON'"#' $MANIFEST
thanks for your help .


[1.9.3] Bump dcos-metrics version

High Level Description
What features does this change enable? What bugs does this change fix? High-Level description of how things changed.
Related Issues

DCOS_OSS-1451 Stale datapoints can occur in container metrics

Checklist for all PR's

[x] Included a test which will fail if code is reverted but test is not.
[x] Read the DC/OS contributing guidelines
[x] Followed relevant code rules Rules for Packages and Systemd

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[x] Change log from the last version integrated (this should be a link to commits for easy verification and review): example
[x] Test Results: link to CI job test results for component
[x] Code Coverage (if available): link to code coverage report

@collinvandyck and @darkonie , would you kindly review this when you get a moment please?

@mesosphere-mergebot label ready for review

@mesosphere-mergebot bump-ee

@mesosphere-mergebot bump-ee

@mesosphere-mergebot bump-ee

@margaret do you know about the teamcity/code-quality test failure on this PR? I don't want to remove the offending comments because I think they have some QA-related purpose, but the failure is holding up this PR.

The pep8 test will start passing as soon as https://github.com/dcos/dcos/pull/1776 is merged.


cropping the frame in imagenet.py classification code

Hello,
I trained my own classifier for traffic light color classification using this link:
https://github.com/dusty-nv/jetson-inference/blob/master/docs/pytorch-cat-dog.md
Following your instructions, it runs on camera feed using this command:
imagenet.py --model=$NET/resnet18.onnx --input_blob=input_0 --output_blob=output_0 --labels=$DATASET/labels.txt csi://0
Now I need to crop several traffic lights from each frame and run the classifier on them. How do I crop the traffic lights from each frame in the imagenet.py python code and run it?  Where is the imagenet.py code located?
Please reply to this question since it is crucial for our application.
Regards,
Farouq

Do you know where the bounding-box coordinates of the traffic lights are that you want to crop?   If not, you'll need to use/train a detection model instead.  There is detectnet-snap.py which does a similar cropping thing with the detection results.

Yes I know  the traffic light coordinates.
My question is how to crop the frame in the imagenet.py code ?
Where is the imagenet.py code on the jetson? How di I change it?
On Thu, Dec 29, 2022 at 6:33 PM Dustin Franklin @.***>
wrote:

Do you know where the bounding-box coordinates of the traffic lights are
that you want to crop? If not, you'll need to use/train a detection model
instead. There is detectnet-snap.py
https://github.com/dusty-nv/jetson-inference/blob/master/python/examples/detectnet-snap.py
which does a similar cropping thing with the detection results.
—
Reply to this email directly, view it on GitHub
https://github.com/dusty-nv/jetson-inference/issues/1538#issuecomment-1367676547,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6BHIB2ORXP27GW4EYKJRDWPY3W3ANCNFSM6AAAAAATMPWGOU
.
You are receiving this because you authored the thread.Message ID:
@.***>

The imagenet.py code is located in your jetson-inference directory under jetson-inference/python/examples/imagenet.py
After you make changes to this script, you can either run it from that directory, or re-run the following commands so that it is installed into your bin dirs:
cd jetson-inference/build
cmake ../
make
sudo make install

There is some example of cropping an image with CUDA here:  https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-image.md#cropping

Thanks so much ! great response.

Hi,  I tested the crop method. The crop works fine when I test it on a single image and the predicted class is also correct.
When I change the input from image to camera, the predicted class becomes wrong. What is the reason for this issue?
When using camera, In the out put that the imagenet.py prints on the console, it show only 2 classes (red, green) and their confidence but I have three classes (red, green, yellow).
Here is the output I get when using camera and the traffic light is yellow. Why it does not print the third class here?
class 0000 - 0.873937  (green)
class 0001 - 0.124984  (red)
I printed the img and the cropped image info too:
img
-- ptr:      0x218161000
-- size:     6220800
-- width:    1920
-- height:   1080
-- channels: 3
-- format:   rgb8
-- timestamp: 116.789597
-- mapped:   true
-- freeOnDelete: false
crop_img
-- ptr:      0x214059c00
-- size:     4485
-- width:    23
-- height:   65
-- channels: 3
-- format:   rgb8
-- timestamp: 116.789597
-- mapped:   true
-- freeOnDelete: true
crop_img width 23
crop_img height 65
This is also the code  I added to imgenet.py:
capture the next image
img = input.Capture()
print('img',img)

# allocate the output image, with the cropped size
imgOutput = jetson.utils.cudaAllocMapped(width=right-left,height=bottom-top,format=img.format)

    # crop the image to the ROI
jetson.utils.cudaCrop(img, imgOutput, crop_roi)

# classify the image
class_id, confidence = net.Classify(imgOutput)

print('class_id', class_id)
print('confidence', confidence)
print('crop_img',imgOutput)
print('crop_img width',imgOutput.width)
print('crop_img height',imgOutput.height)

Please let me know how to fix this problem since my application is camera based.
Thanks so much for your help.

I found the issue. My light coordinates were not correct on the camera video feed.


Python 3.12 compatibility

While Python 3.12 is still in development, Fedora 39 will be released with it this fall around the time of the Python 3.12 final release, and the development version of Fedora Linux is alread moving to a Python 3.12 pre-release.
When yte is tested with Python 3.12, a number of tests fail.
==================================== short test summary info =====================================
FAILED tests.py::test_for - yte.exceptions.YteError: Error processing template in section /?for i in range(2)/?f"key{i}":...
FAILED tests.py::test_variable_definition3 - yte.exceptions.YteError: Error processing template in section /?for item in ["foo", "baz"]/?i...
FAILED tests.py::test_colon - yte.exceptions.YteError: Error processing template in section /?for sample in ["normal", "tum...
============================ 3 failed, 38 passed, 5 warnings in 0.18s ============================

I will include full test output in a follow-up comment.
All of these seem to have to do with the availability of the for-loop variable for substitution in the template. However, I haven’t dug deeply into yte before, and it isn’t immediately obvious to me what needs to be fixed.

Patch to work around https://github.com/ialbert/plac/issues/65 for testing.
0001-Remove-server-functionality.patch

Full test output

Although the templates here appear to use traditional for-loops rather than generators or comprehensions, I wonder if https://github.com/python/cpython/issues/105340 is nevertheless somehow relevant.

Trying again with Python 3.12.0b4, it seems like this was resolved in CPython and will be working for the final release of 3.12.


Must pass array or slice to 'where'; received &[pointer]

Can't tell if I'm crazy. I'm running docker-gen 0.4.0 and trying to use where with $. Going by the example here this should work... I thought.
{{ $c := where $ "Env.VIRTUAL_STACK" "true" }}

I'm getting:
template error: template: nginx.tmpl:60:11: executing "nginx.tmpl" at <where $ "Env.VIRTUAL...>: error calling where: Must pass an array or slice to 'where'; received &[0xc208000c60]

What am I missing? Thanks!

@berfarah It looks like that error is fixed in commits that were made post 0.4.0 (see https://github.com/jwilder/docker-gen/compare/0.4.0...master). The example given in #97 assumes those changes have already been made.

This change in particular: https://github.com/jwilder/docker-gen/commit/3a8ad43c7dc3e46a7141e6e55ca8ccd5e60fb7bb#diff-4779dc22f7a7835ae9d75daa70021ad8R37

Got it, thanks @md5! Faulty reading comprehension on my part. Is there an ETA for the next release?

If you ask @jwilder nicely I expect a new release could be made soon :+1:

@jwilder Please sir, can I have some more... releases? :smile:

Done!


Undefined just left instead of username just left in some cases

This is the case when someone closes the tab without creating an username directly from the first "What's your nickname?" page.

@HitRam This issue is not fixed.


Approval of pull requests

@Eloston I've noticed that even very basic pull requests can take upwards of a week or longer to get accepted at times. I expect this varies with how busy you are with other things.
As it stands these delays can cause delays with deployment of security patches as I often have to wait for this upstream repository to update before I can push out new builds to my PPAs.
I think it would help greatly if we had additional trusted users that could approve relatively minor pull requests such as minor version bumps within the same major series. What do you think of this idea?

You may use a commit id from a pull request.
See my ebuild for gentoo for example.

That doesn't really help for updating the official packaging repositories for debian and such though. It requires the commits to already be in this repository AFAIK.

I manually patch ungoogled-chromium's tarball with the PR's patches whenever something important comes up.
But yeah, ungoogled-chromium suffers from the bus factor, that has to be fixed.

This is not a bad idea. I think GitHub now has a way to let other users approve PRs and manage issues without having write access.
I also want to grant some people write access at some point in the future, so this might help me figure that out.

Hmm I think I'll have to move this repo to ungoogled-software to allow people to triage issues. People can already review PRs; in fact I just recalled it's stated in docs/contributing.md
But after re-reading, did you mean you want people to approve and merge small changes? In that case, I think we can setup GitHub Actions to check if the PR is "small", and then perform the merge if it's approved by a trusted set of users (people that I trust based on contribution history).

Yes at the very least it seemed like a good place to start. Maybe eventually some people can have full access like yourself. As for automating detection for small changes how would that be defined? I would think small changes would be things like:

Any changes to .md files or other files that do not effect any actual code execution
Any changes to patch files that only change the offset lines and nothing else
Any changes to the revision number
Changes to the Chromium revision number that only change the last set of digits
Any other changes necessary to perform a minor version bump

As for automating detection for small changes how would that be defined? I would think small changes would be things like:

Yeah that is a bit challenging to define. However, I think what you listed out is pretty comprehensive. To extend a bit more on them:

Any changes to .md files or other files that do not effect any actual code execution
Any changes to patch files that only change the offset lines and nothing else

I think we can do better than that:

For both Markdown and patches, compute a similarity score between the changed lines. If it's too different, then we could abort auto-merging.

This algorithm may also be able to check for new or removed lines too. If the sum of total added lines with total removed lines exceeds a threshold, then we can abort auto-merging.
I don't know much about similarity metrics out there, but I know there are diffing algorithms in mdoern IDEs and such that can determine changed, added, and removed lines. It's not perfect, but it does a good enough job.

For patch files, we'd only consider the actual lines added and removed; not context lines, hunk headers, or file headers. But, we should consider comment lines (i.e. all lines that are ignored by GNU patch in the patch file)

Any changes to the revision number

I'm guessing you also want to include minor Chromium updates, not just to ungoogled-chromium's revision number.
We'd also want all CI checks to pass before we auto-merge too. Which means we should re-evaluate the entire PR every time the contributor makes a push.
In addition, we should support this for platform repos as well. Also, with some different restrictions, I think we can support ungoogled-chromium-binaries.
Now if we automatically generated PRs for new Chromium versions... but, one step at a time :)

Eventually being able to dispatch builds in the downstream repositories to a build server would be nice as well. The PPA I setup is mostly a stop gap and unfortunately a service like OBS only really supports the Linux based setups. Incidently though I recall that Linux can cross-compile for Windows but I do not know if Chromium supports being cross-compiled.

Small update. I was given write permissions to the Debian repository so this part is addressed. But there's still other repositories we could use some trusted maintainers for or another solution.

But there's still other repositories we could use some trusted maintainers for or another solution.

I agree. For anyone reading this: If you've been making contributions to a platform repo and would like to become a maintainer for that repo, let me know.


Support for multi-part configurations

Summary
Implement support for multi-part configurations. This allows administrators to apply configuration updates in a specific order, without having to rely on the implementation order (and possibly having scenarios being blocked by the implicit implementation order in which operations are applied.
Testing
Unit tests
Example
Simply use a multi-document YAML as configuration file. For example:
1. Apply configuration before enabling addons
---
version: 0.1.0
extraKubeletArgs:
  --cluster-domain: cluster.local
  --cluster-dns: <IP_ADDRESS>
---
version: 0.1.0
addons:
  - name: dns

In this scenario, the administrator wants to apply some kubelet configuration before enabling the dns addon.
2. Apply configuration after enabling addons
---
version: 0.1.0
addons:
  - name: dns
---
version: 0.1.0
extraKubeletArgs:
  --cluster-domain: cluster.lan

In this scenario, the administrator wants to apply some kubelet configuration after having enabled the dns addon. Using a multi-part document, they can clearly define the "order" of the operations.

Also update Go to 1.19 and staticcheck version since there is an issue with the added k8s.io/apimachinery dependency in prior versions.


Improve the trailing slash for S3

The following config will lead the wrong path for s3. The code should handle this more gracefullly.
controller.data.dir=s3://<bucket_name>/controller/
->
s3://<bucket_name>/controller//epoch_table/epoch_table__0__0__20230210T1100Z

Please assign this issue to me.

Here is the PR for the fix. Please review. Thanks


add high-contrast theme

All Submissions

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions

[x] Does your submission pass tests?
[x] Have you lint your code locally prior to submission?

Changes to Core Features

[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your core changes, as applicable?
[x] Have you successfully ran tests with your changes locally?

@tranthaituananh Thanks for your contribution! 🎉

I'm overjoyed to be able to help in some little way with this fantastic project


Improve android payment

fixed a bug requestPurchased that can't get all information if user purchased many items and not consumed
added querySkuDetails to get detail information of IAP items.
clean unnecessary codes and styles.

The price of in-app item has different value along user's country on android.
with querySkuDetails, we can display actual price and currency along user's country.
I tested it Android 19, 23 devices and made demo for it.
https://github.com/godotengine/godot-demo-projects/pull/6
And this PR need #5390 also, because querySkuDetails uses java string array.

@punto- Could you have a look?
@volzhs Nice work! For a next time, please try to do the code cleanup in a separate commit, because right now it makes it harder to see what changed functionally due to various cosmetic fixes.

@akien-mga got it :)

I've never used this api on android.. Is there any chance that we could
make this api and the ios one similar? I don't mind using callbacks vs
message queues, but at least we should fix the method names to conform with
our coding style (like callback_success instead of callbackSuccess, etc). I
don't know why they were like that in the first place, I think someone at
Okam made it for Carnaval?
On 26 June 2016 at 04:59, Rémi Verschelde<EMAIL_ADDRESS>wrote:

@punto- https://github.com/punto- Could you have a look?
@volzhs https://github.com/volzhs Nice work! For a next time, please
try to do the code cleanup in a separate commit, because right now it makes
it harder to see what changed functionally due to various cosmetic fixes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/5415#issuecomment-228589382,
or mute the thread
https://github.com/notifications/unsubscribe/AGVmPZFMS0DIyIB1voKB9_zWKsYK0DiYks5qPjFVgaJpZM4I-ZjR
.

@punto-
AFAIK, ios has similar one.
https://developer.apple.com/library/mac/documentation/StoreKit/Reference/SKProductsRequest/
And the coding style thing, I thought, Godot dev team follows java coding style for .java
So I followed legacy codes, and I think it's fine java style with .java and gdscript style with callback to gdscript.

What I mean is from the point of view of the game, there's no reason why
the codebases to implement IAP in iOS and Android should be wildly
different.. They both have the "purchase" method, but all the other methods
on Android are different, and I think android uses callbacks and ios uses a
message queue, it should be possible to make both apis very similar, with
only minor differences in the parameters and responses for each platform..
On 26 June 2016 at 12:37, volzhs<EMAIL_ADDRESS>wrote:

@punto- https://github.com/punto-
AFAIK, ios has similar one.
https://developer.apple.com/library/mac/documentation/StoreKit/Reference/SKProductsRequest/
And the coding style thing, I thought, Godot dev team follows java coding
style for .java
So I followed legacy codes, and I think it's fine java style with .java
and gdscript style with callback to gdscript.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/5415#issuecomment-228607147,
or mute the thread
https://github.com/notifications/unsubscribe/AGVmPUU8u5ptbTWRY7Z6MyUb7jWfz-2Qks5qPpyegaJpZM4I-ZjR
.

the iOS implementation is here btw
http://docs.godotengine.org/en/latest/reference/services_for_ios.html,
there's only "purchase" and "request_product_info"
On 26 June 2016 at 12:54, Ariel Manzur<EMAIL_ADDRESS>wrote:

What I mean is from the point of view of the game, there's no reason why
the codebases to implement IAP in iOS and Android should be wildly
different.. They both have the "purchase" method, but all the other methods
on Android are different, and I think android uses callbacks and ios uses a
message queue, it should be possible to make both apis very similar, with
only minor differences in the parameters and responses for each platform..
On 26 June 2016 at 12:37, volzhs<EMAIL_ADDRESS>wrote:

@punto- https://github.com/punto-
AFAIK, ios has similar one.
https://developer.apple.com/library/mac/documentation/StoreKit/Reference/SKProductsRequest/
And the coding style thing, I thought, Godot dev team follows java coding
style for .java
So I followed legacy codes, and I think it's fine java style with .java
and gdscript style with callback to gdscript.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/5415#issuecomment-228607147,
or mute the thread
https://github.com/notifications/unsubscribe/AGVmPUU8u5ptbTWRY7Z6MyUb7jWfz-2Qks5qPpyegaJpZM4I-ZjR
.

@punto-
I didn't test on ios for request_product_info function.
but in my test with querySkuDetails for android,
game frozen for a few seconds to receive all data if without thread.
So, I need to use callback for it.
I don't know how it works on ios.

the iOS implementation is here btw
http://docs.godotengine.org/en/latest/reference/services_for_ios.html,
there's only "purchase" and "request_product_info"

on Google play store,
app needs to consume what user purchased.
A user can't purchase same item again without consume it.
It's manageable item.
So, we can requestPurchased, it can be used, like removing ADs, expand slot or something even if user removed app and re-install it later.
It's not like Apple's one.
I think, it's because of market.
It could be better we can make a unified solution for every markets.
But, personally, everybody needs to know how market runs if they want to launch their game on those markets.
We can't cover up all market's policy or changes in unified solution.

@punto-
AFAIK, app should implement "restore purchase" something like that on iOS if app should restore something what user purchased, isn't it?

I know that you should know what specific store you're using, but for a
minimal use case both APIs can be the same, I know because we shipped games
doing that (this is "version 3" of the api, but version 1 was the same in
ios and Android). iOS also has consumable and non-consumable items, there's
not a huge difference between them..
On 26 June 2016 at 13:30, volzhs<EMAIL_ADDRESS>wrote:

@punto- https://github.com/punto-
AFAIK, app should implement "restore purchase" something like that on iOS
if app should restore something what user purchased, isn't it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/5415#issuecomment-228609571,
or mute the thread
https://github.com/notifications/unsubscribe/AGVmPaymcP93H0rw5cYxVVhWnqP6QB6Qks5qPqkRgaJpZM4I-ZjR
.

I'd not used version 1, so yes, the minimal thing could be same.
I think, it's still same if godot user use minimal usage for IAP on both android and ios, but I made enhanced version IAP for android guy.
We can make an unified IAP class if we could in the future because we have advanced codes. :)

I personally also have same method for IAP on whatever platform.
Yes, I understand what punto said and worried about.
Can keep this PR until enhanced iOS IAP or UWP PR comes. :)

I just found recently, there are some people who wants to know how to implement android IAP in Godot,
and bug for something, unimplemented for something.
So, I made it this PR.
I wish this PR and https://github.com/godotengine/godot-demo-projects/pull/6 could help.

Ok so for this PR specifically, you say the call to querySkuDetails is
blocking? we can't have that, it has to run on background and use a
callback like the others (for example "purchase")
On 26 June 2016 at 13:59, volzhs<EMAIL_ADDRESS>wrote:

I just found recently, there are some people who wants to know how to
implement android IAP in Godot,
and bug for something, unimplemented for something.
So, I made it this PR.
I wish this PR and godotengine/godot-demo-projects#6
https://github.com/godotengine/godot-demo-projects/pull/6 could help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/5415#issuecomment-228610922,
or mute the thread
https://github.com/notifications/unsubscribe/AGVmPfVgIzCJa6jWBgiHm7McVkkMcYrWks5qPq_4gaJpZM4I-ZjR
.

@punto- definitely

Having a generic IAP API based on plugins would be really good, it could work with Steam too

Needs testing from Android IAP users. @kubecz3k maybe?

rebased

@akien-mga I will test this in Saturday, sorry for such delay!

First observation: when compiling templates from @volzhs fork compilation fails because of:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'java'.
> failed to find target with hash string 'android-23' in: /home/kubeczek/dev_tools/android/android-sdk-linux

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Android api 23 is the newest Android 6.0... does this means that this commit needs android 6.0? As far as I know godot compilation should work for api levels as low as 14 (android 4.0).
Will download android 6.0 sdk and will try again.

@kubecz3k I don't think it's related to this specific PR. As I understand it, you need the SDK for android-23 to compile the APK, but it does not mean that it will only support this version.

I can confirm this is working correctly, I was able to fetch in app items data like local price and currency with new querySkuDetails function :+1:


[Question] How to compare two JSONs with some fields ignored

Currently, I would like to compare two JSONs with some fields ignored
There is an example to demonstrate my thoughts.
Input:
{
    "code": 0,
    "msg": "OK",
    "data": {
        "uuid": "123",
        "name": "foo",
 	"age": 10
    }
}

some JSON to compare:
{
    "code": 0,
    "msg": "OK",
    "data": {
        "uuid": "456",
        "name": "foo",
 	"age": 10
    }
}

The only difference between the two JSONs is the field uuid.
Therefore, is there a way that jsondiff can ignore the uuid field ? I mean the Patch that returned from jsondiff.Compare() should be nill  because the field uuid is ignored.
I'm look forward your response, thanks.

Hello. The package doesn't know how to exclude a field, it compare the source and dest completely.
I recommend that you edit the json documents before doing the diff by removing the uid field.

Hello. The package doesn't know how to exclude a field, it compare the source and dest completely. I recommend that you edit the json documents before doing the diff by removing the uid field.

Thanks for your reply. Removing the uuid field before doing the diff is not what I want to do.
For those who want to do the same thing just like me, BTW for my example is to do Integration Testing for my own WEB API project, I highly recommend another package called google/go-cmp. It can easily deal with this problem.
Still thanks for your package, it's really great.

I get it, but not all specific cases can and should be supported directly in the package. It adds in complexity and performance cost.
The scope of go-cmp and jsondiff are not quite the same, since the former is focuses on equality comparison of go values, while the latter generates a JSON Patch output. Given the use case that you mentioned, I think that this package was not the best fit for you anyway.


dist/js/AdminLTE.js not found

is your bower.json right?

AdminLTE.js is now app.js

sry cannot see it right now. Perhaps it takes some time.

What command are you using?

HI,
Im just Webbrowsing and use sonata-admin-bundle, which uses the master-branch
tried bower install https://github.com/almasaeed2010/AdminLTE.git#master

you should only use usable releases since the master branch changes a lot and contains known errors. Use this command instead
bower install admin-lte

okay thank you,
But isnt master broken, since there is no AdminLTE.js. What do I miss

This installaltion looks good. But a verification over sonata will not be easy. But I will repond then.

AdminLTE.js was available for v1 only. AdminLTE 2.0 uses app.js instead.
Unfortunately I am not familiar with sonata. What is it?

It's a symfony2 backend. It's okay, it looks good, but its not stable enough in my mind, the documentation isnt deep enough. Known restriction are not obvious and you cant easily research them. A little too big and coupled. But it's new and the community seems very big and busy, in some way you can very easy establish basic CRUD-Actions which are nicly configurable.
Frontend is too modern in my mind - not my cup of tea anymore - especially if its nearly impossible too handle relations deeper as 2 Level in one screen or even wizards. This is the maingoal in my mind and even if it seems simple you dont have to do it. Simplicity vanished in a mud of files. bla bla bla - sry

Thanks for the information! If there is anything else we can assist you with, please let me know. Otherwise, we'd appreciate it if you close the issue.  My bad.


Challenge http://www.freecodecamp.com/challenges/waypoint-use-clockwise-notation-to-specify-the-margin-of-an-element has an issue

In the instructions for the margin, you have the pixel setting for "Top" to 20px instead of 40px.

Thanks, commit 119060dc3f8df694bd2ee5214a3fb590fc6210d6 addresses this.


edtlib: Add support for retrieving nodes by property labels

Some DT nodes have a 'label' property that is useful to filter on. Add an OrderedDict of prop_label2node containing nodes that have a 'label' property. The key will be the 'label' value.
Fixes #41523

@mbolivar-nordic, I'm open to suggestions on how to address the root problem.
Another potential way to fix this is to get this groove display to actually have a DT node definition instead of the current method where it it defines a device node programmatically in the driver file using a Kconfig define to set the node name, which currently defaults to I2C_0. Then a board should have an overlay or some sort for the display and the filter could use the existing set of filters to filter on the higher level node information being there with an okay status. I'm not really interested in doing this to the groove display since I don't have one and didn't add this to the repo.
Currently though, the display doesn't do this and the sample.yaml is only using a "depends" filter of i2c. So our platform gets selected because it "has" an i2c but since it doesn't have anything actually connected to the i2c and doesn't have the I2C_0 node status set to okay causing the nightly build CI to fail ... I suspect that any other platforms will have a similar problem if they don't have the I2C_0 enabled.
My other fallback to address the problem is to add a platform exclude for our particular board and move on. But I wanted to figure out what information I could use from the device tree that is generic enough to filter on. I don't understand though why the i2c individual nodes have a "label" property but figured I could filter on that since this seems to be a standard. I could have just touched the twister expr_filter.py and programmatically walked through the properties looking for the label that matches the filter (this is how I originally had it) but figured it might turn out to be more useful to move this up into edtlib.py.

I agree with @mbolivar-nordic that the approach feels wrong.
Adding this function opens the pandora box on something that has actively been pushed back for years (use of labels), with the reason it is arbitrary and could not be sanitized by dtc (naming conflicts can't be detected).
There are a lot of other ways to sort this that are already used in other samples. Main ones being platform_allow and platform_exclude. I agree that these aren't a panacea as they scale difficultly.
Though then main issue here is that the grove driver isn't ported to device tree (from what I can see). Otherwise one could use already available functions like:
    filter: dt_compat_enabled("grove,display")

So waiting for this driver to be ported to device tree, I think that platform_allow or platform_exclude would be acceptable (even if not ideal, I concur).

@erwango, that was what I wanted to do in the first place but without the display being in device tree I could do that.
I will submit a new PR to just exclude my platform and move on.
I do think though that there might be value in having support for generic filtering based on items in the device tree. This PR is not generic but we might consider a tweak of this to allow filtering on any node/property path definition.

I will submit a new PR to just exclude my platform and move on.

Ok, fine.

I do think though that there might be value in having support for generic filtering based on items in the device tree. This PR is not generic but we might consider a tweak of this to allow filtering on any node/property path definition.

What I'm afraid of, with adding a function for filtering on labels, is that people will want to use it (as it could be seen as
convenient and easy to use) and we'll see more and more work around labels which we'll struggle to push back.
But otherwise, any other kind of filtering helpers are welcome for sure.


Add 'unsafeSplits' for generic vectors

This is the same as X.Data.ByteString.unsafeSplits but for vectors.
/cc @amosr @tranma

I'd buy that for a dollar

cool 💯

I need this for zebra, so I might merge and leave mapAccumulate for another day, have made an issue


PHP Mobile detection scrips can't work with full page redis caching (Solved, could this be added to core?)

I have a photo gallery that requires a php mobile detection script to format the gallery differently for touch devices. At the moment full page redis cache breaks any mobile detection scrips because it caches the page based on the device that hit it last.  I need a way to cache mobile devices separately from desktop browsers perhaps by using useragent list.  I know this can be done with w3tc, is there any possible way to implement this with redis caching?
Please attach the output of following command when open a new support request.

[No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial] lsb_release -a
[ EasyEngine v3.7.4
Copyright (c) 2016 rtCamp Solutions Pvt. Ltd.] ee -v
[NGINX (1.10.0):

user                             www-data
worker_processes                 auto
worker_connections               4096
keepalive_timeout                30
fastcgi_read_timeout             300
client_max_body_size             100m
allow                            <IP_ADDRESS>
PHP (5.6.26-2):
user
expose_php                       Off
memory_limit                     128M
post_max_size                    100M
upload_max_filesize              100M
max_execution_time               300
Information about www.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  100
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   off
listen                           <IP_ADDRESS>:9000
Information about debug.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  100
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   on
listen                           <IP_ADDRESS>:9001
MySQL (10.1.18-MariaDB) on localhost:
port                             3306
wait_timeout                     600
interactive_timeout              28800
max_used_connections             9
datadir                          /var/lib/mysql/
socket                           /var/run/mysqld/mysqld.sock
my.cnf [PATH]                    /etc/mysql/conf.d/my.cnf ] ee info

[PHP binary:  /usr/bin/php7.0
PHP version:    7.0.11-2+deb.sury.org~xenial+1
php.ini used:   /etc/php/7.0/cli/php.ini
WP-CLI root dir:    phar://wp-cli.phar
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 0.24.1 ] wp --allow-root --info

I was looking for this situation.
1 - Add this config to http block at nginx.conf file
map $http_user_agent $ua_mobile {
default 'no';
~(iPhone|Android) 'yes';
}
2 - Add $ua_mobile variable to config at redis.conf file which located /etc/nginx/common
set $key "nginx-cache:$scheme$request_method$host$request_uri**$ua_mobile**";
you can also add optional header for debugging.
add_header mobile $ua_mobile;

I'd setup same stuff for NGINX FastCGI - https://miteshshah.github.io/linux/nginx/how-to-setup-separate-nginx-fastcgi-cache-for-mobile-and-desktop-users/

Sadly lutfuahmet solution does not seem to be working.  I've got the header working for troubleshooting and it does detect mobile vs not, but it's still serves up the same cached page for both.  Are you sure your solution works for redis full page caching?  Not just the redis object cache.

Yeah, lutfuahmet solution is working!  I forgot I'm using php7 so I had to edit the redis-php7.conf file instead.  After I figured that out it seems to work!  I think this should be part of the easyengine setup a lot of plugins use mobile detection keeping a separate cache doesn't seem like a big deal.  Thanks again!

Would it be possible for this fix to be implemented in the core of easyengine?  It would just be a couple of lines of code and would probably solve issues for a lot of users.

+1

@rsmith4321 while it is possible to add such codes in the core, we recommend using responsive design rather than doing mobile detection.
The biggest challenge with this kind of nginx config is to purge cache correctly for all variant when a page is modified. We needed to modify nginx-helper for a client. Case study https://rtcamp.com/work/vanguard-ngr/
In EE v4, we plan to cut down the number of caching option we support. Maybe once we do that we can revisit the topic.

Dupe of https://github.com/EasyEngine/easyengine/issues/424

@rsmith4321 while it is possible to add such codes in the core, we recommend using responsive design rather than doing mobile detection.
The biggest challenge with this kind of nginx config is to purge cache correctly for all variant when a page is modified. We needed to modify nginx-helper for a client. Case study https://rtcamp.com/work/vanguard-ngr/

Do you mind sharing this version of nginx-helper? Could be helpful, if you are fine with it.

This was like 3 years ago I don't use mobile detection anymore.

@rsmith4321 Sure. That was actually a ping for @rahul286
Whereas in most cases, this is not needed anymore, I was just curious if can someone share a purging solution based on the above, since I faced a similar setup lately:
Its purpose of implementation was to serve desktop version to every other visitor, except if he was using a mobile device. For specific mobile devices that match a filter, a third version of the website should be served, providing different code than the responsive version.
Those filters were applied in order to prevent older mobile devices from loading a complete responsive version of the website that would slow them down, so for this purpose, they had to separate Redis desktop/mobile keys and they can still clear it completely, but they are unable to auto-purge upon new post using nginx-helper, just because of the added key.

Hey @ggloveswp, You can check this quick doc we've written. It describes how you can solve this particular problem on EE4.
Although for now, this solution includes modifying files of the nginx-helper plugin, there is an upcoming version of the plugin which will add filters so that you won't have to modify the plugin files.

Hey @ggloveswp, You can check this quick doc we've written. It describes how you can solve this particular problem on EE4.
Although for now, this solution includes modifying files of the nginx-helper plugin, there is an upcoming version of the plugin which will add filters so that you won't have to modify the plugin files.

Lots of thanks for your awesome reply and your helpful guide.
Im still using EEv3 due to the nature of this project that is not able to welcome a dockerized setup, but it worked flawlessly on different paths.

@kirtangajjar bumping this thread up to ask you how do you handle device detection based on useragent and non-webp-supported browsers.


Can't pass Apple review with the webview_cef

Hello,
Version is 0.2
I got the following answer from Apple Review Team:
Describe the bug
Since a cap of weeks ago I can't publish the new version of mine application to App Store. The Apple Review Team sent the following message.
Review date: August 16, 2024

Build version reviewed: 1.0.0 (24)

Guideline 2.5.1 - Performance - Software Requirements

Your app uses or references the following non-public or deprecated APIs:

Contents/Frameworks/Chromium Embedded Framework.framework/Versions/A/Chromium Embedded Framework

Classes:

• CAContext

• NSAccessibilityRemoteUIElement

• NSNextStepFrame

• NSThemeFrame

• CALayerHost

Symbols:

• _sandbox_compile_string

• _dyld_dynamic_interpose

• __NSAppendToKillRing

• _AudioDeviceDuck

• __kLSOpenOptionAddToRecentsKey

• __kCFSystemVersionProductVersionExtraKey

• _CTFontDescriptorIsSystemUIFont

• __NSYankFromKillRing

• __NSInitializeKillRing

• __CFCopySystemVersionDictionary

• __CFURLCopyPropertyListRepresentation

• __kLSOpenOptionActivateKey

• _CGFontRenderingGetFontSmoothingDisabled

• __kCFSystemVersionProductNameKey

• __NSNewKillRingSequence

• _IOBluetoothPreferenceSetControllerPowerState

• _sandbox_set_param

• _CGSSetDenyWindowServerConnections

• __kLSOpenOptionHideKey

• _CGDisplayUsesForceToGray

• __LSSetApplicationLaunchServicesServerConnectionStatus

• _responsibility_get_pid_responsible_for_pid

• __kCFSystemVersionProductVersionKey

• _sandbox_free_params

• __kCFSystemVersionBuildVersionKey

• _sandbox_create_params

• __kLSOpenOptionBackgroundLaunchKey

• _NSTextInputReplacementRangeAttributeName

• _CFStringGetRangeOfCharacterClusterAtIndex

• _SetApplicationIsDaemon

• __LSOpenURLsWithCompletionHandler

• __NSSetKillRingToYankedState

• __kLSOpenOptionArgumentsKey

• _responsibility_spawnattrs_setdisclaim

• __CFURLCreateFromPropertyListRepresentation

• _sandbox_free_profile

• __kLSOpenOptionPreferRunningInstanceKey

The use of non-public or deprecated APIs is not permitted on the App Store, as they can lead to a poor user experience should these APIs change and are otherwise not supported on Apple platforms.

Next Steps

It would be appropriate to revise your binary and remove any references to the non-public or deprecated APIs identified above.

If you are using third-party libraries, update to the most recent version of those libraries. If you do not have access to the libraries' source, the following command line tools can help you identify the location of problematic code:

    The "strings" tool can output a list of the methods the library calls.

    The "otool -ov" tool will output the Objective-C class structures and their defined methods.

Resources

    We are constantly reevaluating and identifying non-public APIs that you may have been using for an extended period of time. Always use public APIs and frameworks and ensure they are up to date.

    If there are no alternatives for providing the functionality your app requires, you can use Feedback Assistant to submit an enhancement request.

Support

    Reply to this message in your preferred language if you need assistance. If you need additional support, use the Contact Us module.

    Consult with fellow developers and Apple engineers on the Apple Developer Forums.

    Help improve the review process or identify a need for clarity in our policies by suggesting guideline changes.

    Request a 30-minute online meeting with an App Review expert to discuss the guidelines and best practices for a smooth review process.

Can you please remove the deprecated calls and symbols?
To Reproduce
Steps to reproduce the behavior:
Make build/download existing of CEF universal build
Include the CEF to a project (we use [webview_cef](https://pub.dev/packages/webview_cef) component in our case.
Publish the assembly to App Store
See error

Expected behavior
App review should not have any errors in CEF library
Screenshots
N/A
Versions (please complete the following information):
OS: [MacOS 14.0]
CEF Version: [128.4.5+gc1d356f+chromium-128.0.6613.18]
webview_ce - 0.2.0

Additional context
N/A
Need your assistance with the issue. No I can't user the view in mine MacOS application

You can't pass apple's review when using CEF. There's no chromium based application/browser in  mac appstore. If you really want your app  live on appstore, use webkit webview instead.


Updates to .firefox 52.0 with New Languages

Including New Languages. Included language list.
— Español (de Argentina)
— Español Español (de Chile)
— Español (de España)
— Hindi
— Português (do Brasil)

@gobinathm It seems you never activate the “allow edits from maintainers” checkbox. You really should, as it would make your submissions accepted faster, if we could fix the mistakes.

@vitorgalvao sure will ensure its corrected in future + open pulls

@vitorgalvao FYI i just noticed, some pull requests does not have that check box enabled. Many already have it.


Added position controls

Implemented three position-related functions for the Window struct: position, set_position, and the on_position_changed callback.
It's worth mentioning that I am very unsure on the details of how the callbacks work, so that I'm not super confident that on_position_changed is correct. However in testing, it seemed to be working as intended, so hopefully it's implemented properly and idiomatically.

Thanks a lot! I cherry picked the commit directly from your repo to rewrite the commit message. See commit 86138946d55. Merging this PR via Github is thus no longer necessary.

Perfect, works for me!