[SPARK-14819] [SQL] Improve SET / SET -v command

What changes were proposed in this pull request?
Currently SET and SET -v commands are similar to Hive SET command except the following difference:

The result is not sorted;
When using SET and SET -v, in addition to the Hive related properties, it will also list all the system properties and environment properties, which is very useful in some cases.

This JIRA is trying to make the current SET command more consistent to Hive output.
How was this patch tested?
Current test cases SQLQuerySuite and HiveQuerySuite should have enough test coverage.

Test build #56582 has started for PR 12583 at commit 01d3e5a.

Test build #56582 has finished for PR 12583 at commit 01d3e5a.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56582/
Test FAILed.

Test build #56585 has started for PR 12583 at commit 790cfda.

You might need to rebase this in a bit because i'm refactoring all of these quite heavily for Spark 2.0.

Test build #56585 has finished for PR 12583 at commit 790cfda.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56585/
Test FAILed.

Merged build finished. Test FAILed.

Test build #56603 has started for PR 12583 at commit 2a077bd.

Test build #56603 has finished for PR 12583 at commit 2a077bd.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56603/
Test FAILed.

Merged build finished. Test FAILed.

Test build #56636 has started for PR 12583 at commit e3ba716.

Test build #56636 has finished for PR 12583 at commit e3ba716.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56636/
Test FAILed.

Test build #56651 has started for PR 12583 at commit c6805e4.

Test build #56651 has finished for PR 12583 at commit c6805e4.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56651/
Test FAILed.

Test build #56653 has started for PR 12583 at commit 99ff8a5.

Test build #56653 has finished for PR 12583 at commit 99ff8a5.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56653/
Test PASSed.

Merged build finished. Test PASSed.

@bomeng while you are at this, do you mind implementing https://issues.apache.org/jira/browse/SPARK-14806 together?

Test build #56688 has started for PR 12583 at commit 6c7276b.

Test build #56688 has finished for PR 12583 at commit 6c7276b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56688/
Test PASSed.

Hi, @bomeng .
I hit the same issue. Could you update the PR?

Hmm. This PR seems to be stale. Actually, what I wanted was a sorted result of SET and SET -v.

I made another #16579  for SET for a sorted result.

@dongjoon-hyun, then, do you mind if I ask if this PR is not useful in favour of #16579?

Hi, @bomeng , do you have something to refresh here?
I think we can close this for now.


Custom request?

Will passing custom requests ever be possible? I want to add an option for basic authentication and it isn't very comfortable to manage this.

It is a lack of Kingfisher currently, and there is a plan to add it later.

Added in #23
Wait for merging.

Merged.
You can now customize the request like this:
KingfisherManager.sharedManager.downloader.requestModifier = {
        (request: NSMutableURLRequest) in
        // Do what you need to modify the download request.
}

Thanks for your quick solution. I really appreciate your work and motivation.

@onevcat I used you're solution for basic Auth:
KingfisherManager.sharedManager.downloader.requestModifier = {         (request: NSMutableURLRequest) in         // Do what you need to modify the download request. }
Can you tell me how to do this with the new Kingfisher 3.0 :)?

@NBoymanns
Take a look at this and this


docs: add details on how to use custom_build with buildah

Hello @jazzdan, @maiamcc,
Please review the following commits I made in branch nicks/custombuild:
6e2fd2d04666987d7c4b7f09d7b896934c197ba0 (2019-11-26 15:00:40 -0500)
docs: add details on how to use custom_build with buildah

good comments, thanks!


Issue:is there any way to record sound with this one

is there any way to record sound with this video picker

When I record video then sound didn’t work for iOS. If I choose from files then it's working fine.
"react-native": "0.61.4",
"react-native-image-picker": "^2.3.1",


Reset axes button does not reset the selected area in the overview graph when fixedrange=True

Describe the bug :crayon:
Building on minimal_chache_example.py, I've added a simple fixedrange constraint to the figure. Zooming in the graph zooms the selected area box in the overview graph as expected. However, after clicking the "Reset Axes" button in the modebar of the main graph, the zoom of the main graph resets, but the zoom in the overview graph does not.
Reproducing the bug :mag:

Copied minimal_chache_example.py
Added 'fig.update_yaxes(fixedrange=True)' to plot_graph(_), like so:

global app
ctx = callback_context
if len(ctx.triggered) and "plot-button" in ctx.triggered[0]["prop_id"]:
    fig: FigureResampler = FigureResampler(create_overview=True)

    # Figure construction logic
    fig.add_trace(go.Scattergl(name="log"), hf_x=x, hf_y=noisy_sin * 0.9999995**x)
    fig.add_trace(go.Scattergl(name="exp"), hf_x=x, hf_y=noisy_sin * 1.000002**x)

    fig.update_layout(legend=dict(orientation="h", yanchor="bottom", y=1.02))
    fig.update_layout(margin=dict(b=10), template="plotly_white",)
    fig.update_yaxes(fixedrange=True)

    coarse_fig = fig._create_overview_figure()
    return fig, coarse_fig, Serverside(fig)
else:
    return no_update

Expected behavior  :wrench:
The overview selected area box should be reset to the whole overview graph.
Screenshots  :camera_flash:
Environment information: (please complete the following information)

OS: Windows 10
Python environment:

Python version: 3.10.11
plotly-resampler environment: e.g.: Dash web app (Chrome, Edge)

plotly-resampler version: 0.10.0

Sorry, complete missed this issue is resolved in cache_overview_range_buttons.py.


No such host is known (swagger-service)

Hello,
I'm encountering an issue with  microservices architecture. Specifically, when I attempt to access the microservices using with the application names, I receive an error stating "No such host is known". This problem arises even though I have set up an Eureka Discovery Server along with three Eureka client servers. As I am new to microservices, this is my first project, and I would greatly appreciate any guidance or assistance you can provide. Thank you for your understanding.
SpringBoot versions and Spring cloud versions for all micro services
SpringBoot version = 3.2.4
Spring Cloud version = 2023.0.0
java Version = 21
Eureka localhost dashboard running at 8761

Application names and port numbers were defined separately in each yml files as swag-service, swagger-service, swaggest-service.
so below is the swag yml file that show the application name

swagger yml file

Port numbers for microservices  8081, 8082, 8083 below is the swag yml file and running in the port 8081

When I changed the hostname and port numbers to include the application name, I encountered an error. However, the application is working fine when I used localhost and port numbers.

swagApplication

SwaggerApplication

swag controller with swag endpoint (/swag) calling save-swagger endpoint

swagService

swaggerController with (/swagger) hitting save end point

swaggerService

When i make an request from swag endpoint to save swagger I was getting the hostName error with 500 internal error

error

Hi @OlgaMaciaszek https://github.com/otaku0304/Swag-Micro-Services https://github.com/otaku0304/config-repo please clone the repos from this link and run the applications,
Once after applications are running send the request to the below url by using the postman and pass the requestBody as a json body, you will get the error.
url: http://localhost:8081/swag/save-swaggest
{
"swaggestContent": "Elon Musk1",
"user": "sai"
}
error: {
"responseCode": 400,
"token": null,
"responseMessage": "I/O error on POST request for "http://swaggest-service/swaggest/save\": No such host is known (swaggest-service)",
"responseBody": null
}

@otaku0304 thanks, but please provide a minimal sample, with only as many services doing only as mush as absolutely necessary to reproduce the issue (this provided sample runs a lot of stuff unrelated to Spring Cloud Netflix, including a MongoDB).

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


ghostwriter: 2.1.3 -> 2.1.4

Description of changes
https://github.com/wereturtle/ghostwriter/releases/tag/2.1.4

Things done

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg eval

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

1 package built:

ghostwriter


Download button from webpage clicked but download was not executed or download event didn't happen

I was using the " python -m playwright codegen" it went well and I was able to navigate and click on the page while the code was autogenerated in the CLI. One of the steps is to click on a button that downloads an excel file. Upon clicking the button the code was generated but I did not observe any file downloaded, decided to complete the task by closing the webpage.
I've copied the autogenerated code into a python file then run the script. It executed well (headful) but then again at the end no download was executed.

@mxschmitt in case you want to fix it...

Playwright downloads files into a temporary location using unique names. You need to save them with a friendly name to keep them:
const [download] = await Promise.all([
  page.waitForEvent('download'),
  page.click('text="Source code"')
]);
download.saveAs("sources.zip")

You also need acceptDownloads=True in browser.newContext.
I'll update codegen to include that.

I appreciate your response and help. This worked like a charm!
This is the code that worked for me:
Click Download button
with page.expect_download() as download_info:
page.click('input[name="ctl00$ContentPlaceHolder1$btnExportExcel"]')
download = download_info.value
download.saveAs("tpp_excel.xlsx")


crypto/x509: certificates with AKID don't chain to parents without SKID

