WIP: Bug8522 automated

Pull Request Template
Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request.

Description

Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation
and context. List any dependencies that are required for this change.

Fixes # (issue)

if no issue exists, please create an issue and ask the maintainers about this first

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)
This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
Please also list any relevant details for your test configuration.

Test A
Test B

Checklist:

[ ] 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

Test coverage results :test_tube:
:red_circle: Total coverage has decreased
// Code coverage diff between base branch:release and head branch: test/BugsAutomation

Status
File
% Stmts
% Branch
% Funcs
% Lines

:red_circle:
total
55.14 (0)
37.07 (-0.01)
33.96 (0)
55.64 (-0.01)

:red_circle:
app/client/src/utils/autocomplete/TernServer.ts
52.71 (-0.23)
40.83 (-0.84)
36.21 (0)
56.74 (-0.25)

opened by mistake


fix "Delete button turns white after first touch #28"

fix issue #28

Please Merge this PR @aritraroy
I think this should solve issue #28


Rename artifacts with pdf files from "result" to "cards"

This fixes #30.

Action executed succesfully, so let's merge this.

Cool, thanks!


Firefox automatically scrolls chat window back to top

Hi,
I'm having an issue with various Firefox version (Firefox ESR 45 on Debian Stretch, Firefox 51 and 52 on Windows 7), where the chat window automatically scrolls back to the top. It does however not happen with Chromium or Internet Explorer.
A recording of the problem can be found here: https://u.teknik.io/oloDE.mp4
I'm using convos 0.99_27
EDIT: This also happens when a new message arrives.

This is now fixed in 0.99_28. The problem was that I tried to set an element attribute, which is in conflict with a method name:
-            $message.closest(".scroll-element").get(0).scrollTo = $message.get(0).offsetTop;
+            $message.closest(".scroll-element").get(0).nextTickScrollTop = $message.get(0).offsetTop;

Thanks for the super quick fix!


Enable the 'up' script in openvpn server config

After setting some masquerading rules in /etc/openvpn/server.up.d/myrules.sh I found out that the openvpn server does not source the /etc/openvpn/server.up.sh as advertised by this cookbook.
This PR restores the functionality by setting the necessary attributes to have a up /etc/openvpn/server.up.sh line appear in the generated openvpn server config.

+1

Nice catch, thank you @jperville.


FEATURE REQUEST: In menu edit - undo and redo commands write which one command will be proceed if do this action (like undo paste, redo format)

In menu edit - undo and redo commands write which one command will be proceed if do this action (like undo paste, redo format)
Example:

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


k8s statefulset completely distributed

we want pod-0 primary on node1,secondary  on node 02

pod-1 primary on node3,secondary on node 04, use followTopology + autoplace （or manual,we decide which node），When I'm done developing，can i bring up a PR


First time start in development mode doesn't completes successfully

So only one of the server starts successfully and the other one(s) are not, as you can see here:
yarn dev v0.24.6
$ razzle start
 WAIT  Compiling...

 DONE  Compiled successfully

Your application is running at http://<IP_ADDRESS>:80

So I need to terminate the batch job and start it again.
Steps to reproduce:

Delete the build folder
Start the server in development mode

I am working on a fix for Windows. Again this doesn't happen on Mac.
yarn add rimraf --dev
in your package.json start script
{
   "scripts" {
      "start": "rimraf build && razzle start"
   }
}

Are you running in VM ?

No, I am using Windows (10) on my laptop.
This issue is not a big deal for me at all, I just reported it.

Hi @jaredpalmer, you can keep this issue closed if you wish.
I am just leaving a note here that this is still an issue as of version 0.8.2.