The fix for #29233 broke certificate chains where a certificate has an AKID but the parent doesn't.
These chains are weird (where did the AKID come from if there's no SKID?) and invalid by RFC 5280 (parents MUST have AKID) but they are out there, and as much of the X.509 ecosystem, we need to live with them.
Reported by @abarisani in https://github.com/golang/go/issues/29233#issuecomment-459304095.
In the review @sleevi pointed out that the old code was also subtly broken (if a parent with wrong subject but right AKID and one with right subject but no SKID were available, only the former would be considered, failing to build a chain) but that was a way rarer scenario.
We broke this in a minor (security!) release, which is not good, so we should backport a revert, and fix also the subtle case above in Go 1.13.

@gopherbot please open both backport issues. This is a regression introduced in a minor release

Short term fix done for Go 1.12, leaving open on Go 1.13 for a more complete fix.

@FiloSottile Is the short term fix what should be used for backporting purposes, and is it enough to resolve the two backport issues? Or should they wait for full fix before backporting?

@dmitshur Yeah, the short term fix is all we need to backport.


Update README to reflect current state of Mantl integration

The README currently describes how to install mantl-api on Mantl, without discussion of how it currently works, i.e. not on port 4001, but behind :80/api/.

Yeah. I have doubts abou this. +1

#24 has some updates to the readme. does this clarify things or is something still missing?

LGTM :+1:


Removes GOOGLE_TRANSLATE_CUSTOMIZATION_CODE

Fixes #782. Removes custom translations code, which is no longer supported by Google. See https://productforums.google.com/forum/#!topic/webmasters/PgZrohUEIX4
Removals

Removes GOOGLE_TRANSLATE_CUSTOMIZATION_CODE from code and associated documentation.

Changes

Updates Google Translate doc URLs.

Testing

Google custom translation meta HTML should no longer appear in head.

Review

@monfresh

Coverage remained the same at 98.36% when pulling 0abf5491b37b5f4fd68e482c8ee53a486b795bf8 on 782-custom-translations into 0540eb76ee073eef19e8d9427bb347990a33bf15 on master.

Is this good to go?

LGTM! :rocket:


Support client connection when transportMode=http,ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL

…tore specified without trustStorePassword in the JDBC URL
:mag: Description
Issue References 🔗

This pull request fixes ##5713
Describe Your Solution 🔧
trustStorePassword is not a necessary parameter in connection URL. Connection can be established without it.
From the javadocs Link A password may be given to unlock the keystore (e.g. the keystore resides on a hardware token device), or to check the integrity of the keystore data. If a password is not given for integrity checking, then integrity checking is not performed.
In order to create an empty keystore, or if the keystore cannot be initialized from a stream, pass null as the stream argument.
Reference PR comes from HIVE-27271
Types of changes :bookmark:

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪
Behavior Without This Pull Request :coffin:
Behavior With This Pull Request :tada:
Related Unit Tests

Checklists
📝 Author Self Checklist

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

📝 Committer Pre-Merge Checklist

[ ] Pull request title is okay.
[ ] No license issues.
[ ] Milestone correctly set?
[ ] Test coverage is ok
[ ] Assignees are selected.
[ ] Minimum number of approvals
[ ] No changes are requested

Be nice. Be informative.

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

Comparison is base (23f32cf) 61.43% compared to head (c1011e4) 61.41%.

Files
Patch %
Lines

.../org/apache/kyuubi/jdbc/hive/KyuubiConnection.java
0.00%
4 Missing :warning:

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5712      +/-   ##
============================================
- Coverage     61.43%   61.41%   -0.03%
  Complexity       23       23
============================================
  Files           607      607
  Lines         35735    35737       +2
  Branches       4896     4898       +2
============================================
- Hits          21955    21948       -7
+ Misses        11402    11400       -2
- Partials       2378     2389      +11

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

This pr backport https://github.com/apache/hive/commit/36bd69ee10cce13ab42a750f0577f53f85f28ca7

Thanks, merged to master/1.8.1/1.7.4


Combined 13 Dependabot Pull Requests

Closes #11980
Closes #11981
Closes #11984
Closes #11996
Closes #11997
Closes #11998
Closes #12001
Closes #12011
Closes #12012
Closes #12014
Closes #12015
Closes #12016
Closes #12017

Looks like some of these have gotten new versions since this PR was created, can you update it?

Updated!


Hotfixed homepage card spillover on responsive displays

This is my personal hotfix to #516 . It enforces width on the container for the image card, and replicates the content formatting for some amount of responsiveness. This is not intended as a true fix, but is potentially a start.
Remaining issue: scaling on iPad in the landscape view still spills over. Other views appear acceptable.

@Capprin could you upload a screenshot of the final result?

Here is a brief video of the result on mobile. Used for my personal site.
https://user-images.githubusercontent.com/1781067/219670660-d284648c-302e-46c6-944e-684236a78a2a.MOV


When "Closed Connection" occurs in Active Request Chart

We are currently using the v2.0.3 version you provided.
"Closed Connection" is displayed on the Active Request chart and is not visible.
In this case, if you move to an application in another list a few times and then return to the active request chart for that application, it works normally.
Please answer if you know how to solve the issue or if you know if there are any additional settings related to the web.

I'll +1 this. I get this error if I access pinpoint through a web server. If I access directly to tomcat, it's fine.

hi @cribbstechnologies
Probably, this problem is likely related that WebSocket connection.
I recommend you to check your web server configuration that is related WebSocket.
thanks :)


Update model.py

fix UnboundLocalError
local variable 'x' referenced before assignment

Thank you. The issue has been resolved.


Wrong version of libraries

I use kserve <IP_ADDRESS>
I created inferenceservice with v1beta1 (python sdk). Accoarding to:
https://kserve.github.io/website/0.8/modelserving/v1beta1/serving_runtime/
sklearn predictor pod should have scikitlearn version 1.0.1, but when I checked it with these commands:
kubectl exec -it {my_pod_name} -- bash
pip freeze
I got this output:
[...]
scikit-learn==0.20.3
[...]
I think it should be updated.

@szymonbcoding it is correct, can you check if you are running with the right image?
docker run -it --entrypoint=/bin/bash kserve/sklearnserver:v0.8.0
kserve@6bc87902e7a9:/$ pip freeze |grep scikit
scikit-learn==1.0.1

make sure you installed the right version of KServe, not just sdk. For example if you installed KServe 0.7, using sdk 0.8 does not create sklearn inferenceservice with 1.0.1 version by default , though you can use runtimeVersion=v0.8.0 to override the default servingruntime version from sdk.


Arja Driver missing run build_script command

Description
In ARJA_E driver, there is a command to run benchmark build script to compile/install bugs.
self.run_command(
            "bash {}".format(bug_info.get(self.key_build_script)),
            dir_path=self.dir_setup,
            env=env,
        )

In ARJA driver, it should have an equivalent command, but it's missing.
Some bugs in d4j & vul4j cannot compile/install fully, there will be missing class files, leading to errors.

Additional:
Missing dependencies for Maven build project in Arja Driver.


Clarify NoPartitionsAvailable error string

Customer gave feedback that it ought to be more clear that this is an internal error message and not a part of the Kafka protocol.

LGTM


Correct API group on Vault setup guide

What this PR does / why we need it:
After adding the Vault k8s auth stuff, some of the documentation examples still referenced the old API group/version.
Release note:
NONE

/milestone v0.11
/priority critical-urgent
/assign @JoshVanL

/lgtm


Migration from nuxt-speedkit to nuxt-booster

Describe the bug
Build Size Increased from 104MB to 370MB After Migrating from Speed-Kit to Nuxt-Booster.
with nuxt-booster
nuxt verison: 3.5.3
nuxt-booster:3.0.16

with speed-kit
nuxt verison: 3.5.3
nuxt-speed-kit: 3.0.0-next.20

Hello @fareed13 ,
could you have a look at where in the .output folder the problem occurs?

I encountered an issue with build size when using nuxt-booster compared to speed-kit. Here are the details:

Folder Name
With Speed Kit
With Booster

_nuxt
19.5 MB
18.8 MB

admin
11.4 MB
58.5 MB

blog
4.3 MB
21.7 MB

classes
47 MB
219.6 MB

curriculum
7.1 MB
1.4 MB

instructor
4.3 MB
20.2 MB

location
1.9 MB
8.9 MB

locations
3.3 MB
14 MB

agreements
304 KB
1.4 MB

attendance
307 KB
1.5 MB

belts
319 KB
1.5 MB

checkout
318 KB
1.5 MB

customers
321 KB
1.5 MB

events
304 KB
1.4 MB

gift-card
317 KB
1.5 MB

login
310 KB
1.5 MB

privacy-policy
304 KB
1.4 MB

profile
314 KB
1.5 MB

referral-hero
304 KB
1.5 MB

refund-policy
304 KB
1.4 MB

reservation
314 KB
1.5 MB

reviews
304 KB
1.4 MB

schedule
312 KB
1.5 MB

setup
269 KB
1.4 MB

test
303 KB
1.4 MB

As shown, the build size increases significantly for most folders when using nuxt-booster compared to speed-kit. This is causing issues with our deployment. Any insights or suggestions would be appreciated.
Thank you.

Interesting, so either the index.html or _payload.json files seem to be larger?
Unfortunately I can't reproduce this, so can you take a closer look?
If necessary, please provide files so that I can take a look at what has happened.

Thank you for looking into this. I took a closer look, and it seems that the significant size differences are primarily in the index.html files. Here are the specific sizes:

Folder Name
With Speed Kit
With Booster

index.html
289 KB
1.1 MB

_payload.json
631 bytes
631 bytes

As shown, the index.html files are much larger with nuxt-booster, while the _payload.json files remain the same size.
Unfortunately, due to the nature of our client's private repository, I'm unable to share the specific files directly. However, if there are any specific details or logs you need me to look at, please let me know and I'll do my best to provide the necessary information.

To help you reproduce the issue, I have created a public repository with the necessary setup. You can find the repository here: nuxt-3.5.3.
In the main branch, you will find the setup with nuxt-speedkit, which has a build size of 14 MB. I have also created a separate branch named migration-to-booster, and a PR has been created for this migration, which results in a build size of 31.3 MB. Please note that this repository contains a very small chunk of the application, and the build size increases as more pages are added.
To reproduce the issue, follow these steps:
Clone the repository.
Checkout the migration-to-booster branch.
Run the following commands to set environment variables:

export DEFAULT_PAGE_DOMAIN=lahore.abbitest1.com
export PORT=3999

If you need any additional information or if there's anything more required, please feel free to ask.

Thanks @fareed13,
you are still using an old version 3.0.0-next.20 is already very old for not renamed 😉
At the moment another feature was added.
When generating the css files contained in the head are embedded.
Important in SSR, the CSS is already present.
This leads to the fact that 1 mb Vuetify CSS is now included.
Are you staying with Vuetify? has quite an overhead in itself and is not suitable for websites with good PageSpeed.
The focus is more on applications.
I can see the options right now:

add PurgeCSS, which removes unused CSS.
choose an alternative to Vuetify, e.g. https://tailwindcss.com/
deactivate the embedding of styles during generation

⚠ Still needs to be implemented
This would be an optional option that must be set separately.
Also leads to further initial requests

@ThornWalli You're right about we are using 3.0.0-next.20 version, it was latest when we shifted from nuxt2 to nuxt3. However this older version working far better then the new one in term of load speed as well as build size.
We can't move to another UI as we have a very large scale website already built with vuetify.
For your reference please check https://github.com/fareed13/nuxt-3.5.3/pull/1/files diffrences. You can see that only changing nuxt-speedkit(deprecated) to nuxt-booster result in 13.6mb to 29.4mb, more than 2X increase in build size. performance is same on both of builds, I checked google pagespeed. Speedkit performs lil better BTW.
here I have deployed the sites on netlify to see the performance difference as well.
Website with speedkit
Website with booster
https://github.com/basics/nuxt-booster/assets/85872908/d27b3be5-67b7-4a93-bbda-71b502ddd06d
here are the static build generated with nuxi generate command
builds.zip
So keep in mind that there is not a single change except for booster package, we got this results. Increase in build size and decrease in performance. When we implement this in our main a very large project, build size increases from 104mb to 370+mb as well as performance decrement. Doesn't make sense to me.
Your help is appreciated. thanks!

you could roughly deactivate this optimization with this https://basics.github.io/nuxt-booster/guide/options.html#optimizepreloads
Alternatively, I'm thinking about making it partially configurable, there's a lot going on https://github.com/basics/nuxt-booster/blob/main/src/utils/preload.js#L4

@fareed13 @muhammad-grayphite
Got an update: npm i<EMAIL_ADDRESS>The property optimizePreloads has been replaced with optimizeSSR.

The optimizeSSR property can be Boolean, then everything is activated
Or an object is set.

  optimizeSSR: false, // default: true

  optimizeSSR: {
    cleanPreloads: true,
    cleanPrefetches: true,
    inlineStyles: true
  }

The embedding of the style can be deactivated there, for example.
  optimizeSSR: {
    inlineStyles: false
  }

@ThornWalli, I noticed that the build size has decreased by about 80MB. I’m not sure if this will impact our website’s Lighthouse performance, but I checked and didn’t see much difference. Are there any cons to using these settings?
However, the build size is still 290MB (down from 370MB), which is quite large compared to the 110MB we had in the previous version of Speedkit. Is there any noticeable change in Booster that could be contributing to this increase in size?

@muhammad-grayphite

CSS files are initially loaded in the head. Should not make any difference to the old version.
If necessary, you can still integrate https://www.npmjs.com/package/@nuxtjs/critters, which I had also removed.

integrate the CSS into the head because of FOUC. (https://de.wikipedia.org/wiki/Flash_of_Unstyled_Content) But it makes no sense with a large frontend framework with a lot of CSS.

What do you see in the index.html files?
These were large because the css was embedded.
This should no longer happen with this setting.
 optimizeSSR: {
    inlineStyles: false
  }

Yeah I think I see the noticeable difference. I can still see CSS in index file, yes file size decreased but its not enough. Other thing I can look into critters if it can help us.

@muhammad-grayphite I removed all styles from the /index.html in the example, I noticed that the ssr payload is quite large. As formatted JSON >200KB.
Writes a lot of data when generating.
Maybe that would be interesting https://nuxt.com/docs/api/nuxt-config#renderjsonpayloads


Make compatible with Laravel 5.8 and Nova 2.0

Added a support of Laravel 5.8 and Nova 2.0.
It requires more changes - https://github.com/froala/nova-froala-field/compare/1.1.4...2.0.0


Fix exception handling of executor health checker

Currently in case of any uncaught exceptions during executor health check
the health checking stops and the exception is never reported.
This is fixed by introducing a wrapper routine for catching and reporting any
uncaught exceptions.
Includes additional exception handling when finalizing flows for an
unreachable executor.

Pull Request Test Coverage Report for Build 5297

9 of 15 (60.0%)  changed or added relevant lines in 1 file are covered.
22 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.05%) to 40.737%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
9
15
60.0%

Files with Coverage Reduction
New Missed Lines
%

azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
1
81.91%

azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackRequestMaker.java
21
55.21%

Totals

Change from base Build 5295:
-0.05%

Covered Lines:
13169

Relevant Lines:
32327

💛  - Coveralls


Added output format markdown (md)

Hi, i wanted to use Stylestats to generate metrics for a less/css project i was doing (default.css), i wanted the metrics to be viewable on github. So i made a simple md formatter.
Oskar

related to #92

@oskarnyqvist
Thanks for your pull request.
I'm releaseing this feature at v4.3.0.

I published v4.3.0.


[Question] About multiple Service and Validator in one Controller.

Hi,
Thank you for this open source. I am trying to use it.
I have a question. How do I use two or more Services and Validators in one Controller?

You can inject more services and validators to your controller's constructor if they are registered in a DI.
Be careful though, because by setting services and validators by hand you can miss initialization boilerplate code needed for services and validators to work correctly, which happens in serviced and validated controllers.
public HomeController : BaseController
{
    private IAService AService { get; set; }
    private IBService BService { get; set; }

    private IAValidator AValidator { get; set; }
    private IBValidator BValidator { get; set; }

    public HomeController(IAService aService, IAValidator aValidator,
        IBService bService, IBValidator bValidator)
    {
        // Setter code
    }
}

public class MainContainer : ServiceContainer
{
    public void RegisterServices()
    {
        // Other code

        Register<IAService, AService>();
        Register<IBService, BService>();

        Register<IAValidator, AValidator>();
        Register<IBValidator, BValidator>();
    }
}

thank you so much.


fullscreen & orientation preferences ignored

I'm testing a sample phonegap app on my android device through Phonegap Developer App and I noticed that the fullscreen and orientation preferences are ignored.
Just did a cordova run android and those preferences works.
I don't know if this is a bug or it's not possible for the app to override its default values for those 2 preferences but I just wanted to let you know.
*Using latest version of cordova/phonegap & android 4.4 on my device.

Not fixed yet.....

Hi everyone - sorry for the late reply.
Values in your config.xml will not be read by the PhoneGap Developer App. So things like orientation and fullscreen won't be set unless you build and run the PhoneGap Developer App on your own.
However, I do believe there is a work around for fullscreen mode for android. We do include the statusbar plugin so I believe it would be possible to simulate fullscreen by turning off the statusbar. Try putting this call to go fullscreen mode StatusBar.hide();
From https://github.com/apache/cordova-plugin-statusbar/blob/master/doc/index.md

Closing since we haven't seen very much activity on this issue. Feel free to reopen.

It would be nice to have the Developer App have a fullscreen option, I tried building a custom version of  the Developer App but couldn't figure it out, maybe the Developer App could include this fullscreen plugin by default? https://github.com/mesmotronic/cordova-plugin-fullscreen


feat: remove collapse sections

Description
PR fixes following issue(s)
Fixes EE issue !427
Media

A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video

Type of change