On linux, on a fresh start (the build folder doesn't exist), this issue is present.
$ yarn start 2>&1 | tee error
# content of error file
yarn start v1.0.1
$ razzle start
 WAIT  Compiling...

 DONE  Compiled successfully

Your application is running at http://localhost:3000

Content of build folder:
$ ls build
assets.json

Apparently, the build folder is created after the server is compiled. If the build folder is created before running yarn start everything works as expected:
$ rm -rf build && mkdir build && yarn start 2>&1 | tee output
# content of output
yarn start v1.0.1
$ razzle start
 WAIT  Compiling...

 DONE  Compiled successfully

Your application is running at http://localhost:3000

 WAIT  Compiling...

 DONE  Compiled successfully

Your application is running at http://localhost:3000

✅  Server-side HMR Enabled!
> Started on port 3000

Steps to reproduce
As @kireerik said:
rm -rf build
yarn start

Content of build:
$ ls build
assets.json  server.js  server.js.map

Workaround
Add rimraf (as @jaredpalmer suggested) and mkdirp (in order to create the build folder):
yarn add --dev rimraf mkdirp

And edit package.json:
{
  // ...
   "scripts" {
      "start": "rimraf build && mkdirp build && razzle start"
   }
  // ...
}

Versions:
$ uname -a
Linux 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017 x86_64 GNU/Linux
$ node -v
v8.4.0
$ yarn -v
1.0.1
$ yarn list razzle                                                                                yarn list v1.0.1
└─<EMAIL_ADDRESS>Done in 0.95s.

Hi @jaredpalmer, you can keep this issue closed if you wish.
I am just leaving a note here that this is still an issue as of version 0.8.7.

I don’t have a windows machine and can’t replicate on Mac

I'm experiencing the same issue and I'm not using yarn (the same behavior appears on Windows and GNU/Linux)... sometimes the process just got stuck on "Your application is running at http://localhost:3000" (no other outputs) even though the server is never started.

This is no longer an issue as of version 2.x.


Unhandled Runtime Error - "Cannot redefine property: googletag" in Next.js App

I am creating a new Next.js app and encountered an error during installation of shadcn-ui. When I ran the command  "pnpm dev", I received the following error:
Unhandled Runtime Error TypeError: Cannot redefine property: googletag
I am using Next.js version 14.1.0 and the following dependencies:
react: ^18
react-dom: ^18

I have tried restarting my development server and clearing my npm cache, but the issue persists.

I am also facing the same issue...

I deleted the node modules folder and .next folder and reinstalled the node modules and it seemed to get rid of the issue for me.

I am also facing same error

Hi everyone, I wanted to apologize for the previous issue. It turns out it was caused by a conflict with a browser extension I'm using called "Stands" (an ad blocker). Once I disabled it, the errors disappeared.
I just wanted to share this experience in case anyone else encounters similar problems. It might be helpful to temporarily disable all browser extensions and then re-enable them one by one to see if any are causing issues.
I hope this information is useful!

Disabling "Stands" the error disappeared, but the following still persists:
Uncaught SyntaxError: Identifier 'observeDomChanges' has already been declared (at ruleApplier.js:1:1)

@euhansarkar Thank you for sharing! Had the same issue as well. Turning off "Stands" solved both issues

Unhandled Runtime Error TypeError: Cannot redefine property: googletag
Uncaught SyntaxError: Identifier 'observeDomChanges' has already been declared (at ruleApplier.js:1:1)
for me.


feat: react color

we still need to move the js to ts and refactor the whole components, this PR is just to approve that the clone version of the package  is working after i remove the classes and use the functional component code base

@hamed-musallam ok. Just try to rebase your PR on the main branch to remove the commits that are already there.

done

@hamed-musallam ok. Just try to rebase your PR on the main branch to remove the commits that are already there.

done

There is still https://github.com/zakodium-oss/analysis-ui-components/pull/125/commits/800f783b1b80db7378c92ae042bf43eca88515cf to be removed

@targos
i removed reactcss and replace it with inline style, can you check the component and see if we need more changes?

Should the package not expose this ColorPicker ?
Should the component itself not be called ColorPicker ?

Yes, the component should be called ColorPicker. And please fix the merge conflict.

Also, please rename the colorPicker folder to color-picker and put the original license file from react-color inside it.

@hamed-musallam I made a few fixes on the types and some cleanup. Is it ready from your PoV?

@targos
yes, it is ready, unless you need more changes?


Fix issues with PHP version handling in build

Builds are failing in PHP7.4, because of an issue with the build scripts.
Tests tagged asphp5.4 are running in 7.4, because only the minor version is checked.
This pull request fixes these issues, and simplifies the handling of language version numbers generally.

@Sam-Burns can you re-rebase this against master now the appveyor thing is merged please?

@ciaranmcnulty rebased.


pr: 39

Codecov Report

Merging #44 into master will decrease coverage by 0.16%.
The diff coverage is 91.89%.

@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
- Coverage   76.88%   76.71%   -0.17%
==========================================
  Files          22       22
  Lines         558      567       +9
==========================================
+ Hits          429      435       +6
- Misses        129      132       +3

Impacted Files
Coverage Δ

peon/src/comandline/comandline.py
0.00% <0.00%> (ø)

...ject/file/function_def/expression/returned_expr.py
94.44% <92.00%> (-5.56%)
:arrow_down:

peon/src/lint/lint.py
89.28% <100.00%> (-3.03%)
:arrow_down:

peon/src/lint/report/report.py
91.30% <100.00%> (+1.83%)
:arrow_up:

Continue to review full report at Codecov.

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


Firefox font fix

Firefox doesn't seem to correctly load the TTF version of Inter font and seem to complain about font options being unavailable in the file. Quick fix is to replace it with WOFF2 (ironically is smaller file size)

Firefox doesn't seem to correctly load the TTF version of Inter font and seem to complain about font options being unavailable in the file. Quick fix is to replace it with WOFF2 (ironically is smaller file size)

I was actually wrong about this, and the browser is actually trying to load the locally installed Inter font (which isn't a variable font type) and Firefox complains it can't load some weights or slant values but Chrome seem to just fallback to whatever is available for that font type.
To mitigate this, I renamed the font-family name to InterVariable so it would, less likely, match an OS installed Inter font. Also, changed to use the woff2 version for smaller file size.


add a db node

add an instance dedicated to run slurmdb and related tasks

This is complete when:

[ ] I've got a new instance added to the configuration to run slurm + slurmdbd <- mariadb + mysql
[ ] vslurm works the same way it did before i made the changes (run terraform, log in, start manipulating the cluster)
[ ] the documentation is updated (diagram + terraform variables)


Rename extension

Renamed files/directories and did a final scan to make sure all references are caught (hopefully). Still confirming it's working properly.


chore: Optimize HashMap: linear-probing approach

Description
Problem*
Resolves https://github.com/noir-lang/noir/issues/4584
Summary*
This is a linear probing approach to implementing the stdlib's HashMap.
This is the closest to master of the new approaches but has an additional change besides linear probing over quadratic probing: the maximum number of iterations is capped at MAX_COLLISION_LEN.
One advantage of this approach is that unlike the bucketed approach where the total slot count is multiplied by the bucket length, the total slot count here is just the same slot count specified by the user (minus the MAX_COLLISION_LEN constant factor).
Additional Context
So far this approach has been drastically under performing compared to expectations. See the benchmarks in the main PR: https://github.com/noir-lang/noir/pull/4603
Documentation*
Check one:

[ ] No documentation needed.
[ ] Documentation included in this PR.
[ ] [Exceptional Case] Documentation to be submitted in a separate PR.

PR Checklist*

[ ] I have tested the changes locally.
[ ] I have formatted the changes with Prettier and/or cargo fmt on default settings.

Closing this PR, its too much spam to open each branch as a separate PR


Fuse.js demo produces unexpected results

Is there an existing issue for this?

[X] I have searched the existing issues

Description of the bug
I initially followed the community guidelines and posted to stackoverflow, but it seems that may not be seen, so reposting here.
I am evaluating client-side search tools, and I tried the demo for Fuse, but it's producing results I didn't expect. I don't know if it's a "bug", or just expected behavior, but it was not what I expected.
The demo has a list of elements, the third element (from the top) looks like this:
  {
    "title": "HTML5",
    "author": {
      "firstName": "Remy",
      "lastName": "Sharp"
    }
  }

The text "Remy" appears only in this one element.
If you enter "remy" as a search term, you get the following results:
[
  {
    "item": {
      "title": "HTML5",
      "author": {
        "firstName": "Remy",
        "lastName": "Sharp"
      }
    },
    "refIndex": 2
  },
  {
    "item": {
      "title": "The Preservationist",
      "author": {
        "firstName": "David",
        "lastName": "Maine"
      }
    },
    "refIndex": 20
  },
  {
    "item": {
      "title": "Angels & Demons",
      "author": {
        "firstName": "Dan",
        "lastName": "Brown"
      }
    },
    "refIndex": 7
  }
]

The search results correctly retrieve (and rank) the element with "firstName": "Remy", but I can't figure out why the other two results are there. There doesn't seem to be anything in the indexed data for these other results that contain the work "remy".
I think I expected just one result.
The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?

[ ] This is a regression bug

Which version did this behavior use to work in?
None
Steps To Reproduce
Search for the term "Remy" in the online demo
Expected behavior
I expected to see a single match for the term"remy"
Screenshots
No response
Additional context
No response

I think this is due to the fuzziness of the search. If you enable the includeMatches option it shows you, why it thinks an entry matches. What you experienced as false positives are just very fuzzy matches.
What you can do to decrease the fuzziness is to tweak the matching options. Although I do agree with you that the default settings are indeed very fuzzy resulting in very confusing matches.

Hmm.. yeah. This "threshold" value seems tricky. Intuitively, if I set it to 0.0 my expectation would be "no fuzzies please", which actually works for the search term ("Remy") in the original issue, but returns 0 results for other queries which should match (e.g. "Artist"). This feels like a tricky value to get right. I get that fuzzy is "fuzzy", but I can't help but think that a mode which matches literal strings only (with ranking based on frequency of occurrence and ordering of tokens, stemming in an ideal world) would be helpful. I would say that would generally be favored as the default, with fuzziness and option above that.

If you set threshold=0 and ignoreLocation=true. It does what you want, but this library is all about fuzzy search so…
The reason it doesn't work without ignoreLocation is that the search string is not exactly at the location you expect it to be and therefore the score is reduced (increased actually as the 0 is a perfect match) and filtered out by the threshold.

That's fair. What I actually wanted was just an inverted index in pure JS. Fuse says it right on the tin, it's a "lightweight fuzzy-search, in JavaScript". I guess I skipped past that and just saw "search" 😄


Added board expansion action

Added current members to governance.md
Added announcement
Added action, linked to announcement

Also:

fixed bug where actions macro was reading hidden files and barfing

Fixes #189
Updated  governance.md which results in:

Added to /actions which results in:

Should document history of governance.md be edited to reflect this change?

@jlstpaul  - added to governance history and referenced board action. Thanks for flagging!


bug fix for ssh

Related command
az webapp create-remote-connection
Description

This PR fixes the ssh bug for azure app service webapps
Testing Guide

Used the azdev tool to test the command.
History Notes

[SSH tunnel] az webapp create-remote-connection: Updated the host address of ssh tunnel to <IP_ADDRESS> from <IP_ADDRESS>

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

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

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

webapp


example of client feeding logs into server

just to get going to try this out.
And also example of queries to run on the web interface.

What is this ticket about? Unless you provide more detail I will close it.

Are you talking about how to send logs into Ekanite, and run queries? It's fully outlined in the README.
I'm closing this, but let me know if I am misunderstanding you.


AngularJS request GET, ERR_NAME_NOT_RESOLVED

Hi,
I try to develop an application with electron and angularjs, with GET request.
I build my APP to the MASS, I generate a file .app
When I launch my app and my get request (http://mywebsite.com/myfile.txt), I have an error ERR_NAME_NOT_RESOLVED.
How can I rmeove this error and remote my file please ?

I am experiencing the same problem.

@cameron-white-janrain I used  "electron-builder": "3.27.0", "electron-prebuilt": "0.36.12", to build my pkg.
I resolved my problem to include
<key>com.apple.security.network.client</key>
<true/>

in my default_mas_entitlements
https://github.com/electron-userland/electron-builder/issues/436#issuecomment-222546271

You must include
com.apple.security.network.client

in my default_mas_entitlements

Thanks for mentioning this, adding these to the electron docs in https://github.com/electron/electron/pull/7162
Closing this out here.


[Marketplace] When nothing is found there is empty page on All Applications and My Applications

EPAM AI DIAL chat version
0.18.0
What happened?
Now there is the following picture:

Expected:
The following screen if nothing is found on All applications

The following screen if nothing is found on My applications

Figma links:
https://www.figma.com/design/lwL5jneveZczAj5RLcLFH2/DIAL-Chat?node-id=12587-65591&t=gnpMnYAdVkKkN2dn-4
https://www.figma.com/design/lwL5jneveZczAj5RLcLFH2/DIAL-Chat?node-id=12602-67210&t=gnpMnYAdVkKkN2dn-4

Verified on staging env successfully


Wrong order in example

Problem statement
The example in the Readme has a slight order problem. Basically we add a non-blacklisted route (/) on  app before we set up request logging, hence, you never see requests to / being logged by expressWinston.
How to reproduce ?
Run the following example
var express = require('express');
    var expressWinston = require('express-winston');
    var winston = require('winston'); // for transports.Console
    var app = module.exports = express();

    // app.use(express.bodyParser());
    // app.use(express.methodOverride());

    // Let's make our express `Router` first.
    var router = express.Router();
    router.get('/error', function(req, res, next) {
      // here we cause an error in the pipeline so we see express-winston in action.
      return next(new Error("This is an error and it should be logged to the console"));
    });

    app.get('/', function(req, res, next) {
        res.write('This is a normal request, it should be logged to the console too');
        res.end();
      });

    // express-winston logger makes sense BEFORE the router.
    app.use(expressWinston.logger({
      transports: [
        new winston.transports.Console({
          json: true,
          colorize: true
        })
      ]
    }));

    // Now we can tell the app to use our routing code:
    app.use(router);

    // express-winston errorLogger makes sense AFTER the router.
    app.use(expressWinston.errorLogger({
      transports: [
        new winston.transports.Console({
          json: true,
          colorize: true
        })
      ]
    }));

    // Optionally you can include your custom error handler after the logging.
    // app.use(express.errorLogger({
    //   dumpExceptions: true,
    //   showStack: true
    // }));

    app.listen(8080, function(){
      console.log("express-winston demo listening on port %d in %s mode", this.address().port, app.settings.env);
    });

had to comment a couple of things because of some complaints of express modules being deprecated etc.
When doing curl http://localhost:8080/ you will get no logs from expressWinston.
Fix:
simply put the
app.get('/', function..... })`

after
    app.use(expressWinston.logger({
      transports: [
        new winston.transports.Console({
          json: true,
          colorize: true
        })
      ]
    }));

The order is the problem here. Instead of app.get it should have been router.get. I have tested this and will request this change in #168


Approve/reject snapshot changes

Is your feature request related to a problem? Please describe.
Some similar tools like Chromatic, Percy or Happo support approving/declining particular snapshot changes and integrate with GitHub status checks.
Describe the solution you'd like
Generated report should have button to approve/decline all or some snapshots that should post GitHub status check update. This web hook url can be something that developer should pass to the tool manually as a parameter and these buttons could simply call these urls to publish update. When all snapshots are approved status is updated with success.
It would be nice also to be able to filter by approved/declined PRs but that would require some sort of persistence for the state of snapshot.
Describe alternatives you've considered
Right now users would have to request changes on PRs and give a feedback manually.

This would be great. Right now, approval happens by approving the pull request. Github however doesn't allow one to approve their own pull requests, so this feature can not really be used by a single developer.


Hotfix/sonar config

Fixes #30
Changes proposed in this pull request:

Add github sonar plugin
Fix sonar coverage

Coverage remained the same at 95.477% when pulling b902a1b5c2a3457c884b6b0d9adebaf10e3bff5e on hotfix/sonar-config into 9f7201af4233ec8e7b0e1ded1e7f7620aca26008 on master.


[BUG] cannot select game path for kakao poe

.exe and .jar didnt work in selecting game path process
im using korean poe(kakao publishing), Win11, and also opend this .exe app as administrator.

Do you know that MercuryTrade won't work with kakao client because of Korean goverment privacy policy?

crap...


Unable to reproduce baseline result on ImageNet-LT

Hi, I would like to ask for the plain model of Resnet10 on ImageNet_LT, how many epochs did you use? Because if I set it to 90 epochs the performance is much better than the reported baseline performance. Thank you!

Can you answer this? I am also very curious about this issue.


Help add Modules services

Help add Modules services
1.Data factories
2.Azure OpenAI
3.AI Search
Can you give it to us?

Hello @Weerayug
I made some new modules for AI, including for AI Search.
But OpenAI is still under development and there isn't much information to create a module for Data Factory. Most of Data Factory data is inside Data Factory Studio, since we can only capture data inside Azure Portal the module would report very little information.


Add METADATA command

Alright, big change here! Basically implements the 3.2 METADATA command.
By default, users can only change data on themselves, unless they have the special capabilities in their roles: set_local or set_global, which lets them set metadata on local and global users, respectfully.
You can restrict the setting/getting of specific keys using the metadata: restricted_keys setting, along with the metakeys_set, metakeys_get, and convenience metakeys_access keylists in roles. If the key is in the role's _set list, they can set it, if in the _get list, they can view it, and if in the _access list, they can do both. An example is shown in the config file with the spam_detection_bot role, but I think this sort of key-specific restrictions would also be really useful when we start getting into the server-set keys.
You can also restrict keys based on the whitelist and blacklists in the config metadata section. If the whitelist is in use, keys need to be in either the whitelist or the restricted_keys lists to be valid, and if the key is in blacklist, it's classed as invalid when setting it.
So, might still be some work cleaning up permissions handling, coming up with a better real-world example for the restricted_keys and the _set/_get/_access variables in the config (which could even just wait 'til we introduce server-set metadata and that fun stuff. I'm thinking the role: title config option could be turned into a restricted metadata key (just title or something), settable by opers if we'd like.
edit: I'm really not happy with that spam_detection_bot example in the config.  I'll probably implement that title switchover and show that in the config as an example instead, since it seems less dumb.

Overall: metadata should really be part of core itself.  I plan to build everything else ontop of it (such as AWAY etc.).
I am working through the patches to review them all now.

See above comments on the review, but other than that it looks pretty good...

I'm going to go ahead and merge this.  We should submit a change request to IRCv3 to clarify that component of the spec.


This is an issue

I am having a problem with
this
soecific thing

I am having a problem with
this
soecific thing

Okay, thanks cor letting me know

thanks, heard


KPUNKS COLLETION FOR LIST.

5000 KPUNKS ON FRACTAL

There's something wrong in your meta json file, I modified it. And please modify the folder name to lower case, then update the slug name too. The slug name should be the same as folder name.
And your json file didn't pass the format verrification, please have a check. @FRACTALBNFT

@cloud6605 done sr. check https://github.com/FRACTALBNFT/KPUNKSFRACTAL/blob/patch-1/collections/KPUNKS/meta.json


Synthetic axis dependencies with parametric axes

As mentioned in the README, there may be a problem with the dependency between synthetic axes and parametric axis coordinates used to synthesize the axis.

In his presentation at TypeParis 2018, David Berlow pointed out a problem with synthetic axes. In his parametric system, XTRA, YTLC, XOPQ, and YOPQ axis coordinates are objective measures of stem or counter weights per mille of UPM*. They actually measure something tangible in the font. You could build a synthetic axis optical size (opsz) axis out of these. For your 12pt opsz, you'd have a specific set of values of the parametric axes for that size, and for 24pt, you'd have a different set of values. Here's the trouble: if you start with that 12pt, then change only the coordinate of opsz to 24pt, you'll get the right rendering, but the coordinates for the parametric axes will be the same (because we didn't change them). Thus, the value of those parametric axes will not be accurate to the outlines (because within the font in XVAR, they've been remapped), thus these objective measures are now relative measures without an explicit reference outside the font to what they are relative to.

If #1 is included then an easy solution could be made:

Include both synthetic axes (like opsz) and parametric axes (like XTRA).
Mark parametric axes as pure internal (therefore external apps would always keep them zero).
In XVAR, write functions to compute parametric axes from optical axes.
In other tables (like gvar, respond to parametric axes only).

Include both synthetic axes (like opsz) and parametric axes (like XTRA).
Mark parametric axes as pure internal (therefore external apps would always keep them zero).
In XVAR, write functions to compute parametric axes from optical axes. That is, you write function s to compute parameters from opticals.
In other tables (like gvar, respond to parametric axes only).

Exactly.  The mapping, might decide to add the value of 'XTRA' to the computed 'XTRA', for tweaking it further by the user.

Thinking about it a bit, I don't think the idea in #1 would make a good solution:

It doesn't solve the problem that the value of the coordinate does not match the scale defined for the axis. A coordinate of 0 for XTRA means, by definition, the width of the counters is 0. If we did as in #1, then we're redefining 0 as a magic number that means "ignore". Also, if the font user sets values for the synthetic axes, and also non-zero values for the parametric axes, what do those values mean? E.g. if I set opsz=36, and YTRA to 10, what does 10 mean? From the point of view of the axis scale definitions, that means YTRA exactly equals 10, which means 10 units per mille of UPM. But, under the hood, that won't be the case. It will be some scaling of the YTRA effect, but the 10 won't correspond to anything in the original scale. The effect will be unpredictable and vary from typeface to typeface. Ultimately, the non-zero axis coordinates will be applying a parametric shift on top of an existing shift (created by the synthetic axis), then the non-zero coordinate value relates to a warped version of its original scale. In the end, I don't think these would be usable except via manual trial and error.

If some axes are purely internal, then why enumerate them outside the font? Seems like it would be better not to enumerate them, thus not put them in fvar (or that the flag also means don't expose these axes to applications).

Side note: i'm not sure I understand the idea of deriving the parametric axes from optical axes. One of the major points of parametric axes is to have a set of axes that are truly orthogonal (optical axes aren't), so that it is easier to create optical axes. (The other major point is having a more objective scale for controlling type design parameters, if one wanted to build automation to do that).

@robmck-ms
The idea of pure internal axes is that this axis would NEVER be set by user or application. It could only be set by XVAR.
If you want the controllability of both opsz and YTRA, you can add another pure internal axis and assign it with XVAR, using a formula taking opsz and YTRA.

If they're never to be used by user or application, we shouldn't enumerate them. A flag would be a quick way to do this, but there's a question of what past operating systems would do - would they correctly not enumerate them?
Another implementation would be to put the internal axes in another table than fvar, but I just realized that would require a major overhaul of the specs: all the *var tables have an axisCount that refers to, and must agree with, fvar. So, fvar is the only place we can declare axes.


CupertinoSlidingSegmentedControl

Description
Introduce CupertinoSlidingSegmentedControl, the iOS 13 CupertinoSegmentedControl.

Related Issues
Closes https://github.com/flutter/flutter/issues/33796
Tests

add packages/flutter/test/cupertino/sliding_segmented_control_test.dart

TODOs

momentary is missing: https://developer.apple.com/documentation/uikit/uisegmentedcontrol/1618586-ismomentary
Currently only supports equalWidth layout.  proportional is missing.
The thumb shadow is done exactly as the sketch file describes, but it looks a bit off when compared with the native component.
The drag gesture recognizer has to be passed to the render object because it needs to know children's dimensions. We probably need a CupertinoMultiChildGestureDetector or something, as this kind of gesture is quite common on iOS.

Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

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

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[x] No, this is not a breaking change.

 @override
  Widget build(BuildContext context) {
    super.build(context);
    return CupertinoPageScaffold(
      child: CustomScrollView(slivers: <Widget>[
        CupertinoSliverNavigationBar(
          largeTitle: Text("Test"),
          middle: CupertinoSlidingSegmentedControl<int>(
            children: {
              0: Padding(
                padding: EdgeInsets.symmetric(horizontal: 24, vertical: 6),
                child: Text(
                  "Test1",
                  style: TextStyle(fontSize: 14),
                ),
              ),
              1: Padding(
                padding: EdgeInsets.symmetric(horizontal: 24, vertical: 6),
                child: Text("Test2", style: TextStyle(fontSize: 14)),
              ),
              2: Padding(
                padding: EdgeInsets.symmetric(horizontal: 24, vertical: 6),
                child: Text("Test3", style: TextStyle(fontSize: 14)),
              ),
            },
            controller: ValueNotifier<int>(0),
          ),
        ),
        SliverFillRemaining(
          child: Container(),
        )
      ]),
    );
  }

onTap is not called if I use this widget with a Sliver widget inside CustomScrollView
Above is a sample code that scrolling works but tapping.
Thank you for this rapid update!

@njovy Thank you so much for trying out the PR and catching the bug! I've updated the gesture handling so it works (seemingly) correctly in conjunction with a VerticalDragGestureRecognizer now.
@justinmc thanks for the review! Updated per your comments.

@LongCatIsLooong It works like a charm with the latest commit. Thank you so much!


Clarify the relationships between various kinds of structs and variants

Provide a simple model describing three kinds of structs and variants and their relationships + some small language extensions following from this model.
Rendered
cc https://github.com/rust-lang/rust/pull/31757#issuecomment-186398640

(It would be nice if someone could check the grammar.)

I really like these ideas. If they're not taken up by Rust, I may steal them for my own language :)

Implementation: https://github.com/rust-lang/rust/pull/35138

Note that everything the implementation does (modulo tests and feature gates) is removing errors and accepting a new grammar production in the parser, i.e. the RFC only legitimizes things that already work internally.

Hear ye, hear ye! This RFC is now entering final comment period. In the most recent meeting, @nrc and I (the only two in attendance) both felt inclined to accept (though no final decision has been reached).
In general, the feeling is that this RFC is not needed in any strict sense, though enabling Foo { .. } as a generic "variant check" pattern is pretty useful. It does seem to generally move {} vs () into a more strict relationship, which seems useful, though potentially more confusing (perhaps a stricter separation is clearer?).

I think making the model easier to understand and more consistent (and without breaking anything) is worth it in its own right. Making macros simpler is pretty awesome too.
The only worry is that there is some future feature that would need this syntax. On the other hand, this RFC makes a pretty clear case that such new syntax would be confusing and non intuitive.
I'm :thumbsup:

Also, making TupleStruct just shorthand for NamedStruct but with numeric names makes a lot of sense imo. Not having to do NS(_, _, c, _) is nice as well.

I'm not sure I totally understand the "pattern matching a function" definition though. You can't pattern match to a function, so it is really confusing. I would change that description to something more accurate with how things actually work

I think this is a great change. I agree it's not necessary, but it also seems "good", without much, if any, downside.

I'm very much in favor as well. This is exactly the mental model I want, and I'd love to get rid of the various pedantic restrictions we have today.

Huzzah! The @rust-lang/lang team has decided to accept this RFC.

Tracking issue: https://github.com/rust-lang/rust/issues/35626
If you'd like to keep following the development of this feature, please subscribe to that issue, thanks! :)

Hello, the rendered proposal link is broken, I think it should be:
https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md


Change export style

I was unable to get the component to work in my application with the default exports. I'm also using vue-bulma-tabs and changed the exports for vue-lory to match that and it began to work. Please consider merging this if it doesn't cause any other issues.

can you merge this?


Add Flippy Learn by @misteu

[x] Project URL:
[x] Update contents.json instead of README
[x] One project per pull request
[x] Screenshot included
[x] Avoid iOS or open-source in description as it is assumed
[x] Use this commit title format if applicable: Add app-name by @github-username
[x] Use approved format for your entry

Thx


Streamlined eslint usage

depends on changes in cap/cds, which need to be shipped first (-> currently there are test errors)

we need to wait for the java release before we can upgrade to cds 8


Why is this project not a fork

Why have a new project? Why is this not forked from llimllib/limbo?
https://guides.github.com/activities/forking/
A fork would allow to share fixes / features.
Now we have 2 smaller projects, it's hard to know which to pick.

We should wait the reponse from @lins05 but I checked both projects before contributing a bit on this one and I think both projects have nothing in common. I'm not sure one is a fake fork from another.
As there no code in common, it's difficult to share fixes/features

@kenden Good question. Though this project has borrowed things from both https://github.com/llimllib/limbo, and https://github.com/skoczen/will (the latter is an excellent chat bot for hipchat, I should list it in the README), most of the code is rewritten from scratch (as @gpailler has noticed). And you may see that llimllib/limbo provides a lot of default plugins, which I don't think is useful in my own use case.  So based on these difference,  I did't fork it but created a new repo instead.

Thanks. I was confused by the wording "based on" llimbo/slack in the readme. Which to me means "Slack is the base where changes could be pushed back to and pulled from". I submitted a pull request to change that.


Draws 1 extra pixel on the bottom mask?

Totally not important the last commit was years ago but I'm curious if this was by design?
https://github.com/a1k0n/arduboy3d/blob/013f58d51dc66caffb7ecf35c172543caede9b0a/draw.cpp#L18
This seems correct.
const uint8_t bottommask_[] PROGMEM = {   0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f };

Hmm. Yeah, not fresh in my mind. I think that's intentional, though; I guess it's not documented, but when I read the code now it seems that FillVLine is supposed to fill from y0 to y1, inclusive.
https://github.com/a1k0n/arduboy3d/blob/013f58d51dc66caffb7ecf35c172543caede9b0a/draw.cpp#L294-L299
It looks like I subtract 1 from the bottom to not include it, according to that comment. So if y0==y1, it should plot one pixel.

Hmm. Yeah, not fresh in my mind. I think that's intentional, though; I guess it's not documented, but when I read the code now it seems that FillVLine is supposed to fill from y0 to y1, inclusive.
https://github.com/a1k0n/arduboy3d/blob/013f58d51dc66caffb7ecf35c172543caede9b0a/draw.cpp#L294-L299
It looks like I subtract 1 from the bottom to not include it, according to that comment. So if y0==y1, it should plot one pixel.

Got it. Thanks! I couldn't work out how that was implemented.

Got it. Thanks! I couldn't work out how that was implemented.

:+1:

:+1:


On session expiration callback not getting called

init = () => ConnectyCube.init({
appId: 4948,
authKey: 'H2hUALR3s5wKnM7',
authSecret: '************************',
},{
on: {
sessionExpired: (handleResponse, retry) => {
  console.log("call callback");
  handleResponse();
  // call handleResponse() if you do not want to process a session expiration,
  // so an error will be returned to origin request
  // handleResponse();

  ConnectyCube.createSession()
    .then(retry)
    .catch((error) => {});
},

},
debug: { mode: 1 }
});

What will show console.log(ConnectyCube.service.sdkInstance.config.on.sessionExpired) after ConnectyCube.init()? Is the console.log("call callback") called?
Could you show your logs?

No, it's not getting called. after I destroy the session using the rest API

Try to make some API call after destroySession. The expiration callback is called after getting error

Try to make some API call after destroySession. The expiration callback is called after getting error

Thanks for your response. issue has been resolved


Dropping azure classic and rackspace credential types

Dropped by Tower 3.2 http://docs.ansible.com/ansible-tower/latest/html/upgrade-migration-guide/release_notes.html#ansible-tower-version-3-2-0
(For issue https://github.com/ManageIQ/manageiq-providers-ansible_tower/issues/53)

We may consider to port this to Gaprindashvili

@miq-bot add_label gaprindashvili/yes
@miq-bot remove_label wip

The spec failure needs https://github.com/ManageIQ/manageiq-providers-ansible_tower/pull/58

@miq-bot add_label blocker

Gaprindashvili backport details:
$ git log -1
commit 937251385a9809cdf8144fa02fa528a515f481bb
Author: Greg Blomquist<EMAIL_ADDRESS>Date:   Tue Feb 6 13:28:10 2018 -0500

    Merge pull request #16936 from jameswnl/v2cred

    Dropping azure classic and rackspace credential types
    (cherry picked from commit 97d3058eb3a948efbaf303fd69743b9bd782e947)

    https://bugzilla.redhat.com/show_bug.cgi?id=1542738


Enable LFS on Checkout

RE: https://github.com/huggingface/hub-docs/pull/664

closing as I'm not sure this is an issue anymore


Implement basic stratagem view for filesystems

Ref. #1621

Signed-off-by: Igor Pashev<EMAIL_ADDRESS>

This change is

There is a clippy warning to check out


<EMAIL_ADDRESS>

1./system/app/superuser.apk
2. /bin/su
3. /sbin/su
4. /system/bin/su
5. /system/xbin/su
6. /data/local/xbin/su
7. /data/local/bin/su
8. /system/sd/xbin/su
9. /system/bin/failsafe/su
10. /data/local/su
11. /su/bin/su
#!/usr/bin/env python
"""
Installer for the Dataplicity agent.
This script prepares your Raspberry Pi or other Linux device for use
with the Dataplicity agent, an open source application that powers
remote terminals and other features on https://www.dataplicity.com
See the following repository on GitHub for the source to the agent:
https://github.com/wildfoundry/dataplicity-agent
"""
from future import division, print_function, unicode_literals
import sys
PY3 = sys.version_info.major > 2
import datetime
import inspect
import json
import locale
import os
import platform
import pwd
import subprocess
import sys
import time
import traceback
from functools import partial
if PY3:
from urllib.error import URLError
from urllib.parse import urlencode
from urllib.request import urlopen as urllib_urlopen
else:
from urllib import urlencode
from urllib2 import HTTPError as URLError
from urllib2 import urlopen as urllib_urlopen

Personalized settings for the installer
SETTINGS = """
{
"agent_download_url": "https://github.com/wildfoundry/dataplicity-agent/releases/download/v0.5.11/dataplicity",
"agent_version": "v0.5.11",
"api_url": "https://api.dataplicity.com/",
"device_url": "https://www.dataplicity.com/devices/",
"dry_run": false,
"interactive": true,
"m2m_url": "wss://m2m.dataplicity.com/m2m/",
"register_url": "https://www.dataplicity.com/install/",
"report_url": "https://www.dataplicity.com/installer_event/",
"token": "p8vttboq",
"time":<PHONE_NUMBER>.237961
}
"""
settings = json.loads(SETTINGS)
AGENT_BASE_PATH = "/opt/dataplicity/agent"
AUTH_PATH = "/opt/dataplicity/tuxtunnel/auth"
CPU_INFO_PATH = "/proc/cpuinfo"
DOWNLOAD_CHUNK_SIZE = 16384
LOG_PATH = "/var/log/dpinstall.log"
MAX_STEPS = 4
SERIAL_PATH = "/opt/dataplicity/tuxtunnel/serial"
SUDOER_LINE = "dataplicity ALL=(ALL) NOPASSWD: /sbin/reboot"
SUDOERS_PATH = "/etc/sudoers"
SUPERVISOR_CONF_DIR_PATH = "/etc/supervisor/conf.d/"
SUPERVISOR_CONF_PATH = "/etc/supervisor/conf.d/tuxtunnel.conf"
A string template for the supervisor conf
SUPERVISOR_CONF_TEMPLATE = """
Installed by Dataplicity Agent installer
[program:tuxtunnel]
environment={ENV}
command={PYTHON_PATH} {AGENT_PATH} --server-url {API_URL} run
autorestart=true
redirect_stderr=true
user=dataplicity
stdout_logfile=/var/log/dataplicity.log
stderr_logfile=/var/log/dataplicity.log
"""
Fields from /proc/cpuinfo we want in the report
CPU_INFO_FIELDS = {
"cpu architecture",
"cpu implementor",
"cpu part",
"cpu revision",
"cpu variant",
"hardware",
"model name",
"revision",
}
RETURN_SUCCESS = 0
RETURN_USER_ABORT = -1
RETURN_FAIL = -2
RETURN_CRASH = -3
CLOCK_MESSAGE = """\
+----------------------------------------------------------------------+
| The installer has detected your system clock may be wrong!           |
| This may prevent secure downloads from working on your system.       |
| If the install fails, please check your system clock, and try again. |
+----------------------------------------------------------------------+
"""
open_write_binary = lambda path: open(path, "wb")
open_append_binary = lambda path: open(path, "ab")
open_append_text = lambda path: open(path, "at")
open_read_text = lambda path: open(path, "rt")
open_read_binary = lambda path: open(path, "rb")
subprocess_check_output = subprocess.check_output
symlink = os.link
rename = os.rename
chmod = os.chmod
Store the log in memory as well as write to file
install_log = []
Current step in the installation process, updated by show_step
current_step = 0
start_time = time.time()  # time installer started
last_log_time = start_time  # time since last log_time
Get the start time of the installer, in ISO 8601 format
This is sent to keen so we can detect incorrect clocks
start_time_iso_8601 = datetime.datetime.utcnow().isoformat()
def to_bytes(data):
"""Convert to bytes if necessary."""
# Primarily a mechanism to handle Python3 string differences
if not isinstance(data, bytes):
return data.encode("utf-8")
return data
class AbortInstall(Exception):
"""Installation can not continue."""
def create_log_file():
"""Create (and wipe) log file."""
try:
with open_write_binary(LOG_PATH):
pass
except IOError:
# Probably means no permission
pass
def log(text, *args, **kwargs):
"""Log technical details to LOG_PATH."""
caller = inspect.stack()[1][3]  # Get the caller function name
log_text = text.format(*args, **kwargs)
lines = (log_text + "\n").splitlines()
install_log.extend(lines)
write_lines = (
    "\n".join("{}: {}".format(caller.ljust(16), line) for line in lines) + "\n"
)

try:
    with open_append_binary(LOG_PATH) as log_file:
        log_file.write(write_lines.encode("utf-8", errors="replace"))
except IOError:
    # Probably a permissions error
    pass

def log_time():
"""Log seconds since last call to log_time."""
global last_log_time
t = time.time()
log("{:.1f}s elapsed", t - last_log_time)
last_log_time = t
def user(text, *args, **kwargs):
"""Writes progress information for the user."""
log_text = text.format(*args, **kwargs)
print(log_text)
log(log_text)
def log_exception(msg, *args, **kwargs):
"""Log a traceback."""
tb = traceback.format_exc()
log(msg, *args, **kwargs)
log(tb)
def make_dir(path, mode=0o777, makedirs=None):
"""Make a directory if it does not exist (and intermediate dirs)."""
try:
(makedirs or os.makedirs)(path, mode)
except OSError:
log("{} (exists)", path)
else:
log("{} (created)", path)
def main():
"""Main entry point."""
def show_help():
    user("See file {} for details.", LOG_PATH)
    user(
        "Email<EMAIL_ADDRESS>for help, "
        "or visit https://docs.dataplicity.com/"
    )

try:
    log("-" * 70)
    time_str = datetime.datetime.utcnow().ctime()
    log(time_str)
    log("install started")
    log("")

    # Run the install
    run()

    log("install completed")
except KeyboardInterrupt:
    report("user-abort")
    log("user pressed Ctrl+C")
    user("Installation canceled.")
    show_help()
    return RETURN_USER_ABORT
except AbortInstall as e:
    report("fail", reason=str(e))
    log("install aborted ({})", e)
    user("")
    user("{}", e)
    show_help()
    return RETURN_FAIL
except Exception as e:
    report("crash", reason=str(e))
    log_exception("install failed ({})", e)
    user("")
    user("The installer encountered an error.")
    show_help()
    return RETURN_CRASH
else:
    report("success")
    return RETURN_SUCCESS
finally:
    log("leaving main")

def run():
"""Top level procedural code to install agent."""
art = """\
___      _              _ _      _ _

/   __ | | __ _ _ __ | () () | _   _
/ /\ /  | __/ _ | ' | | |/ __| | __| | | |
/ /// (| | || (| | |) | | | (| | || || |
/,' _,|__,| ./|||_||_|_, | {agent_version}
||                   |___/
""".format(
agent_version=settings["agent_version"]
)
user(art)
user("Welcome to the Dataplicity Agent Installer")
# Check the system time
check_clock(start_time)
log_info()

if settings["dry_run"]:
    user("dry run enabled - no system changes will be made")

user("")

# ------------------------------------------------------------------
show_step(1, "downloading open source agent")
agent_dir = get_agent_dir()
make_dir(agent_dir)
agent_path = write_agent(agent_dir, "dataplicity")
executable_path = get_executable_path()
link(agent_path, executable_path)
make_executable(agent_path)
log_time()

# ------------------------------------------------------------------
show_step(2, "registering device")
device_url = register_device()
log_time()

# ------------------------------------------------------------------
show_step(3, "configuring system")
create_user()
update_sudoers()
if not apt_update():
    log(
        "Package database update failed, continuing with existing package database..."
    )
if not apt_get("supervisor"):
    log("failed to install supervisor")
    check_supervisor()
if PY3:
    if not apt_get("python3-distutils"):
        log("failed to install python3-distuitls")

configure()
log_time()

# ------------------------------------------------------------------
show_step(4, "starting agent")
if not settings["dry_run"]:
    run_system("nohup", "service", "supervisor", "restart")
log_time()
congratulations(device_url)

def get_distro():
"""Get the linux distribution."""
distro = "unknown"
try:
# Not sure if this is any kind of standard
with open("/etc/os-release") as fh:
for line in fh:
key, sep, value = line.partition("=")
if sep and key == "PRETTY_NAME":
distro = value.strip().strip('"')
break
except Exception as error:
log("failed to get distro; {}", error)
pass
return distro
def log_info():
"""Log useful system information."""
log("[PYTHON]")
log("sys.executable={!r}", sys.executable)
log("sys.version={!r}", sys.version)
log("")
distro = get_distro()
log("[LINUX]")
log("distro={!r}", distro)
log("")

system, node, release, version, machine, processor = platform.uname()

log("[UNAME]")
log("system={!r}", system)
log("node={!r}", node)
log("release={!r}", release)
log("version={!r}", version)
log("machine={!r}", machine)
log("processor={!r}", processor)
log("")

log("[SETTINGS]")
for k, v in settings.items():
    log("{}={!r}", k, v)
log("")

def show_step(n, msg):
"""Show current step information."""
global current_step
current_step = n
step_msg = "[[ Step {n} of {max} ]] {msg}".format(n=n, max=MAX_STEPS, msg=msg)
log("-" * 70)
user(step_msg)
def get_agent_dir():
"""Get the absolute directory where the agent will be stored."""
agent_dir = os.path.abspath(
os.path.join(AGENT_BASE_PATH, settings["agent_version"])
)
return agent_dir
def get_executable_path():
"""Get the absolute path of the dataplicity executable."""
# This will reference a symlink
executable_path = os.path.abspath(os.path.join(AGENT_BASE_PATH, "dataplicity"))
return executable_path
def check_clock(current_time):
"""Check the system clock."""
if abs(settings["time"] - current_time) > 60 * 60 * 24:
log("system time is out of sync")
user(CLOCK_MESSAGE)
return False
return True
def download(url, path, urlopen=None):
"""Download a file from url to path."""
# Can't use requests, since we can't assume anything re Python env
log("requesting {}", url)
url_file = None
try:
try:
url_file = (urlopen or urllib_urlopen)(url)
except URLError as http_error:
response_code = http_error.code
else:
response_code = url_file.getcode()
    if response_code != 200:
        user("unable to open URL {}", url)
        log("failed to download {} code={}", url, response_code)
        return False

    if PY3:
        file_size = int(url_file.info()["Content-Length"])
    else:
        file_size = int(url_file.info().getheader("Content-Length"))

    log("content length is {} bytes", file_size)

    bytes_read = 0
    try:
        log("writing {}", path)
        with open_write_binary(path) as write_file:
            read_chunk = partial(url_file.read, DOWNLOAD_CHUNK_SIZE)
            for chunk in iter(read_chunk, b""):
                bytes_read += len(chunk)
                write_file.write(chunk)
                completed_percentage = 100.0 * (bytes_read / file_size)
                sys.stdout.write("\r{:.0f}% ".format(completed_percentage))
                sys.stdout.flush()
        sys.stdout.write("\r")
        sys.stdout.flush()
    except IOError as e:
        user("unable to save download ({})", e)
        log_exception("download failed")
        return False
    else:
        log("{} bytes read", bytes_read)

finally:
    if url_file is not None:
        url_file.close()

return True

def write_agent(agent_dir, agent_filename):
"""Download agent, return absolute path to agent."""
# Done atomically with an os.rename, so we never leave part
# of a binary on disk.
agent_filename_temp = "~" + agent_filename
path = os.path.join(agent_dir, agent_filename)
path_temp = os.path.join(agent_dir, agent_filename_temp)
download_url = settings["agent_download_url"]
if not download(download_url, path_temp):
raise AbortInstall("unable to download agent")
rename(path_temp, path)
log("renamed {}", path)
return path

def link(agent_path, executable_path):
"""Link current version of agent."""
if os.path.exists(executable_path):
    log("removing stale link")
    os.remove(executable_path)

symlink(agent_path, executable_path)
log("created {}", executable_path)

def make_executable(path):
"""Make agent executable."""
chmod(path, 0o755)
log(path)
def run_system(*command):
"""
Run a system command, log output, and return a boolean indicating
success.
"""
# Paranoia re encoding
encoding = getattr(sys.stdout, "encoding", None)
encoding = encoding or locale.getpreferredencoding() or "utf-8"
command_line = " ".join(command).encode(encoding, errors="ignore")
log("run {!r}", command_line)
try:
    output = subprocess_check_output(command, stderr=subprocess.STDOUT)
    returncode = 0
except OSError as e:
    log('error running "{}" ({})', command_line, e)
    return False
except subprocess.CalledProcessError as e:
    output = e.output
    returncode = e.returncode
output_unicode = output.decode(encoding, errors="replace")
log(output_unicode)
log("{!r} returned={}", command_line, returncode)
return returncode == 0

def apt_get(package):
"""Install an apt-get package."""
log("installing package {}", package)
if settings["dry_run"]:
return
return run_system("apt-get", "-y", "install", package)
def apt_update():
"""Update apt"""
log("Updating apt")
if settings["dry_run"]:
return
return run_system("apt-get", "-y", "update")
def configure(getpwnam=None):
"""Install supervisor conf."""
getpwnam = getpwnam or pwd.getpwnam
agent_path = get_executable_path()
try:
    dataplicity_user = getpwnam("dataplicity")
except KeyError:
    log("dataplicity user not found, assuming /home/dataplicity")
    dataplicity_home = "/home/dataplicity"
else:
    dataplicity_home = dataplicity_user.pw_dir

# Supervisor doesn't create a new shell, so we must explicitly
# set standard env vars, in addition to our own.
env = {
    "DATAPLICITY_M2M_URL": settings["m2m_url"],
    "HOME": dataplicity_home,
    "USER": "dataplicity",
}

dataplicity_env = ",".join('{}="{}"'.format(k, v) for k, v in sorted(env.items()))

format_args = {
    "ENV": dataplicity_env,
    "HOME": dataplicity_home,
    "API_URL": settings["api_url"],
    "AGENT_PATH": agent_path,
    "PYTHON_PATH": sys.executable,
}
conf = SUPERVISOR_CONF_TEMPLATE.format(**format_args)

log("writing supervisor conf")
log(conf)
log("")

if settings["dry_run"]:
    return

conf_bytes = conf.encode("utf-8")
with open_write_binary(SUPERVISOR_CONF_PATH) as f:
    f.write(conf_bytes)

log("enabling supervisor (fix for https://goo.gl/3pfFiJ)")
run_system("systemctl", "enable", "supervisor")

def register_device(urlopen=None):
"""
Register device with the server.
Returns a URL to the device on success.

"""
serial = None
if os.path.isfile(SERIAL_PATH):
    with open(SERIAL_PATH, "rb") as serial_file:
        serial = serial_file.read().strip().decode("utf-8")
    log("serial exists in {} ({})", SERIAL_PATH, serial)

urlopen = urlopen or urllib_urlopen

register_error_msg = "The installer was unable to contact the Dataplicity server"

device_name = platform.node() or "New Device"
cpu_info = get_cpu_info()
if cpu_info.get("serial"):
    device_name = "{serial}-{device_name}".format(
        serial=cpu_info.get("serial"), device_name=device_name
    )
log("device name is {}", device_name)
register_data = {"name": device_name, "serial": serial, "token": settings["token"]}
post_data = urlencode(register_data)
register_url = settings["register_url"]
log("posting to {}", register_url)

try:
    url_file = urlopen(register_url, to_bytes(post_data))
except URLError:
    log_exception("unable to register")
    raise AbortInstall(register_error_msg)

response_code = url_file.getcode()
log("response code={}", response_code)
if response_code != 200:
    log("request failed")
    raise AbortInstall(register_error_msg)

try:
    response_bytes = url_file.read()
except IOError:
    raise AbortInstall(register_error_msg)

try:
    response = json.loads(response_bytes)
except ValueError:
    log("register URL returned bad JSON")
    log("{!r}", response_bytes)
    raise AbortInstall(register_error_msg)

serial = response["serial"]
auth = response["auth"]
device_url = response["device_url"]
is_new_device = response["is_new_device"]

if is_new_device:
    write_registration(serial, auth)
else:
    user("")
    user("  +------------------------------------------------------+")
    user("  | The installer used a pre-existing serial number.     |")
    user("  | To register a new device, please delete this device  |")
    user("  | from the device list view.                           |")
    user("  | https://www.dataplicity.com/devices/                 |")
    user("  +------------------------------------------------------+")
    user("")

return device_url

def write_value(name, path, value):
"""Write a value to a path."""
make_dir(os.path.dirname(path))
try:
with open_write_binary(path) as fh:
fh.write(value.encode("utf-8"))
except IOError:
log_exception("failed to write {}", name)
raise AbortInstall("unable to write {}".format(name))
def write_registration(serial, auth):
"""Write serial and auth."""
write_value("serial", SERIAL_PATH, serial)
write_value("auth", AUTH_PATH, auth)
def create_user(getpwnam=None, chown=None, isdir=None):
"""Create a dataplicity user and apply permissions."""
getpwnam = getpwnam or pwd.getpwnam
chown = chown or os.chown
isdir = isdir or os.path.isdir

log("creating user")
if not settings["dry_run"]:
    try:
        dataplicity_user = getpwnam("dataplicity")
    except KeyError:
        log("adding user")
        make_dir("/home", 0o755)
        run_system("useradd", "-m", "dataplicity")
    else:
        log("user exists")

    dataplicity_user = getpwnam("dataplicity")
    dataplicity_home = dataplicity_user.pw_dir

    # Old installer didn't create home dirs
    if not isdir(dataplicity_home):
        log("creating home dir")  # needed by pex
        make_dir(dataplicity_home)
        chown(dataplicity_home, dataplicity_user.pw_uid, dataplicity_user.pw_gid)

    remote_directory = os.path.join(dataplicity_home, "remote")
    if not isdir(remote_directory):
        log("creating remote dir")
        make_dir(remote_directory)
        chown(remote_directory, dataplicity_user.pw_uid, dataplicity_user.pw_gid)

def update_sudoers():
"""Update sudoers to permit reboot."""
try:
with open_read_text(SUDOERS_PATH) as sudoers_file:
lines = sudoers_file.read().splitlines()
    if SUDOER_LINE not in lines:
        log("adding sudoer line")
        with open_append_text(SUDOERS_PATH) as sudoers_file:
            sudoers_file.write("\n{}\n".format(SUDOER_LINE))
except IOError as e:
    user("  The installer was unable " "to update sudoers automatically.")
    user("  The reboot button may not work.")
    log("unable to write to sudoers file ({})", e)

def check_supervisor(isdir=None):
"""Install supervisor."""
# apt-get failed
# But we may still be able to continue if an older version
# was previously installed
if not (isdir or os.path.isdir)(SUPERVISOR_CONF_DIR_PATH):
# Definitely not installed
user("  The installer was unable to install Supervisor on your system.")
user("  This may be temporary, you could try again.")
raise AbortInstall("Unable to install Supervisor")
def congratulations(device_url):
"""Tell the user about install."""
user("")
user(
"Dataplicity agent {agent_version} is now installed.",
agent_version=settings["agent_version"],
)
user("Your device will be online in a few seconds.")
user("")
if device_url is not None:
user("Visit the following URL to manage your device:")
user(" * {device_url}", device_url=device_url)
user("")
user("Do you need help? https://docs.dataplicity.com/")
user("")
def report(status, reason=None):
"""Report install result to server."""
log("status={!r} reason={!r}", status, reason)
_report = build_report(status, reason=reason)
log("{!r}", _report)
send_report(_report)
def build_report(status, reason=None):
"""Generate report data for send_report."""
log("{} ({})", status, reason)

# Get total time to this point (in seconds)
elapsed = int(time.time() - start_time)
log("{}s elapsed (total)", elapsed)

data = {
    "cpu": get_cpu_info(),
    "elapsed": elapsed,
    "os": get_os_info(),
    "reason": reason,
    "start_time": start_time_iso_8601,
}
data_json = json.dumps(data)
report = {
    "data": data_json,
    "status": status,
    "step": current_step,
    "token": settings["token"],
}
return report

def send_report(report, urlopen=None):
"""Send a reported generated by build_report"""
urlopen = urlopen or urllib_urlopen
report_post_body = urlencode(report)
report_url = settings["report_url"]
log("sending install report to {}", report_url)

url_file = None
try:
    url_file = urlopen(report_url, to_bytes(report_post_body))
    log("response code = {}", url_file.getcode())
    url_file.read()
except Exception:
    # Nothing much to do, can't break the installer
    log_exception("error sending report")
finally:
    if url_file is not None:
        url_file.close()

def get_os_info():
"""Get OS information for report."""
distro = get_distro()
system, node, release, version, machine, processor = platform.uname()
os_info = {
    "distro": distro,
    "system": system,
    "release": release,
    "version": version,
    "machine": machine,
    "processor": processor,
}
return os_info

def get_cpu_info():
"""Get CPU information we need as a dict."""
cpu_info = {}
cpu_info_bytes = read_cpu_info()
cpu_info_items = parse_cpu_info(cpu_info_bytes)
# Keys may appear once, we are only interested in the first
for key, value in cpu_info_items:
if key in CPU_INFO_FIELDS and key not in cpu_info:
cpu_info[key] = value
log("{}={}", key, value)
return cpu_info
def read_cpu_info(open_cpuinfo=None):
"""Read contents of cpuinfo file, or return empty bytes."""
try:
with (open_cpuinfo or open_read_binary)(CPU_INFO_PATH) as fh:
return fh.read()
except IOError:
log("unable to read {}", CPU_INFO_PATH)
return b""
def parse_cpu_info(info_bytes):
"""Parse cpu info fields in to a sequence of (, )."""
# This isn't a dict, because some combinations may appear more than
# once.
fields = []
for line in info_bytes.splitlines():
name, colon, value = line.partition(b":")
if colon:
name = name.strip().decode("utf-8", errors="replace")
value = value.strip().decode("utf-8", errors="replace")
fields.append((name.lower(), value))
return fields
def entry_point():
"""Main entry point in to the installer."""
create_log_file()
return_code = main() or 0
log("return={}", return_code)
return return_code
if name == "main":
sys.exit(entry_point())  # pragma: no cover

1./system/app/superuser.apk
2. /bin/su
3. /sbin/su
4. /system/bin/su
5. /system/xbin/su
6. /data/local/xbin/su
7. /data/local/bin/su
8. /system/sd/xbin/su
9. /system/bin/failsafe/su
10. /data/local/su
11. /su/bin/su


Limit error reporting for methods to the method name

Fixes #5732

Hi @reavowed, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.
TTYL, MSBOT;

thanks @reavowed, i have one comment, other than that looks good to me.


embedding from train_embedding and kge are not compatible

Hi,
I was trying to use this module for our own created open kg. to train kg embedding (complex) i used train_embedding/main.py on our own data formatted as fb237, and saved best model using torch.save(<model_name>)
I was unable to load this trained model in KGQA/RoBERTa/main.py for training kgqa model.
code was breaking on the following line.
   >>kge_checkpoint = load_checkpoint(checkpoint_file)
 ->>>kge_model = KgeModel.create_from(kge_checkpoint)

Is it necessary to use KgeModel, can't we directly use embeddings trained from train_embedding/main.py ?

I apologize it if my comment is not related to your question and greatly appreciate it if u can solve my doubt.
When I want to generate vector representations of the CQW-subgraph-entities based on an algorithm, should I use the Freebase dataset or is there a sub set of Freebase to do it?
generally, question-answering datasets are subsets of large datasets such as Freebase, so what is the approach to generate graph embeddings of the entities?
Working with the whole dataset is an issue itself.

@violetcodes We use embeddings trained using https://github.com/uma-pi1/kge . The KgeModel class is from that code, so you will either have to use that library for training (which I highly recommend) or change significant amount of code.
train_embedding/main.py isn't a very good implementation and it is also hard to do hyperparameter search.

@apoorvumang ok thanks.


pagination should be surrounded by

I think the template should follow Bootstrap syntax
for example pagination and pager should be surrounded by
<nav> </nav>
refer to other similar bug #65

You can add that to your HTML it won't affect the style. This depends on the implementer's practice.

issue #64 has been corrected in 2.0.


Metaboliser status is not generated other than cyp2d6 gene in summary alleles result

Hi @twesigomwedavid I need to generates the results for all genes present in CYP450 family for that i did the iteration in python script :-
''' Iterate CYP450 genes over SteallrPGx nextflow workflow'''
for gene in ['cyp2d6','cyp2a6','cyp2b6','cyp2c19','cyp2c9','cyp2c8','cyp3a4','cyp3a5','cyp1a1','cyp1a2','cyp2e1','cyp4f2']:
cmd = './nextflow run main.nf -dsl1 -profile standard --build hg19  --gene ' + gene
os.system(cmd)
Above script generates the results in corresponding folder but Metaboliser status information is in not generated for all genes.
Few details for my nextflow.config file:-
enable docker
path added for bam and fasta file
But still gene set as "cyp2d6"
Please let me know if I'm missing something here !

Hi @Shubhamverma-bioinfo,
Thanks. Metaboliser status information in the current StellarPGx version is only computed for CYP2D6. This is because the consensus activity scores for other genes tend to be substrate-specific (see https://cpicpgx.org/guidelines). We are working on including activity scores for key drug-gene pairs in future versions.
Also, kindly note that we are revising our CYP2A6 database to match the updated PharmVar allele definitions. This means you'd need to rerun the analysis for CYP2A6 using the next StellarPGx version (will be out within the next week).
Best,
David

@twesigomwedavid Thanks a lot for information really appreciate your efforts !


Replace PhantomJS for headless browser testing

PhantomJS was abandoned in 2018 and the mocha-phantomjs-core project used by iD for testing followed suit. We've been coasting until now, but mocha just deprecated some of the functions used by mocha-phantomjs-core (#7695). This means we can't keep up-to-date with mocha with our current setup, which is an unsustainable proposition. Testing is fundamental.
There's been talk in the past of switching away from PhantomJS, but now it's become a more immediate priority. I'm sure there are good, modern solutions out there, but we need to make sure we're still testing legacy browsers where possible. PhantomJS uses the same polyfills as Internet Explorer and as a result, tests for compatibility issues that might otherwise be difficult to find. See #6087 for related work.

Can this issue be closed?


Add release notes for model-sdk 4.14.0

@jhuiting - can this be released today, or should it wait for 7.18?

@MarkvanMents It can be released today, as it also contains other changes aside from 7.18 support.


Second Post: Chrome Auto Closes after code executes.

Using Chrome Version: 51.0.2704.103
When using code to launch chrome and go to webpage in MS Access VBA, chrome automatically closes when code execution has complete.
Is there a way around this from happening?
Someone said that if you set selenium as a public object, this won't happen, but it still does.
Also, I have tried setting selenium to nothing at the end of the code and does the same thing.
Example code:
Public selenium As Object Late Binding
Example code for Function:
Function MyWebpage()
    strURL = "www.google.com"
    strSubURL = "/#q=test"
    If selenium Is Nothing Then
        Set selenium = CreateObject("Selenium.WebDriver")
        selenium.AddArgument "--start-maximized"
        selenium.start "chrome", "about:blank"
    End If
    selenium.Get strURL & strSubURL
    set selenium = nothing
End function

Again, once the code has executed, Chrome automatically closes on me.  I don't want this.  I want to still be able to use the browser.  Is this possible?

Duplicate.


fix: make SIPs exempt from stale bots

SUMMARY
Update Stale bot configuration

LGTM

Codecov Report

Merging #7278 into master will increase coverage by 0.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7278      +/-   ##
==========================================
+ Coverage   64.72%   64.93%   +0.21%
==========================================
  Files         425      424       -1
  Lines       20672    20592      -80
  Branches     2282     2280       -2
==========================================
- Hits        13380    13372       -8
+ Misses       7167     7097      -70
+ Partials      125      123       -2

Impacted Files
Coverage Δ

superset/__init__.py
74.04% <0%> (-0.4%)
:arrow_down:

superset/assets/src/syncBackend.js

superset/views/core.py
74.96% <0%> (+0.03%)
:arrow_up:

superset/legacy.py
100% <0%> (+86.56%)
:arrow_up:

Continue to review full report at Codecov.

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


Explains order of precedence between env-file and env

Proposed changes
Explained order or precedence between env-file and env variable in docker-compose file

Unreleased project version (optional)

Related issues (optional)
Resolves #1312

@JimGalasyn , done with changes


Prompts.choice error ([sprintf] unexpected placeholder)

Hey, first of all thank you for all your fantastic efforts in maintaining this lib. I am facing this issue from yesterday.
let text = messages.welcome(session.userData.firstName)
let choices = messages.welcomeButtons
builder.Prompts.choice(session, text, choices)

My text looks like this
messages.welcome = function (name) {
    let gift = emoji.get(emojis.gift)
    let iphone = emoji.get(emojis.iphone)
    let computer = emoji.get(emojis.computer)
    let camera = emoji.get(emojis.camera)
    let tv = emoji.get(emojis.tv)
    let watch = emoji.get(emojis.watch)
    let makeup = emoji.get(emojis.lipstick)
    let wink = emoji.get(emojis.wink)
    let text =
        "Hey " + name + "! I am Bob " + wink + ", I will show you a price like 9 " + gift + " " + gift + ", if you guess it correctly as 999, I will give upto 99% off on that product.  Can you guess its price " + wink + "?"

    return text
}

My welcome Buttons look as follows
messages.welcomeButtons = [
    emoji.get(emojis.rocket) + " Lets Play!",
    " How it works " + emoji.get(emojis.question)
]

The emojis are being rendered with the node-emoji library and they are working perfectly.
Here is the scenario, if I specify a list style, this code works but I dont see the buttons.
Scenario 1
let text = messages.welcome(session.userData.firstName)
let choices = messages.welcomeButtons
builder.Prompts.choice(session, text, choices, { listStyle: "button" })

Output

Scenario 2
I dont specify the list style and the bot crashes
let text = messages.welcome(session.userData.firstName)
let choices = messages.welcomeButtons
builder.Prompts.choice(session, text, choices)

SyntaxError: [sprintf] unexpected placeholder
    at Function.sprintf.parse (d:\bots\zupquiz\node_modules\sprintf-js\src\sprintf.js:164:23)
    at sprintf (d:\bots\zupquiz\node_modules\sprintf-js\src\sprintf.js:19:34)
    at Object.vsprintf (d:\bots\zupquiz\node_modules\sprintf-js\src\sprintf.js:174:24)
    at fmtText (d:\bots\zupquiz\node_modules\botbuilder\lib\Message.js:261:46)
    at Message.text (d:\bots\zupquiz\node_modules\botbuilder\lib\Message.js:49:33)
    at Prompts.createPrompt (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\Prompts.js:239:21)
    at Prompts.sendPrompt (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\Prompts.js:175:24)
    at Prompts.begin (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\Prompts.js:122:14)
    at Session.beginDialog (d:\bots\zupquiz\node_modules\botbuilder\lib\Session.js:215:16)
    at beginPrompt (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\Prompts.js:348:13)
    at Function.Prompts.choice (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\Prompts.js:300:9)
    at welcome (d:\bots\zupquiz\index.js:131:25)
    at Array.stepOne (d:\bots\zupquiz\index.js:113:9)
    at SimpleDialog.waterfallAction [as fn] (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\SimpleDialog.js:67:25)
    at SimpleDialog.begin (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\SimpleDialog.js:18:14)
    at Session.beginDialog (d:\bots\zupquiz\node_modules\botbuilder\lib\Session.js:215:16)
    at Object.handler (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\ActionSet.js:226:25)
    at next (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\ActionSet.js:144:19)
    at ActionSet.selectActionRoute (d:\bots\zupquiz\node_modules\botbuilder\lib\dialogs\ActionSet.js:152:13)
    at UniversalBot.Library.selectGlobalActionRoute (d:\bots\zupquiz\node_modules\botbuilder\lib\bots\Library.js:219:22)
    at UniversalBot.Library.defaultSelectRoute (d:\bots\zupquiz\node_modules\botbuilder\lib\bots\Library.js:277:22)
    at UniversalBot.Library.selectRoute (d:\bots\zupquiz\node_modules\botbuilder\lib\bots\Library.js:85:18)

Package.json contents in case you need it
"dependencies": {
    "botbuilder": "^3.5.4",
    "cron": "^1.2.1",
    "dashbot": "^0.8.4",
    "express": "^4.14.1",
    "jimp": "^0.2.27",
    "jsonfile": "^2.4.0",
    "moment": "^2.17.1",
    "mongoose": "^4.8.1",
    "node-emoji": "^1.5.1",
    "nodemon": "^1.11.0",
    "request": "^2.79.0",
    "share-url": "^1.0.0"
  }

Any suggestions are highly appreciated 👍

Is it possible that the string representation of the emojis conflicts with the string representation of the placeholders in the sprintf library?

If that were the case, both scenarios would fail dont you think? it only fails when i dont specify the list style, how weird is that :)

@Stevenic what is the intention behind the extra %s in https://github.com/Microsoft/BotBuilder/blob/master/Node/core/lib/dialogs/Prompts.js#L239 ?

@slidenerd sorry for the very long delay.  The issue with "scenario 1" is that you need to pass in builder.ListStyle.button which maps to a number and not a string.
For "scenario 2", if you're crashing it's most likely because you're generating some sort of invalid escape code for SPRINTF. You may want to build your prompt as an IMessage instead so you don't run through SPRINTF at all.

Closing for now but please feel free to comment.


nixos/zfs-replication.nix: expose port in config.

I found while attempting to use a nonstandard SSH port with this module
that the port hadn't been passed as an option in this module.  This
corrects that oversight and makes it configurable.
I've verified this with the following steps:

sudo nixos-rebuild -I .../nixpkgs switch
systemctl cat zfs-replication.service

The service did include the changed port and continues to execute.

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

I'd still like to commit this if possible.  @grahamc do you have time to do a quick review?  If not, I'll try to find someone else who can review it.

I'm sad this has gone stale.  Please let me know what I can do to get this merged as quickly as possible.


How to create SQS queues with amazon marketing stream datasetId of sponsored-ads-campaign-diagnostics-recommendations and retail-sales-metrics

Hi elizafarley
When we create subscription, datasetId includes  sp-conversion, sp-traffic, budget-usage, sd-traffic, sd-conversion, sponsored-ads-campaign-diagnostics-recommendations and retail-sales-metrics, but https://github.com/amzn/ads-advanced-tools-docs/blob/main/amazon_marketing_stream/Stream_SQS _CF_Template.yaml only includes 4 queues (sp-conversion, sp-traffic, budget-usage, sd-traffic, sd-conversion). How to create SQS queues with campaign-diagnostics-recommendations and retail-sales-metrics ?
Additional context

Amazon ads document. https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/openapi#/Stream%20Subscription/CreateStreamSubscription
Amazon Marketing Stream data guide. https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/data-guide

thanks and hope for your reply :)

Hi @lynmison, sorry for the confusion here. The sponsored-ads-campaign-diagnostics-recommendations and retail-sales-metrics datasets are currently in preview, and not yet generally available. I am working with the product team update the API documentation to mark those datasetIds as preview only.
When those new datasets become available, we will post in the release notes.

Hi @lynmison, sorry for the confusion here. The sponsored-ads-campaign-diagnostics-recommendations and retail-sales-metrics datasets are currently in preview, and not yet generally available. I am working with the product team update the API documentation to mark those datasetIds as preview only.
When those new datasets become available, we will post in the release notes.

Copy that, many thanks for your kindly reply.

This has been reflected in the docs. Resolving.


Longer symbols for currencies don't work properly anymore

I work with lots of different currencies when making bitmaps and they used to work fine until recently, now I get clipping and cuts on symbols, I'll attach a picture as example.

Thank you for your work

Can you please provide your font file and character set?

Yes ofcourse. This also happens with any other font that I add those currencies. Anyways;
Font file (didn't let me upload directly here):
https://we.tl/t-68Gg20NjEm
Character Set:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ¡!№;%:¿?*()_+-=.,/|"'@#^&{}[]<>ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿıŠšŸ⃀⃁⃂⃃⃄⃅⃆⃇⃈͸͹΀΁΃΋΍΢¢£¥µØÞŒœƒ₦₩€₱₲₹₺₽₾₿$
Thanks for the fast reply

Hi @mati187 ,
I have fixed this issue, please try again.
Thank you for feedback.

Thank you so much!


HA2021.12: Log warning: device_state_attributes depreciated

🐛 Describe the bug
There is a new warning in the logger:
Integration implement device_state_attributes. Please report it to the custom component author.
Seems that device_state_attributes is going to be depreciated.
💥 When did the bug occurred.*

[ ] Installation / First-run
[ ] Configuration
[X] Other

👣 To Reproduce
Steps to reproduce the behavior:

Install HA 2021.12.0b0
Go to 'Logs'
See error

🧐 Expected behavior
No Warning
💻 Versions (please complete the following information):

OS: core-2021.12.0b0

🗄 Logfiles (Configuration > Logs)

🎓 Increase the log level for this custom integration by adding the following lines to the configuration.yaml

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:543
First occurred: 4. Dezember 2021, 20:12:35 (3773 occurrences)
Last logged: 06:37:36

Entity sensor.deutschland_casesper100k (<class 'custom_components.rki_covid.sensor.RKICovidNumbersSensor'>) implements device_state_attributes. Please report it to the custom component author.
Entity sensor.deutschland_newcases (<class 'custom_components.rki_covid.sensor.RKICovidNumbersSensor'>) implements device_state_attributes. Please report it to the custom component author.

Add regarding log messages from the Logs for more details.

This will be resolved in the next version. Which will probably been shipped with Home-Assistant itself.


test: source: csv: Do not touch cache

Codecov Report

Merging #21 into master will increase coverage by 1.01%.
The diff coverage is 89.58%.

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   93.46%   94.48%   +1.01%
==========================================
  Files          30       30
  Lines        1637     1649      +12
  Branches      155      159       +4
==========================================
+ Hits         1530     1558      +28
+ Misses         95       75      -20
- Partials       12       16       +4

Impacted Files
Coverage Δ

tests/source/test_csv.py
100% <100%> (ø)
:arrow_up:

dffml/source/csvfile.py
91.22% <83.33%> (+36.51%)
:arrow_up:

dffml/repo.py
94.3% <0%> (-4.07%)
:arrow_down:

dffml/source/memory.py
100% <0%> (+8.69%)
:arrow_up:

Continue to review full report at Codecov.

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


Update Account Lockout Query to remove error

PR Checklist

[X ] Explain your changes, so people looking at the PR know what and why, the code changes are the how.
Based on a customer case, a "dynamic expression" error was displaying for the account lockout case. I have updated the query to remove the error.

If adding or updating templates:

[ ] post a screenshot of templates and/or gallery changes
[ ] ensure your template has a corresponding gallery entry in the gallery folder
[ ] If you are adding a new template, add your team and template/gallery file(s) to the CODEOWNERS file. CODEOWNERS entries should be teams, not individuals
[ ] ensure all steps have meaningful names
[ ] ensure all parameters and grid columns have display names set so they can be localized
[ ] ensure that parameters id values are unique or they will fail PR validation (parameter ids are used for localization)
[ ] ensure that steps names are unique or they will fail PR validation (step names are used for localization)
[ ] grep /subscription/ and ensure that your parameters don't have any hardcoded resourceIds or they will fail PR validation
[ ] remove fallbackResourceIds and fromTemplateId fields from your template workbook or they will fail PR validation

#sign-off

Fixed JSON error and tested by pasting in Workbooks.

closing ancient uncompleted pull requests


moveend event documentation

Please document the 'hard' property of the event.

The hard property of moveend and viewreset will most probably be refactored away in the big refactor of #3278.

Yep.

Thanks.


supernovae from the future

Sorting by discovery date (most recent first), shows a few SN with incorrect discovery dates in the future:
SN 2010kb, SN 2010ka, SN 2010jz, SN 2010jy, SN 2010jx, SN 25747NSV

Verified this issue and attempting to track it down, thanks for bringing it to our attention.

This is now fixed, thanks again!


Add initial curated list of bad code

The goal is to add sources with intentionally flawed code, configurations, dependencies graph, IaC templates, etc. for learning about Software Supply Chain Security, and for running security tools.
Location of files
The initial set of bad code will be added under source/KIND, with KIND in { secrets, misconfigs, bad_deps, iac_flaws or code_tamper }. Under each directory, arbitrary directories could be defined for holding the bad code (for example each containing the code for a particular kind of defect).
Please note that directories may need to be added so the files are properly scanned, so for example GitHub workflows are placed under .github/workflows, dependency descripts like package.json or package-lock.json need to have the exact name for the scanner to recognize them, etc.
Examples:

source/secrets/aws/aws_key.bad.json (for this case, probably there is no need to add an aws_key.bad.json)
source/bad_deps/scripts/bad/yarn.lock (and corresponding package.json) and source/bad_deps/scripts/good/yarn.lock (and corresponding package.json) - note that bad and good directories instead of filename suffixes are used here, to preserve the file names.
source/minconfigs/scriptinjection/.github/workflows/inline-script-injection.bad.yml and corresponding inline-script-injection.good.yml. Note that .github/workflows should be used so the GitHub workflow YAML files are recognized.
source/iac/terraform/aws/alb_protected_by_waf/bad/main.tf (and others in same directory as needed for a coherent Terraform configuration) vs. source/iac/terraform/aws/alb_protected_by_waf/good/main.tf. All files belonging to the same configuration must be placed under the same directory.

Expections file - expected.yaml
An expected.yaml file could be added for each issue example, with two lists:  fail with the items that have security issues,  pass for the examples with fixed code. Each item listed could be the resource ID in IaC files, a path in the hierarchy of a configuration file like a JSON or YAML, line number or lines range. Anything helping the user to locate where is the problem, even to use the expected.yaml to automate verification of results from a scanner.

Completed for secrets testsamples. Under revision.

Completed for suspect dependencies testsamples. Under revision.
Some nuget and maven testsamples were not included sinces it's difficult to find existing malicious packages for those environments.

Completed for ARM IaC templates. Under revision.

Completed for AWS CloudFormation, Terraform and Docker IaC templates. Under revision.

Completed for Kubernetes IaC templates. Under revision.

Completed.


how to detect a page has been modified

I would like to change the appearance of my blog post based on whether the post has been modified or not, and I'd like Franklin to detect it automatically.
I've tried the following setup, which does not work. In the /blog/post.md, I include
@def published=Date(2020, 11, 5)
@def ismodified=locvar(:fd_mtime_raw)!=locvar(:published)
@def modified_date = locvar(:fd_mtime_raw)

in head.html
{{modified_date}}
{{if ismodified}} last modified: {{fd_mtime_raw}} {{end}}

This shows 0001-01-01 | last modified: 2020-11-05. It is clearly not working.
As I understand it, this is because the value of the fd_mtime_raw variable is not calculated within post.md, and it just has the default value. Since I cannot insert @def statements inside head.html, it seems nontrivial to solve this problem. Is there a good way to do this?
Thank you for your help in advance. (I see that the most obvious solution to this is to set manually a flag modified myself. If that's the easiest method available, I'd gladly take that as an answer. Just wanted to know if there's some existing machinery I am failing to utilize.)

Full HTML block in case that is relevant
{{ispage /blog/julia/*}}

	{{isdef title}}
{{fill title}}
{{end}}

  {{isdef published}}  posted: {{fill published}}

  {{fill modified_date}}
  {{if modified}}| last modified:  {{fill fd_mtime_raw}}{{end}}

	|
	{{end}}
	{{isdef author}} {{fill author}} {{end}}

  {{isdef authors}} {{fill authors}}  {{end}}

  {{fill modified_date}}
  {{if modified}}| last modified:  {{fill fd_mtime_raw}}{{end}}

{{end}}

As I understand it, this is because the value of the fd_mtime_raw variable is not calculated within post.md, and it just has the default value. Since I cannot insert @def statements inside head.html, it seems nontrivial to solve this problem. Is there a good way to do this?

this is correct
The trick is to do this from inside a hfun (https://franklinjl.org/syntax/utils/) : if you put this in utils.jl (not tested but it should work)
function hfun_showmodified()
    modified = locvar(:fd_mtime_raw) != locvar(:published)
    modified && return "| last modified:  $(locvar(:fd_mtime_raw))"
    return ""
end

and in your header you call this with {{showmodified}} let me know if that works

It worked! Thanks!


Only check suspended status for new allocations

During a regular internal redeploy we should not exclude hosts where a node is already allocated if the host is suspended in orchestrator. This check was added for new allocations to avoid having deployments timeout in case the host was suspended for longer periods (e.g. due to OS upgrade).
I believe this is the cause for why sometimes, during rollout of new Vespa version, config server would reallocate some nodes.

Ideally we would still consider suspended hosts and only prioritize them lower, but would have to propagate the suspended status a bit then


routing: Fix the incorrect deletion of IP rules

First commit
The IP rules for ENI can have two forms, with or without the to x.x.x.x/x part. There is a bug between the creation and deletion of rules, where the conditions to decide which form to use aren't the same. As the result, we would attempt to remove the wrong IP rules on pod deletion, causing a warning message in logs and leaving a stale IP rule behind:
level=warning msg="No rule matching found" rule="111: from <IP_ADDRESS>/32 to <IP_ADDRESS>/16 lookup 0" subsys=linux-routing

In case a new rule is later added for a new pod with the same IP, we can end up with a conflict if the new pod is on a different ENI. We will then have two rules for the same IP with lookups in different rouing tables.
111: from <IP_ADDRESS> lookup 10
111: from <IP_ADDRESS> lookup 11

This conflict can then cause connectivity issues because of pod traffic leaving through the wrong interface.
Flag --aws-release-excess-ips needs to be enabled for the bug to occur. Otherwise the IP address stays attached to the same ENI and we don't end up with an IP rule conflict.
Second commit
See commit for details. It fixes another inconsistency, this time without any consequence.
Fix bug that would cause some pod traffic to leave through the wrong interface if --aws-release-excess-ips is used and masquerading disabled.

/test

/test

/test

Really nice catch :) :rocket:

/test-gke

/test-1.21-5.4

Out of curiosity, is privileged_tests run as part of runtime test ?

Yes:
$ git grep -l privileged test/runtime/
test/runtime/privileged_tests.go

/test-runtime

/test

/test

/test-1.16-4.9

K8sNode Node labels updates are reflected in CiliumNode objects is failing in three Jenkins runs because the test is new and the PR branch is not up-to-date. So just another case of https://github.com/cilium/cilium/issues/15474. Other tests are passing. Reviews are in. Marking ready to merge.
I've opened https://github.com/cilium/cilium/issues/19261 to track the unit tests improvement without blocking this PR longer.

@pchaigno So we recently upgraded to 1.11.4 specifically for this fix, and after we upgraded and refresh all the nodes we notice that the issue is still happening, the only differance we notice in the ip rules is that the sick pod had 2 rules with the VPC CIDRS, could it be that the fix is supporting VPC's with multiple CIDRS?
<IP_ADDRESS>/16 and <IP_ADDRESS>/16 are the VPC Cidrs and <IP_ADDRESS> is the "sick" pod IP, we do see the same rules for the health ip for example, but healthy application pods have only a single rule.
Appreciate your insights here.

@avifreege I'd recommend opening a new issue for visibility. Also, what makes you think it's the same issue? Do you see two ip rules for the same pod with different routing table indexes? Or do you see the warning message mentioned above?

@pchaigno I am not sure its the same issue, but its the same symptom, i've opened a new issue
https://github.com/cilium/cilium/issues/19581