Please delete options that are not relevant.

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Chore (housekeeping or task changes that don't impact user perception)
This change requires a documentation update

Testing

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration.
Delete anything that is not relevant

[ ] Manual
[ ] Jest
[ ] Cypress

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

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

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

/build-deploy-preview skip-tests=true

/build-deploy-preview skip-tests=true recreate=true

/ok-to-test

Hey folks, is this still relevant? If so, I'd like to approve it after QA has gone through it once.

Hey folks, is this still relevant? If so, I'd like to approve it after QA has gone through it once.

Yes @tanvibhakta , this needs to go in soon. I fixed an ADS bug with the checkbox control also. Please do go through once more. Thanks!

/build-deploy-preview skip-tests=true recreate=true

/ok-to-test

/build-deploy-preview skip-tests=true recreate=true

/ok-to-test

@ayushpahwa Are we still working on this ? Asking because many of the test cases are failing

@AmanAgarwal041 yup, working on this. Actually this is blocked by #23920 . Once that is merged in, we'll be able to proceed here. Setting it as draft for now.

/ok-to-test

/ok-to-test

/ok-to-test


Issue with PDF output size

I'm using your tool inside of a shell script which gets run by an Automator.
I am not the author of this script but it used to work up until 2-3 weeks ago, then now whatever I try the output PDFs are not coming out the size written inside the script.
For example, the one pasted below comes out 611 x 684 instead of the correct amount.
Could you help me find the issue? Thanks!
#!/bin/bash

export PATH=$PATH:/usr/local/bin:$HOME/Desktop
EXT="_Quarto.pdf"
OUTFOLDER="$1"
shift 1

function pdf_rescale () {
    /usr/local/bin/pdfscale.sh -r 'custom pt 657.64 864.57' -s 0.985 "${1}" "${2}"
    return
}

# loop through all input files, or folders and transform A4 PDF to Quarto (232 x 305) PDF scaled to 98.5 percent
for f in "$@"
do
    # is it a directory?
    if [ -d "$f" ]; then
        # nullglob prevents expansion of "*.pdf" to variable x if no match
        shopt -s nullglob
        for x in "${f}"/*.pdf
        do
            shopt -s extglob
            pdf_rescale "${x}" "${OUTFOLDER}/${x//+(*\/|.*)}${EXT}"
            shopt -u extglob
        done
        shopt -u nullglob
    # is it a non-zero, regular file?
    elif [ -s "$f" ]; then
        shopt -s extglob
        pdf_rescale "${f}" "${OUTFOLDER}/${f//+(*\/|.*)}${EXT}"
        shopt -u extglob
    fi
done
exit 0

EDIT: with help from user VikingOSX from discussions.apple.com, I discovered that the issue presents itself only when the input file is a PDF made up combining different PDFs, for example using Adobe Acrobat.
Your tool will correctly resize the MediaBox of the file but will also apply a CropBox to it that maintains the proportion of the original file.
For example: if I want to convert such file from A4 to 9x12in the resulting file available to the user will be 12in high but 8.51in wide, as it will keep the A4 proportions.
Could you please give a look at this issue and tell me how to solve it?
Thank you very much

Hi, I am not sure I understand everything, but I will try to explain what I can.
First, some questions:

What version of pdfScale are you using?
Can you post the verbose output of your run here (as code pls)?
Can you provide me with a PDF file example so I can try doing the same here?
Can you provide me with the resulting PDF that didn't go as expected?

You are running in mixed mode, resizing the paper and then scaling down.
1st Step - Resize

Always runs before scaling
Fits to page

Will resize paper and reposition the content
If the new paper has the same proportions, things will look the same
If the new paper has different proportions, the fitting of the contents will change
You can also disable the fit-to-page setting with --no-fit-to-page

By default it will try to detect if your are flipping from portrait to landscape and correct it, you may disable this with -f disable or -f d
By default it will run ghostscript auto-rotation detection in auto mode, you can also disable this with -a none or -a n
And then you can even manually position things with vertical/horizontal alignment setting and x/y offset settings, here is the help description for it

 --hor-align, --horizontal-alignment <left|center|right>
             Where to translate the scaled page
             Default: center
             Options: left, right, center
 --vert-align, --vertical-alignment <top|center|bottom>
             Where to translate the scaled page
             Default: center
             Options: top, bottom, center
 --xoffset, --xtrans-offset <FloatNumber>
             Add/Subtract from the X translation (move left-right)
             Default: 0.0 (zero)
             Options: Positive or negative floating point number
 --yoffset, --ytrans-offset <FloatNumber>
             Add/Subtract from the Y translation (move top-bottom)
             Default: 0.0 (zero)
             Options: Positive or negative floating point number

2nd Step - Scale

Never affects page size, whatever came from step 1, will be kept
Will zoom contents inside the page, which may bleed "outside" the page

At MacOSX, there may be a problem if you are trying to process a PDF file that was just created by another script step, which may not yet have spotlight's metadata. That will happen if mdls is used because it uses this metadata. This will only happen if the PDF was just created miliseconds before.
You can force another method of size detection to make sure this is not a problem though. Try installing (from homebrew) imagemagick or xpdf and using -m i or -m p to force using one of them.
Next version will have ghostscript detection, so this should not be a problem anymore.

Let me know if this helps.
Cheers!  :beer:
Gus

BTW, postscript points are integers.
They will be rounded to integers even if you use floating point numbers.
Can you try it using integers for custom paper size?
Can you also try using a pre-defined paper size like letter or A4?

It seems that attachments don’t go through so I will paste here the text of the mail and here is the Dropbox link of the folder where the mentioned files are. Sorry for that.
Dear Gustavo,
First of all nice to meet you and thank you so much for taking your time to assist me personally, I cannot emphasise enough how much this means to me!
On with your questions:
• I’m using pdfScale 2.4.9 (one interesting thing is that the upgrade command failed on me to the point I had to manually install the updated version inside the usr/local/bin directory.
• I am sending you several PDFs and I would like to ask you to convert them to -r ‘custom mm 232 305’ -s 0.985.
• The PDF labelled ‘One’ is a simple PDF outputted from the app Avid Sibelius. To me this resizes and scales perfectly, so no issue with that.
• The PDF labelled ‘Two’ contains ‘One’ plus a few other PDFs exported from Apple Pages and then combined with the Combine Tool in Acrobat CC 2020 (though using Preview or PDF Expert didn’t change). Passing these files to pdfScale produces the issue shown in picture ‘Two-CropMedia’, while the output from the Terminal is in text file ‘Two-Terminal’. The resulting file is called ‘Two_scaled’. I have already inquired with Acrobat communities what these two Boxes mean and am waiting for an answer.
Normally, also because I am a total beginner in scripting (am a musician, nothing more!), I just pass PDFs that have already been created for quite a while so the issue you describe at the end should not be there.
I installed imagemagick but I am not sure where in the script I should put those extra parameters. If you think this is important could you please point me there?
Thank you so much for all your help, I hope what I wrote is somehow helpful in the investigation.
My only workaround now is to open each file in Preview and export them using the Print tool, which I can do but is in an order of magnitude of O(n) times slower!
Thank you once more and all the best
Michele Galvagno

Hi, there are no links at your post.
Seems like the upgrade is broken on MacOSX because it uses BSD's readlink instead of GNU's.
I have already found a bash implementation of that to replace it, will come at the next version. This is related to #17
To force imagemagick, just add -m i to your call.
You can paste images here, so maybe the screenshots would help me understand the results.
Would be nice to have the actual PDF's as well though.

Please try this:
https://www.dropbox.com/sh/es7qtpq3vy96xak/AACsoPUJB1z3o4EJGa2ee0oea?dl=0
Do you see it now?
Otherwise how can I reach you privately? Twitter?
Thanks!

Yep, now I got it.
Downloaded and checking.

Still investigating, but this is what I have so far:

File Two.pdf does have some weird stuff coming with the /Mediabox definition (from grep).
Even though this causes an error, the page size seems to be processed accordingly.
Using imagemagick (or pdfinfo) will solve this problem (add -m i to call).

The verbose run of Two.pdf
$ pdfscale -v -r 'custom mm 232 305' -s 0.985 Two.pdf
pdfscale v2.4.9 - Verbose Execution
   Mixed Tasks: Resize & Scale
       Dry-Run: FALSE
    Input File: Two.pdf
   Output File: Two.CUSTOM.SCALED.pdf
 Get Page Size: Adaptive Enabled
        Method: Grep
/usr/local/bin/pdfscale: line 1497: warning: command substitution: ignored null byte in input
  Source Width: 595 postscript-points
 Source Height: 842 postscript-points
    Print Mode: Print ( auto/empty )
   Fit To Page: Enabled (default)
   Auto Rotate: PageByPage
   Flip Detect: No change needed
  Run Resizing: CUSTOM ( 658 x 865 ) pts
     New Width: 658 postscript-points
    New Height: 865 postscript-points
  Scale Factor: 0.985
    Vert-Align: CENTER
     Hor-Align: CENTER
 Translation X: 5.01 = 5.01 + 0.00 (offset)
 Translation Y: 6.59 = 6.59 + 0.00 (offset)
   Run Scaling: -1 %
    Background: No background (default)
  Final Status: File created successfully

The error is here:
/usr/local/bin/pdfscale: line 1497: warning: command substitution: ignored null byte in input

But as mentioned the page size is parsed correctly and the execution seems to proceed without problems.
This is what the grep call returns on One.pdf and Two.pdf
One.pdf
$ grep -a -e '/MediaBox' -m 1 ./One.pdf
/MediaBox [0 0 595.000000 842.000000]

Two.pdf
$ grep -a -e '/MediaBox' -m 1 ./Two.pdf
ðV ù(ÕçKp       a§uV4Lò×ç]áÐÀxú©AÖ0àt~îSD?NTÄg¢jO§|®IO|C|%´áÑu?kÓºáºòÛ JÀzÈ_H/üÛ
<</Contents[1422 0 R 1423 0 R 1424 0 R 1425 0 R 1426 0 R 1427 0 R 1428 0 R 1430 0 R]/CropBox[0 0 595.2756 841.8898]/MediaBox[0 0 595.2756 841.8898]/Parent 1400 0 R/Resources 1437 0 R/Rotate 0/T<</Filter/FlateDecode/First 72/Length 642/N 8/Type/ObjStm>>stream

Those weird chars are what causes the parsing problems.
Maybe I can run it through a pipe with strings or cat to mitigate the problem (eg.)
$ strings Two.pdf | grep -e '/MediaBox' -m 1
<</Contents[1422 0 R 1423 0 R 1424 0 R 1425 0 R 1426 0 R 1427 0 R 1428 0 R 1430 0 R]/CropBox[0 0 595.2756 841.8898]/MediaBox[0 0 595.2756 841.8898]/Parent 1400 0 R/Resources 1437 0 R/Rotate 0/Type/Page>>

But as mentioned, you can use -m i to solve this as well.
However, this does not seem to be the problem, since the page size is parsed correctly (even with the error).
Please note how complex the second PDF definition is and how it has a lot more stuff than the other file has. I would guess that these other things are interfering with the result.

Honestly, I am still not 100% sure I understand what the problem is?
It is a bit confusing, but seems like the proportions of the original file is maintained, right?
The resulting MediaBox size seems to be correct, so pdfScale seems to be working properly, but the CropBox seems to be keeping the original proportion and that is what ends up rendering on screen.
I am not sure why you have a cropbox defined. From what I understand, that is used in pre-press to define a page with a bleed. So they can print it a bit bigger than the actual needed size and then cut the excess later (for a better finishing and no borders).
So maybe you can config the Acrobat merger in order for it to not define a cropbox?
I would try to tinker with the merger options to see if it makes any difference.
Here is some explanations on the PDF boxes:

https://www.prepressure.com/pdf/basics/page-boxes
https://wiki.scribus.net/canvas/PDF_Boxes_:_mediabox,_cropbox,_bleedbox,_trimbox,_artbox
https://www.w3pedia.com/uk/the-pdf-page-boxes-cropbox-bleedbox-trimbox

Anyways, let me know if this helps.
I recommend using Lightshot to create screenshots (copy to memory) and then you can just paste them here (ctrl + V). You can save the image and drag+drop here as well.

While writing this I made a few more tests and got some new info:
Example run
$ pdfscale -m i -v -r 'custom mm 232 305' -s 0.985 Two.pdf
Checking for imagemagick's identify
pdfscale v2.4.9 - Verbose Execution
   Mixed Tasks: Resize & Scale
       Dry-Run: FALSE
    Input File: Two.pdf
   Output File: Two.CUSTOM.SCALED.pdf
 Get Page Size: Adaptive Disabled
        Method: ImageMagick's Identify
  Source Width: 595 postscript-points
 Source Height: 842 postscript-points
    Print Mode: Print ( auto/empty )
   Fit To Page: Enabled (default)
   Auto Rotate: PageByPage
   Flip Detect: No change needed
  Run Resizing: CUSTOM ( 658 x 865 ) pts
     New Width: 658 postscript-points
    New Height: 865 postscript-points
  Scale Factor: 0.985
    Vert-Align: CENTER
     Hor-Align: CENTER
 Translation X: 5.01 = 5.01 + 0.00 (offset)
 Translation Y: 6.59 = 6.59 + 0.00 (offset)
   Run Scaling: -1 %
    Background: No background (default)
  Final Status: File created successfully

Notes

Source Width/Height is always correct (even when using grep with the error)
Target Width/Height is also correct

PTS ( 658 x 865 ) == MM ( 232 x 305 )

The resulting /Mediaboxes have the correct size

$ strings Two.CUSTOM.SCALED.pdf | grep -e '/MediaBox'
<</Type/Page/MediaBox [0 0 658 865]
<</Type/Page/MediaBox [0 0 658 865]
<</Type/Page/MediaBox [0 0 658 865]
. . .

The resulting /Cropboxes are the ones keeping the proportion of the page

Their sizes are ( 634.808105 x 865.0 )

$ strings Two.CUSTOM.SCALED.pdf | grep -e '/CropBox'
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191803 .00003051758 634.808228 865.0]
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191803 .00003051758 634.808228 865.0]
/CropBox [23.3735352 .00003051758 634.626465 865.0]
. . .

So we at least know where the problem is now, but I sill don't know what path I should take to solve this yet.
This post seems to shed some light on the /Cropbox issue and offers a workaround.
https://stackoverflow.com/a/26989410/1273636
Your file also has a /Cropbox defined for EACH page as in the question above.
I will keep researching it.
Cheers!
Gus

Wow, thank you!
I read all of this quickly before heading off to bed (midnight here).
Will read this again tomorrow morning with a fresh head and see what I can do!
Thanks for this thorough investigation!
On 30 Mar 2020, 23:34 +0200, Gustavo Arnosti Neves<EMAIL_ADDRESS>wrote:

Still investigating, but this is what I have so far:
• File Two.pdf does have some weird stuff coming with the /Mediabox definition (from grep).
• Even though this causes an error, the page size seems to be processed accordingly.
• Using imagemagick (or pdfinfo) will solve this problem (add -m i to call).
The verbose run of Two.pdf
$ pdfscale -v -r 'custom mm 232 305' -s 0.985 Two.pdf
pdfscale v2.4.9 - Verbose Execution
Mixed Tasks: Resize & Scale
  Dry-Run: FALSE

Input File: Two.pdf
Output File: Two.CUSTOM.SCALED.pdf
Get Page Size: Adaptive Enabled
   Method: Grep

/usr/local/bin/pdfscale: line 1497: warning: command substitution: ignored null byte in input
Source Width: 595 postscript-points
Source Height: 842 postscript-points
Print Mode: Print ( auto/empty )
Fit To Page: Enabled (default)
Auto Rotate: PageByPage
Flip Detect: No change needed
Run Resizing: CUSTOM ( 658 x 865 ) pts
New Width: 658 postscript-points

New Height: 865 postscript-points
Scale Factor: 0.985
Vert-Align: CENTER
Hor-Align: CENTER

Translation X: 5.01 = 5.01 + 0.00 (offset)
Translation Y: 6.59 = 6.59 + 0.00 (offset)
Run Scaling: -1 %
Background: No background (default)
Final Status: File created successfully
The error is here:
/usr/local/bin/pdfscale: line 1497: warning: command substitution: ignored null byte in input
But as mentioned the page size is parsed correctly and the execution seems to proceed without problems.

Maybe I can run it through a pipe with strings or cat to mitigate the problem (eg.)
$ strings Two.pdf | grep -e '/MediaBox' -m 1
<</Contents[1422 0 R 1423 0 R 1424 0 R 1425 0 R 1426 0 R 1427 0 R 1428 0 R 1430 0 R]/CropBox[0 0 595.2756 841.8898]/MediaBox[0 0 595.2756 841.8898]/Parent 1400 0 R/Resources 1437 0 R/Rotate 0/Type/Page>>
But as mentioned, you can use -m i to solve this as well.
However, this does not seem to be the problem, since the page size is parsed correctly (even with the error).
Please note how complex the second PDF definition is and how it has a lot more stuff than the other file has. I would guess that these other things are interfering with the result.
Honestly, I am still not 100% sure I understand what the problem is?
It is a bit confusing, but seems like the proportions of the original file is maintained, right?
The resulting MediaBox size seems to be correct, so pdfScale seems to be working properly, but the CropBox seems to be keeping the original proportion and that is what ends up rendering on screen.
I am not sure why you have a cropbox defined. From what I understand, that is used in pre-press to define a page with a bleed. So they can print it a bit bigger than the actual needed size and then cut the excess later (for a better finishing and no borders).
So maybe you can config the Acrobat merger in order for it to not define a cropbox?
I would try to tinker with the merger options to see if it makes any difference.
Here is some explanations on the PDF boxes:
• https://www.prepressure.com/pdf/basics/page-boxes
• https://wiki.scribus.net/canvas/PDF_Boxes_:_mediabox,_cropbox,_bleedbox,_trimbox,_artbox
• https://www.w3pedia.com/uk/the-pdf-page-boxes-cropbox-bleedbox-trimbox
Anyways, let me know if this helps.
I recommend using Lightshot to create screenshots (copy to memory) and then you can just paste them here (ctrl + V). You can save the image and drag+drop here as well.
While writing this I made a few more tests and got some new info:
Example run
$ pdfscale -m i -v -r 'custom mm 232 305' -s 0.985 Two.pdf
Checking for imagemagick's identify
pdfscale v2.4.9 - Verbose Execution
Mixed Tasks: Resize & Scale
  Dry-Run: FALSE

Input File: Two.pdf
Output File: Two.CUSTOM.SCALED.pdf
Get Page Size: Adaptive Disabled
   Method: ImageMagick's Identify

Source Width: 595 postscript-points
Source Height: 842 postscript-points
Print Mode: Print ( auto/empty )
Fit To Page: Enabled (default)
Auto Rotate: PageByPage
Flip Detect: No change needed
Run Resizing: CUSTOM ( 658 x 865 ) pts
New Width: 658 postscript-points

New Height: 865 postscript-points
Scale Factor: 0.985
Vert-Align: CENTER
Hor-Align: CENTER

Translation X: 5.01 = 5.01 + 0.00 (offset)
Translation Y: 6.59 = 6.59 + 0.00 (offset)
Run Scaling: -1 %
Background: No background (default)
Final Status: File created successfully
Notes
• Source Width/Height is always correct (even when using grep with the error)
• Target Width/Height is also correct
• PTS ( 658 x 865 ) == MM ( 232 x 305 )
• The resulting /Mediaboxes have the correct size
$ strings Two.CUSTOM.SCALED.pdf | grep -e '/MediaBox'
<</Type/Page/MediaBox [0 0 658 865]
<</Type/Page/MediaBox [0 0 658 865]
<</Type/Page/MediaBox [0 0 658 865]
. . .
• The resulting /Cropboxes are the ones keeping the proportion of the page
• Their sizes are ( 634.808105 x 865.0 )
$ strings Two.CUSTOM.SCALED.pdf | grep -e '/CropBox'
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191803 .00003051758 634.808228 865.0]
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191925 0 634.808105 865.0]
/CropBox [23.191803 .00003051758 634.808228 865.0]
/CropBox [23.3735352 .00003051758 634.626465 865.0]
. . .
So we at least know where the problem is now, but I sill don't know what path I should take to solve this yet.
This post seems to shed some light on the /Cropbox issue and offers a workaround.
https://stackoverflow.com/a/26989410/1273636
Your file also has a /Cropbox defined for EACH page as in the question above.
I will keep researching it.
Cheers!
Gus
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Seems like I have a solution to bypass the Cropboxes with the new sizes.
I am still researching the best way to implement it though.
I don't think I want to always apply the Cropboxes.
I would prefer that files like One.pdf that do not contain any \Cropboxes defined to keep it as is, without adding a cropbox on each page. I am not sure I can detect this automagically in all cases and then apply the change.
I am inclined to just add a cli parameter that will redefine all Cropboxes to the same size as the paper (Mediabox). This will be easy to implement and run, but will not be a universal/automatic solution (which would be nice).
Gus

The problem is thinking on all possible outcomes and situations.
As mentioned before, this only applies to resizing, for scaling this is all irrelevant.
Possibilities

Resize Cropbox proportionally to the original

Seems to be the current behavior, even though unintended

Resize Cropbox to same size as Mediabox

Seems to be what you want, but may not always be the case
Seems to be the only solution for files with Cropboxes defined

Resize Cropboxes to custom size

Allows to set different Mediabox / Cropbox sizes
This may be important for printing jobs with bleeds

Options for now

Add a parameter to set a custom /CropBox size (independent to the /MediaBox size)
Have a parameter that sets the size of the /CropBox the same as the /MediaBox

Detecting Cropboxes would be nice, but the complexity grows a lot. Detecting is the first problem, since it may not always work (seems to be exactly the same as Mediabox detection). There is also no clear definition on what default behaviour should be used on each case, since it will always depend on what the user actually wants.
Still digging and thinking here.
I will add the readlink bash implementation to fix the MacOSX installer while I think a bit more.

Good morning Gus!
I have read now everything and those three articles you shared are just amazing!
Before even trying any of the tools suggested I followed the instructions and opened one of the resized files in Acrobat CC 2020, then in Preferences activate the showing of all boxes (which showed up the media box in blue around the page). Then, I went Edit > Crop Pages > double click on any page and noticed this:

I therefore clicked on "Set to zero" under "Margin control" and this fixed the page for good.
Now, as doing this for every document I export would be as slow as manually converting them one by one, I wonder if the culprit may be the PDF export engine of Apple Pages. In macOS Finder, the infos of the combined file shows Pages in the "Created by" field, which is strange as the combining software was Acrobat.
My suspicion is that the encoding softwares being different between Pages and Sibelius cause issues. In Pages the encoding software is "macOS Version 10.15.3 (Build 19D76) Quartz PDFContext", while in Sibelius it is "Qt 5.12.5".
While pdfScale has no issue in converting each one of them separately, it gets probably rightfully confused when it has to convert a PDF made up of 2A+B+2A where A is a Pages created PDF and B is a Sibelius created one.
From the screenshot you can see that margins were added to the Crop Box.
Would it be possible to set its margins to 0, simply? Maybe putting a condition that would check if the encoding software between the components is different (don't know if this is at all possible).
I think setting the size of one to the other would not be desirable as, as explained in the articles, sometimes one would want the media box to be bigger. We just want the CropBox to be itself, unmodified, therefore removing the margins would be enough I guess.
What do you think?

Hi, things went a bit hectic yesterday, so I could no finish anything.
Also, the readlink -f implementation for non-GNU systems is also being a pain to test and implement (this will fix the installer/upgrader on MacOSX, Solaris, etc).
Anyways, for your specific use case I already have a solution (which will be to reset all cropboxes to the same size as the Mediabox by issuing an execution flag). On top of that I will also add the option
to manually change the Cropbox to a custom size.
It will probably be something like
--cropbox a4
--cropbox 'custom mm 200x200'
--cropbox fullsize (or any other appropriate name)

So it will probably be similar to the regular page size definition.

Thank you so much!
I really appreciate all this!
Looking forward to seeing this in action!

Hi,
I have pushed a new Branch so we can test it before I merge and release it.
https://github.com/tavinus/pdfScale/tree/v2.5
Can you please try it and let me know?
I had trouble to test on MacOSX (currently only have a VM and it does not work very well).
Things to note

The Installer and the Upgrader should now work on MacOSX (can you please test them for me?)

Please note that the Upgrader will end up failing because it will download the old version from the master branch (for now). But if the installer of the new version works, the upgrader will also work after merging it to the master branch.

The GREP page size detection should not have any errors with your file Two.pdf anymore (uses strings)
-c | --cropbox option added

Here is the --help explanation for the --cropbox parameter
 -c, --cropbox <paper>
             Resets Cropboxes on all pages to a specific paper size
             Only applies to resize mode
             <paper> can be: full | fullsize - Uses the same size as the main paper/mediabox
                             custom          - Define a custom cropbox size in inches, mm or points
                             std paper name  - Uses a paper size name (eg. a4, letter, etc)

So on your case you should just add -c full to your pdfScale call and you should be fine.

The --upgrade is still not working for me on Catalina. Here is the Terminal output:
pdfScale.sh --upgrade
readlink: illegal option -- f
usage: readlink [-n] [file ...]
pdfScale.sh v2.4.9 - Self Upgrade

Preparing download to temp folder
 > /tmp/pdfScale_20200404-160012.tar.gz
Downloading file with curl

Extracting compressed file
Extraction error.

Cleaning up downloaded files from /tmp
 > /tmp/pdfScale_20200404-160012.tar.gz > Ok
 > no temporary master folder was found to remove

I have installed it manually and the version is not correctly 2.5.2.
I ran the script adding -c full and it works perfectly.
Do you have any suggestion on how to make this script automatically be applied on the content of a folder of PDFs and possibly adding a suffix to the name of the output? Or is the original Automator I pasted in the beginning the best thing?
Thank you so much for this!
I stay at your disposal for testing the upgrading issue on macOS.

The --upgrade is still not working for me on Catalina. Here is the Terminal output:
pdfScale.sh v2.4.9 - Self Upgrade

^ This was running 2.4.9, so it is normal for it not to work. Only 2.5.2 will run the upgrade properly on Macs (even though it will offer the older version, with a warning).
Proceeding with the upgrade will downgrade (until I merge with the master branch).
I was able to test on a Yosemite VM (which is when I found the problem with curl that was patched on 2.5.2).

I ran the script adding -c full and it works perfectly.
Do you have any suggestion on how to make this script automatically be applied on the content of a folder of PDFs and possibly adding a suffix to the name of the output? Or is the original Automator I pasted in the beginning the best thing?

Your automator script seems fine to what you need and I can't think any reason for it not to work with the new version.
Would be nice to have batch processing for folders included into pdfScale, but I am not sure I will be able to do it right now.
I will probably merge with master today, so everything will be easier to test and the upgrade will not downgrade anymore.

To install using the v2.5 branch you need to adjust the URLs
# Normal install with prompts
curl -s -o /tmp/pdfScale.sh 'https://raw.githubusercontent.com/tavinus/pdfScale/v2.5/pdfScale.sh' && bash /tmp/pdfScale.sh --install

# Automated install with --assume-yes
curl -s -o /tmp/pdfScale.sh 'https://raw.githubusercontent.com/tavinus/pdfScale/v2.5/pdfScale.sh' && bash /tmp/pdfScale.sh --install --assume-yes

# To ignore SSL, use --insecure
curl --insecure -s -o /tmp/pdfScale.sh 'https://raw.githubusercontent.com/tavinus/pdfScale/v2.5/pdfScale.sh' && bash /tmp/pdfScale.sh --install

I believe I had a similar problem resizing PDFs in letter format to A4. Sorry if this is hijacking this thread. Just wanted to give feedback that using --cropbox A4 works marvellously for me.
Here is an example of a scientific article in letter format: https://www.hydrol-earth-syst-sci.net/23/303/2019/hess-23-303-2019.pdf
The standard command doesn't yield the desired result. Although there are some differences in the dimensions of the Media and Crop Box with respect to the original file. It shows the pdf still in letter format:
pdfscale -v -r A4 Downloads/hess-23-303-2019.pdf
Using the --cropbox argument effectively modifies how the pdf is shown:
bernharf@bernstein:~|⇒  pdfscale -v -r A4 --cropbox A4 Downloads/hess-23-303-2019.pdf
pdfscale v2.5.3 - Verbose Execution
   Single Task: Resize PDF Paper
       Dry-Run: FALSE
    Input File: Downloads/hess-23-303-2019.pdf
   Output File: Downloads/hess-23-303-2019.A4.pdf
 Get Page Size: Adaptive Enabled
        Method: Grep
  Source Width: 612 postscript-points
 Source Height: 802 postscript-points
    Print Mode: Print ( auto/empty )
  Scale Factor: Disabled (resize only)
   Fit To Page: Enabled (default)
   Auto Rotate: PageByPage
   Flip Detect: No change needed
  Run Resizing: A4 ( 595 x 842 ) pts
 Cropbox Reset: A4 ( 595 x 842 ) pts
  Final Status: File created successfully

Not hijacking at all. Thanks for the feedback @fabern
From what I tested, most problematic PDFs had different cropbox sizes on different pages (some where very close but still a bit different).
If you want the cropbox reset to the SAME size as you are resizing, -c full should be the best option (will use the same size as the main resize in any case without the need to specifically set a size).

Ok,
v2.5.3 was merged and released and the v2.5 branch was deleted.
Feel free to report any problems.
Cheers 🍻
Gus


Add Swift support for FloatLiteralInst

Should we close this issue now then?

Yes, I will close this.


Issue with moving files

When the app tries to move files it encounters an error with a space in the folder name:
Error running shell command:  cp /tmp/cent1652100082/repo23/Template -3/detect-tracer-sc-web.yaml /root/nuclei-templates/Template -3/detect-tracer-sc-web.yaml   =>  exit status 1
cp: invalid option -- '3'

Folders with spaces are from this repo: https://github.com/NitinYadav00/My-Nuclei-Templates
Also, this repo does not exist anymore
https://github.com/joanbono/nuclei-templates
https://github.com/xm1k3/cent/blob/main/.cent.yaml#L32

Added a PR
https://github.com/xm1k3/cent/pull/19


Add new TCPTransport base class

In uvloop (more details here) I implement Transports on top of libuv streams. Here's documentation on TCP and general streams.
 All buffering is implemented in the libuv core. There is actually no way to access the underlying socket, which causes some problems. Right now, if you want to set TCP_NODELAY or SO_KEEPALIVE, the only way is to call Transport.get_extra_info('socket') and set them manually.  That's what aiohttp is doing, for instance.
I propose to add a new Transport base class - TCPTransport. It will have two specific to TCP methods: set_nodelay(bool enabled) and set_keepalive(bool enabled).
Without these methods, it's virtually impossible for me to create a transport that provides this functionality on top of libuv.  This is very similar to how this is done in Twisted and in Tornado.

"There is actually no way to access the underlying socket, which causes some problems. "
Hum, how do you plan to set TCP_NODELAY flag if you don't have access to the socket?
There are a lot of socket flags and options. I'm not sure that it's a good idea to add a method for each flag. It will be difficult to document the available of each method depending on the platform and the implementation of the event loop. We already have to take care in the documentation of subtle differences between SelectorEventLoop on UNIX and on Windows, and the special case of ProactorEventLoop.

Thinking on the issue I would suggest another solution: don't export 'socket' extra info by uvloop (it's impossible) but add uv-specific slot for controlling socket options in libuv way.
E.g. for utilizing nodelay and keepalive in aiohttp I should check for available options anyway: old asyncio should be supported as well as other asyncio-compatible loops like quamash etc. Explicit check for 'uv' along with 'socket' don't require a big maintenance burden, reusing existing API looks attractive.

"Thinking on the issue I would suggest another solution: don't export 'socket' extra info by uvloop (it's impossible) (...)"
Hum, does it mean that we should update the doc to mention that some info may lack depending on the event loop?
https://docs.python.org/dev/library/asyncio-protocol.html#asyncio.BaseTransport.get_extra_info

I believe yes.
If some transport implementation cannot provide 'socket' extra info it cannot be documented as mandatory.
it makes less harm than stating that libuv cannot be used with asyncio at all.

Hum, how do you plan to set TCP_NODELAY flag if you don't have access to the socket?

Libuv has two API methods for setting NODELAY and KEEPALIVE.

There are a lot of socket flags and options.

These two are important and popular enough to have explicit methods in Twisted and Tornado.

I'm not sure that it's a good idea to add a method for each flag.

I agree.  But in this specific case - those are very popular and important options. And I simply can't make my loop usable without them.

Hum, does it mean that we should update the doc to mention that some info may lack depending on the event loop?

Absolutely.  get_extra_info(..) may return None and you have to expect that.

I like Andrew's suggestion. Expose the libuv stream interface (wrapped in a helper object) through get_extra_info('libuv-stream'). That avoids the need for modifying the class structure of asyncio (or any other part of its implementation or interface). So user code could look like e.g.
uvstr = t.get_extra_info('libuv-stream')
if uvstr is not None:
    uvstr.set_nodelay(True)
else:
    sock = t.get_extra_info('socket')
    if sock is not None:
        sock.setsockopt(...)
    else:
        print('Cannot set nodelay')

Depending on how popular uvloop becomes we could eventually add a standard interface to asyncio so that you wouldn't have to do it one way for regular sockets and another way for uvloop, but that's not so important in the short term.

To my surprise (I think the function is documented in a wrong place) I found a way to extract the fileno from a libuv stream.  Now I can use socket.fromfd to finally implement get_extra_info('socket').
Still, I like the idea of explicit set_keepalive and set_nodelay. To me get_extra_info is just a leaking abstraction.  We should provide a better APIs for common tasks.

Hum. At what level in a network stack do "keepalive" and "nodelay" really
belong? I honestly don't even know what they mean. I still think that
people who want to set such options need to understand that they are
breaking through the abstractions provided by asyncio, and get_extra_info()
is exactly the right API to clarify that.
On Wed, Nov 25, 2015 at 9:08 AM, Yury Selivanov<EMAIL_ADDRESS>wrote:

To my surprise (I think the function is documented in a wrong place) I
found a way http://docs.libuv.org/en/v1.x/handle.html#c.uv_fileno to
extract the fileno from a libuv stream. Now I can use socket.fromfd to
finally implement get_extra_info('socket').
Still, I like the idea of explicit set_keepalive and set_nodelay. To me
get_extra_info is just a leaking abstraction. We should provide a better
APIs for common tasks.
—
Reply to this email directly or view it on GitHub
https://github.com/python/asyncio/issues/286#issuecomment-159674812.

--
--Guido van Rossum (python.org/~guido)


Add cairo1 runner

@MaksymMalicki  how is it going with this?
I see you made modification to the zero.go file, whats your plan exactly?


Source routing firmware device limitations

I'm considering switching my network over to using a CC2531 with source routing firmware, but I'm concerned with the amount of devices that can be connected. I read that it can support 5 direct children and 40 routes. I have a lot of routers in my network, so that will not be the issue.
My question is what does it mean that it is limted to 40 routes? Does it mean the complete network can only have 40 devices?
Why is that the case?  Still a memory issue of the CC2531?
Could I re-balance that to support even fewer direct children and support more devices?
Thanks for helping!

Does it mean the complete network can only have 40 devices?

No, it can store routes to up to 40 devices, having a route improves the efficiency when controlling a device (as it does not have to retrieve the route before controlling), this is only useful for routers.

Why is that the case? Still a memory issue of the CC2531?

Not really an issue, it's just a limitation of the device itself. If you want to build networks of 40+ devices I would recommend the CC26XR1 or CC1352P-2 (https://www.zigbee2mqtt.io/information/supported_adapters.html#texas-instruments-cc26x2r1)

So I have a network of 41 routers and 12 end devices, so I guess that counts as a large network for a CC2531. Maybe time for me to dive into the code to understand what is behind the efficiency remark. I'm not completely clear on what is handled by the coordinator firmware and what is handled in ZigBee2mqtt code. Anywhere you recommend to start?
Currently I'm running it with a DeConz coordinator, but I'm slowly getting fed up with minor stability issues. Although up to now the support has been great, it's simply not open source, so I cannot contribute. Which is becoming a bit frustrating.
Would you say the new CC26XR1 is ready for'production use' (meaning my wife doesn't get pissed because of lights not working)?

Everything above a cc2531/0 is an improvement. So even the cc2538 will bring a noticeable difference. That one is cheaper than the CC26XR1 or CC1352 but also provides a faster chip. All those chips should benefit from the major improvements in software, which do include stability. I geuss the improvement in hardware provides the most stability.
I'm unable to judge if this currently is more stable than deconz.

Would you say the new CC26XR1 is ready for'production use' (meaning my wife doesn't get pissed because of lights not working)?

Yes, definitely, in your case I would really recommend the CC26XR1. The CC2531 is running the complete zigbee stack (so almost everything runs on there), the CC2531 is just too much limited by the hardware/processor on it, especially for larger network.

OK. Thanks for the clarifications/advice.


Fix the issue of switch-string change line when condition is \n

When print the switch-string, encode the string content.

Hi @jimmyleeeeee
Sorry it took me some time to get to this, but it doesn't look like this PR looks quite right, as it seems that most, if not all, these changes are already merged (On Apr 13 and 14). Did I miss some?
cheers,
Derick

Yes, the code has been merged.  I close it here.


onedb fsck is deleting the references between VMs and their backup images

Description
As part of the OpenNebula upgrade procedure , the command onedb fsck is executed during every OpenNebula upgrade. Even if is not an upgrade, sometimes you need to fix some inconsistencies in the DB. Right now this could be a problem, because is deleting the references of each one of the VMs with their respective backup images. The following snippet is from an output after run onedb fsck during upgrade from 6.6.0 to 6.6.1, but as I said before, you just need toi make use of command, to make unsusefull all your backups in the cloud. They will be physically there, on your REMOTE_HOST, but they are no longer usefull in the cloud.
The output after run onedb fsck:
WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.
MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2023-4-11_16:44:45.sql
Use 'onedb restore' or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file

Image 2001 is in Datastore 102 image id list, but it should not
Cluster 0 has not the proper reserved VNC ports
VM 122 is in Image 1964 VM id list, but it should not
VM 158 is in Image 1968 VM id list, but it should not
VM 237 is in Image 1970 VM id list, but it should not
VM 124 is in Image 1990 VM id list, but it should not
VM 247 is in Image 1996 VM id list, but it should not
VM 273 is in Image 2003 VM id list, but it should not
VM 238 is in Image 2008 VM id list, but it should not
VM 251 is in Image 2012 VM id list, but it should not
VM 248 is in Image 2013 VM id list, but it should not
VM 119 is in Image 2017 VM id list, but it should not
VM 123 is in Image 2019 VM id list, but it should not
VM 121 is in Image 2020 VM id list, but it should not
VM 120 is in Image 2021 VM id list, but it should not
VNet 12 AR 0 has leased <IP_ADDRESS> to VRouter 1, but it is actually free
VNet 12 has 17 used leases, but it is actually 16
VNet 13 AR 0 has leased <IP_ADDRESS> to VRouter 1, but it is actually free
VNet 13 has 7 used leases, but it is actually 6

Total errors found: 19
Total errors repaired: 19
Total errors unrepaired: 0
A copy of this output was stored in /var/log/one/onedb-fsck.log

All those images were backups. This is very dangerous, to lose all those references.

NOTE
Until OpenNebula team fix this issue, I recommend to use one of the following actions:

Execute onedb fsck knowing that this will make unusefull all your backups in the cloud, in order to fix other inconsistencies in the database.
Dont run ever onedb fsck, even after an OpenNebula upgrade, going against the official documentation.

To Reproduce
Execute:
onedb fsck

Expected behavior
Fix inconsistencies on the database, but backups images should not be considered as an inconsistency.
Details

Affected Component: [Storage]
Hypervisor: [KVM]
Version: [6.6.0, 6.6.1]

Progress Status

[ ] Code committed
[ ] Testing - QA
[ ] Documentation (Release notes - resolved issues, compatibility, known issues)

PRs:

src
tests
release notes


refactoring cognitive complexity function

Proposed change
This PR refactors the async_get_integrations function to reduce its cognitive complexity from 28 to the allowed 15. The refactoring breaks the function into smaller, more focused helper functions, improving readability, maintainability, and testability without altering functionality.
Type of change

[ ] Dependency upgrade
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New integration (thank you!)
[ ] New feature (which adds functionality to an existing integration)
[ ] Deprecation (breaking change to happen in the future)
[ ] Breaking change (fix/feature causing existing functionality to break)
[X] Code quality improvements to existing code or addition of tests

Additional information

This PR fixes or closes issue: fixes #
This PR is related to issue:
Link to documentation pull request:

Checklist

[X] The code change is tested and works locally.
[X] Local tests pass. Your PR cannot be merged unless tests pass
[X] There is no commented out code in this PR.
[X] I have followed the development checklist
[X] I have followed the perfect PR recommendations
[X] The code has been formatted using Ruff (ruff format homeassistant tests)
[X] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated for www.home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] The manifest file has all fields filled out correctly.
Updated and included derived files by running: python3 -m script.hassfest.
[ ] New or updated dependencies have been added to requirements_all.txt.
Updated by running python3 -m script.gen_requirements_all.
[ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

[ ] I have reviewed two other open pull requests in this repository.

The solution looks good, but the functions should use strong typed parameters.


Artigaund search filter controller added

Added searchProduct and filterProduct controller to the Product controllers.

@Trisha-tech level is not added to it.

Hi @Trisha-tech
This is sanjay, PM gssoc
I would like to know why its not yet merged , let me know if any technical issue I can help you with .

@sanjay-kv its merged but not labelled.


Avoid crash if git command is not installed

For example, when using this in Docker.

Hey @asood123, are you planning to publish this change to npm?

Wasn't but happy to do when I'm on computer

Hmm I don't have permission to publish this. @xdamman - can you publish or
add me?
On Tue, Aug 16, 2016 at 7:24 PM Philippe Modard<EMAIL_ADDRESS>wrote:

Hey @asood123 https://github.com/asood123, are you planning to publish
this change to npm?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OpenCollective/express-server-status/pull/1#issuecomment-240269927,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF0vPQ4VmZBT9GLWfc7aTIh0sqj57rDfks5qgkbEgaJpZM4JhtdS
.


Prioritize host arg

Otherwise launching the program with the --host argument does nothing

Ops, there is a HOST env var in FreeBSD which I didn't know. It is a kind of my fault, I should add prefix to these variables like UPTIMEKUMA_HOST and UPTIMEKUMA_PORT.


Added support for variadic parameters + fixed unwanted macro expansion in struct-like field/variable dereferences (with -> or .) with the same name as macro

Variadic macros, such as
#define var(...) __VA_ARGS__
var(1, 2 3, "abc") // expands to: 1, 2 3, "abc"

should now be supported.
Macros should now have the following behaviour with struct-like dereferences:
#define test 1
test->field; // not expanded
struc->test; // not expanded
test // 1
(test)->field; // (1)->field;

The code seems to pass old and new tests.

Hey, thanks for contributing. I'll have a look through this tonight sometime.
I'm not certain about the behavior here regarding expansion of struct like dereferences. I would have expected these values to be replaced as they originally were. I definitely depend on this behavior in my own C libraries. Perhaps you could share the context of why you are making this change?

I was using the tool for my purposes and I had the problem of a struct field conflicting with macro name. This occasion is very specific, but I still thought it would be nice to just fix it, as normal preprocessors shouldn't expand names in such cases (unless in parentheses, like test case 4 shows).
Honestly, I would even advocate for checking if a variable declaration exists with some name to not expand macro in those cases, but that would require parsing the whole C AST, which neither of us are a big fan of, I guess...

Sorry NotYourFox, This sounds like a problem that should just be resolved by changing your own macros.
The behavior of this python module should be to mimic the C preprocessor as closely as possible - and so the existing behavior remains the correct behavior. Changing it to suit your use case here would just break it for anyone who is using it for C inspection.
I do want to see the varargs change implemented - so I may cherrypick those changes.

Well, it seems like you are totally right about standard macros. I have figured that this expansion problem arises with function-like macros, so
#include <stdio.h>

struct {
    const char * field;
    const char * test;
} struc = {
    .field = "struc.field",
    .test = "struc.test",
};

struct {
    const char * field;
    const char * test;
} test = {
    .field = "test.field",
    .test = "test.test",
};

#define struc(x) test

int main()
{
    printf("%s\r\n", struc.field);
    return 0;
}

prints out "struc.field" in the compiler, but the preprocessor tries to expand "struc(x)" macro and throws an exception "Macro struc expects arguments".
I guess it is viable and possible to fix it only for this kind of macros, maybe introduce name mangling in the expansion time, after checking for duplicate macros?
I will soon create a merge request with only the variadic macros thing involved, but I am looking forward to your response to the above.

On point, I've noticed an issue with mixing varargs with regular ones, now it should be fixed.


drivers: serial: stm32: l4 pinmux fix usart6 rx define

@erwango separate fix of invalid USART6 RX definition.

Codecov Report

Merging #14054 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #14054      +/-   ##
==========================================
- Coverage   52.23%   52.23%   -0.01%
==========================================
  Files         307      307
  Lines       45469    45469
  Branches    10526    10526
==========================================
- Hits        23753    23752       -1
  Misses      16914    16914
- Partials     4802     4803       +1

Impacted Files
Coverage Δ

arch/posix/core/posix_core.c
90.9% <0%> (-1.02%)
:arrow_down:

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 aee196d...477d84f. Read the comment docs.


[SDP-1355] increase token refresh window

What
Increase token refresh window.
Why
It was too short and causing the session to expire very often. We're changing it with this frontend change, where we add a token refresher to the frontend codebase.
Checklist
PR Structure

[x] This PR has a reasonably narrow scope (if not, break it down into smaller PRs).
[x] This PR title and description are clear enough for anyone to review it.
[x] This PR does not mix refactoring changes with feature changes (split into two PRs otherwise).

Thoroughness

[x] This PR adds tests for the new functionality or fixes.
[x] This PR contains the link to the Jira ticket it addresses.

Configs and Secrets

[x] No new CONFIG variables are required -OR- the new required ones were added to the helmchart's values.yaml file.
[x] No new CONFIG variables are required -OR- the new required ones were added to the deployments (pr-preview, dev, demo, prd).
[x] No new SECRETS variables are required -OR- the new required ones were mentioned in the helmchart's values.yaml file.
[x] No new SECRETS variables are required -OR- the new required ones were added to the deployments (pr-preview secrets, dev secrets, demo secrets, prd secrets).

Release

[x] This is not a breaking change.
[x] This is ready for production.. If your PR is not ready for production, please consider opening additional complementary PRs using this one as the base. Only merge this into develop or main after it's ready for production!

Deployment

[x] Does the deployment work after merging?

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr437.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr437.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr437.previews.kube001.services.stellar-ops.com

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr437.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr437.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr437.previews.kube001.services.stellar-ops.com


Allow Managed Identity to access to APIC portal

What are you trying to achieve?
In this APIC video, we have to use a service principal to access to APIC portal.

However, APIC has already the Managed Identity feature. Can we use this managed identity to access to the APIC portal, instead of creating a new service principal?
Proposed solution

Use Managed Identity, users can access to the APIC portal.

Additional context
Managed Identity (MI) is basically working as like a Service Principal, which is the same as the app registered through App Registration. MI works slightly differently though.
To me, it gives me implication that the app registration process outside APIC blocks users from being more accessible because they have to be out of the APIC screen 👉 Go to Entra ID 👉 Do the app registration 👉 Do all the permissions stuff 👉 Be back to APIC to finalise.
I think the purpose of MI is to simplify these steps. Please correct me if I'm wrong about MI.

@justinyoo , I don't work for Microsoft, so I might be wrong, but I believe that the reason you need to create an Entra App Registration ("AppReg") is because:
Any website that gives humans an opportunity to click a "sign in" button and then sign into that website as their human Entra identity...
...needs to be able to tell those humans what website it is that's asking for them to click a "yes, go ahead and log in as my Entra identity; I trust this website to know who I am" prompt.
Typing the "What website I am" information in is something that can only be stored on an AppReg, not on the Entra/Azure System-Assigned Managed Identity ("SMI") that you can flip on for a given Azure APIC resource.
So, while things like your APIC resource's SMI's associated Entra Service Principal can do things like serve as the principal for an Azure RBAC Role Assignment (e.g. so that your APIM resource can let your APIC resource in as a reader of what all is sitting around in APIM)...
...I believe that saying "Hi, I'm website X -- are you sure you want to log into me as your Entra human identity?" isn't something that can be done through an Entra Service Principal at all.
Therefore, it's not actually the Entra Service Principal associated with an AppReg that you're interested in when you create the AppReg, in this case.  Which is why a SMI isn't an alternative to an AppReg.
Instead, I believe what you're creating the AppReg for is its ability to say, "Hi, I'm website X!"

@kkgthb is spot on here! We still need to do an app registration for the reasons explained in that reply. I'll go ahead and close this - if there's any more confusion happy to chat at<EMAIL_ADDRESS>Thanks again for your bug report :)


feat(docker/containers): new nvidia container toolkit

closes #3143
refactor #4791
Changes:

based on master version 2.11.1
add gpus use information on backend
need to manual input the GPUs info at  endpoint modification
show GPUs use at dashboard and and containers list view
add gpu support when create container (refactor code)
show gpu command equivalent on container details view (refactor code)
show available gpus when create container

/azp run

Looks like this needs a rebase...

Sure, give me some time

By the way, when is the next release?

The next release actually is going to be next week.

@huib-portainer hello, I'm done. Please check.

/azp run

Thanks for moving it all over and base it on the develop branch.
Currently there seems to be an issue with go test
https://github.com/portainer/portainer/blob/df05914facc8d245c38de1b41963b3eb81fdafab/api/datastore/migrate_data_test.go#L30

Sorry,  I do modify the backend definitions. Please check again. @huib-portainer

/azp run

Unfortunately still no luck.

/azp run

/azp run

This can be tested by using the image portainerci/portainer:pr6872.

The home screen now isn't loading for me:

@huib-portainer I clean my all env, and restart with portainerci/portainer:pr6872. But nothing wrong happened. Do you start in a new environment?

It works fine on a new install, but it doesn't work when upgrading from an older version.

I need help... What should I do if newly defined backend variables are missing when upgrading?
The new variables are:
struct DockerSnapshot:
GpuUseAll=false (new)
GpuUseList=[]  (new)
struct Endpoint:
Gpus=[]  (new)

You may actually have to add a db migration I think: https://github.com/portainer/portainer/tree/develop/api/datastore/migrator

I manually coded the migration script, please test it.

/azp run

Currently the tests are failing the build

Actually, for the upgrade to work you'll also need to bump this one to 41
https://github.com/portainer/portainer/blob/ca30efeca73ce5ac65fd5c63b95b20f1ac677291/api/portainer.go#L1350

Actually, for the upgrade to work you'll also need to bump this one to 41
https://github.com/portainer/portainer/blob/ca30efeca73ce5ac65fd5c63b95b20f1ac677291/api/portainer.go#L1350

I found the db40 already exists.

/azp run

@prabhat-org can you please advise?
Currently the build is failing because of

@dfldylan Since you have updated the DB version to 41, it has to be updated in the /api/datastore/test_data/output_35.json file like you have updated other properties. I know the name is confusing; we will change the name of the file to something like output_latest.json. The property name is version.DB_VERSION.

Previously, only free GPUs could be selected when creating containers. Now, All GPUs can be selected, with an added hint of whether they are occupied or not.

/azp run

Thanks for bearing with us!
Upgrading an existing Portainer instance now works as well.

Don't worry about the merge conflicts, we'll resolve those later.
We're aiming to release 2.14 this month and then pull this PR into the 2.15 release.
So we'll sort that out on our end.

Thank you!


Add example script for digital ocean

We offer example scripts for users who want to use kubicorn as a library. We have one for AWS here
https://github.com/kris-nova/kubicorn/blob/master/examples/aws.go
Can we please make one for digital ocean?

I've added a digital ocean example and created a pull request #148. I have however not been able to test this because i could not find any documentation no how to use this. If you could point me in the right direction i would test it fully.

You should just be able to go run the file

Looks like there is still a problem here. When running go run basiccluster.go i get the following output:
2017-08-05T22:48:15+02:00 [✔]  Init Cluster
2017-08-05T22:48:15+02:00 [▶]  Running preprocessors
2017-08-05T22:48:15+02:00 [▶]  ssh.Expected
2017-08-05T22:48:15+02:00 [▶]  ssh.Render
2017-08-05T22:48:15+02:00 [▶]  droplet.Expected
2017-08-05T22:48:15+02:00 [▶]  droplet.Render
2017-08-05T22:48:15+02:00 [▶]  droplet.Expected
2017-08-05T22:48:15+02:00 [▶]  droplet.Render
2017-08-05T22:48:15+02:00 [▶]  ssh.Actual
2017-08-05T22:48:15+02:00 [▶]  ssh.Render
2017-08-05T22:48:15+02:00 [▶]  droplet.Actual
2017-08-05T22:48:15+02:00 [▶]  droplet.Render
2017-08-05T22:48:15+02:00 [▶]  droplet.Actual
2017-08-05T22:48:16+02:00 [▶]  droplet.Render
2017-08-05T22:48:16+02:00 [▶]  ssh.Expected
2017-08-05T22:48:16+02:00 [▶]  Using cached ssh [expected]
2017-08-05T22:48:16+02:00 [▶]  ssh.Actual
2017-08-05T22:48:16+02:00 [▶]  Using cached ssh [actual]
2017-08-05T22:48:16+02:00 [▶]  droplet.Apply
2017-08-05T22:48:16+02:00 [▶]  Actual   : 3aa0d9d5c8e4d36d844617b475d278fc
2017-08-05T22:48:16+02:00 [▶]  Expected : 76476dc182047a11b96afb03f50093aa
2017-08-05T22:48:16+02:00 [✔]  Created SSH Key [11664620]
2017-08-05T22:48:16+02:00 [▶]  ssh.Render
2017-08-05T22:48:16+02:00 [▶]  droplet.Expected
2017-08-05T22:48:16+02:00 [▶]  Using droplet subnet [expected]
2017-08-05T22:48:16+02:00 [▶]  droplet.Actual
2017-08-05T22:48:16+02:00 [▶]  Using cached droplet [actual]
2017-08-05T22:48:16+02:00 [▶]  droplet.Apply
2017-08-05T22:48:16+02:00 [▶]  Actual   : 434e48409fae71cae25365cb9b27b321
2017-08-05T22:48:16+02:00 [▶]  Expected : 0bdaa31228b9fb5110fbe07b56c83f2e
2017-08-05T22:48:17+02:00 [✖]  Error during apply! Attempting cleaning: POST https://api.digitalocean.com/v2/droplets: 422 There was an error while trying to create your tags. Please try again.
2017-08-05T22:48:17+02:00 [!]  --------------------------------------
2017-08-05T22:48:17+02:00 [!]  Attempting to delete created resources!
2017-08-05T22:48:17+02:00 [!]  --------------------------------------
2017-08-05T22:48:17+02:00 [▶]  ssh.Delete
2017-08-05T22:48:17+02:00 [✔]  Deleted SSH Key [11664620]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb58f74]

goroutine 1 [running]:
main.main()
        /home/peter/goprojects/src/github.com/mydigitallife/kubicorn/examples/digitalocean/basiccluster.go:51 +0x174
exit status 2

@MyDigitalLife do you already have that tag created? It could be similar issue to the SSH keys. We should make sure that if resources such as keys and tags exists, they should be used rather than error.

I had some droplets that have had the tags but they where already deleted at that point. I don't really see any existing list of tags in the web UI. In the Digital ocean documentation it does look like it has a list of tag saved and it is probably throwing the error because they already exist like you said.
I'l try and fix this tomorrow. We should first check what tags exist and use those before trying to make new ones.

That's true, even when you delete a Droplet, tags are not deleted.
You have to use this API endpoint to list all tags and then this one to delete.
Or you can use CLI - doctl to list and delete them (doctl compute tag list, doctl compute tag delete).
If you need any help, comment here and I'll try to take a look tomorrow.

Where are we on this? Is this still blocking?

I just tested this and found a few problems. I don't the error i was getting before. But i did find these 2 problems:

Meshbird does not work anymore. The changes to make openvpn broke the code for meshbird
Deleting of droplets does not work. Its just giving Droplet count mis-match, trying query again

Closed by #148