build: require administrator elevation

Hey, I recently switched back to Windows and now I've noticed that massive build time impact without Administrator Privileges.
I know this bug has been already reported several times and is actually related to the ember-cli project.
So now, I'm asking for something like a feature request. For example, when I use Webstorm's embedded terminal, then I don't have administrator privileges, and that means the build is very slow.
I thought about something like an Administrator Elevation, which will be called, when using the CLI on Windows without administrator privileges.
That means, the default Run as Administrator prompt will appear, and the build can run with elevated permissions.
Not sure, about this being a duplicate, but it should be fine.

I'm not really sure there is such a feature in Windows cmd, the equivalent of a su in Linux. Do you know of such a command?
Otherwise I'm not sure how we could programatically elevate the current console.

I didn't implement it myself yet, but I found something which does the desired elevation.

https://github.com/coreybutler/node-windows#elevate
http://hastebin.com/yijudorave.coffee

So, the best command flow, would be, to request for permission elevation and then re-execute the given CLI command.
But this seems to be a bit weird:

You need to sync the new process with the main process

Additionally, you're depending on some .NET libraries, which is also not very nice.

The equivalent of a su in windows is runas
runas /user:<localmachinename>\administrator cmd
I 'm not sure whether applicable here

@DevVersion as far as I can, the second option is doing the same as what @anode7 suggested.
The elevate method in node-windows is interesting though... I can see it working, it's basically a admin level exec. It would require some work to put in, but it should be doable.
I can't say it's a priority right now, but I'll leave the issue open for when there is a bit more time.

I'm coming in fresh here and did not investigate why admin privileges are needed, but is there no option to stay away from needing admin privileges altogether? I'm working in a workplace environment where getting admin rights on my machine will be tough to get...I'm probably not the only one who would face issues with needing admin rights.

@samherrmann  I believe admin privileges are because the broccoli-typescript compiler creates symbolic links as part of the compilation process, and symbolic links can't be created without administrator privileges, or at least group policy changes, as per Ember's guide: http://ember-cli.com/user-guide/#symlinks-on-windows

I am in the same situation as @samherrmann, i.e. its very unlikely I'm going to be allowed the privileges for creating symlinks (but I am fighting for them!). In the ember guide link above it says:

If symlinks are not available plugins should fall back to copying files

As we don't want to exclude corporate environments perhaps this is the best solution.

@samherrmann  and @cwmrowe , check out this post:
https://github.com/angular/angular-cli/issues/641#issuecomment-219945836
It's a bit hacky, but if you replace line 206 of node_modules/angular-cli/lib/broccoli-typescript with the following, it will fall back to copying files to a lib folder in the root of your project.
try {
  fs.symlinkSync(absoluteFilePath, outputFilePath);
} catch(e) {
  const conentStr = fs.readFileSync(absoluteFilePath);
  fs.writeFileSync(outputFilePath, conentStr);
}

I've done it and can verify that it works for me.  It does significantly slow down the build process (from about 1 second on my personal laptop to about 25 seconds on my work desktop, although there's a huge difference in specs between the machines too), but it works just fine otherwise.
You'll still get the message about not having admin, but it'll work.

cheers @alexkibler, that got me most of the way but you also need to add that same bit of code to line 81 of the same file if you want ng serve to work. My vanilla project takes about 8 seconds to build the first time around and then 2 seconds on subsequent builds.
It's also worth mentioning that I the node_modules folder you need to edit is the project one, not the global one.
Do you know if this code will be included in the CLI?

@cwmrowe Great point, you definitely want to modify the project-level folder.  Interesting that you had to change line 81 because mine works without changing it.
I hope it ends up getting included, as we'll have to re-patch it every time the CLI team pushes an update.

Just wanted to report in and say that I had our infrastructure lead give me rights to create symlinks, and it is working. My build time went down from 30-ish seconds to 13.

https://github.com/angular/angular-cli/pull/905/files

Anyone know the impact of exception handling on speed?  I just created a '_useSymlink' property I set to true in the constructor and set to false on the first error, then I just do the copy if it is false instead of the symlink from then on...


[RS Backup] PS backup support for new features

Added backup support for Azure SQL
Added capability to specify retention of recovery point during backup
Added backup support for Encrypted VMs

@dragonfly91  Please make the test method name changes and change the names of the recording files accordingly.
The .config changes do not need to gate this check-in.  However, we will; require this for the next update to this library, so please start moving from reliance on existing resources to creating those resources in test setup.

I've shortened the test names. We have a tracking task to update our tests to use automated setup. Will take it up in the next iteration. Please review / merge this PR.

@azuresdkci retest this please

@dragonfly91 some issues where we are adding to app.config - we need to make setup of necessary resources part of test setup

@markcowl yes, we are planning to change the tests - we have a tracking task to update our tests to use automated setup which will be taken up up in the next iteration. Can this PR be merged?

@markcowl For the test cases related to azure sql backup it would be difficult to follow "we need to make setup of necessary resources part of test setup" at this point of time. For the Azure SQL feature cmdlets, half of the dependent cmdlets are being authored by AzureSql team(create commands) and half are created by Backup team (which is mostly get commands). Unless we setup our resource using Rest Api calls before running the test cases we cannot run these cmdlets test cases. As both the teams will be shipping respective cmdlets in the upcoming release, we can only change these test cases to run end to end only after both the cmdlets are available. We can surely work on changing the test cases in next release cycle when both teams cmdlets are available.

@swatimadhukar We will require this in the next release, along with the conversion to AutoRest

@markcowl We will surely make all the required changes in the tests in next release when both team's SQL and Backup cmdlets for Azure Sql backup are released and is ready for use.

@markcowl Hi, the tests have passed; can you continue with the review / merge?


Another PolySwarm scam

Another scam site :(

https://urlscan.io/result/84a72b79-75a2-4a9a-b650-c0b874853021/#summary
https://urlscan.io/result/f6bfd502-d9b2-4a2d-b990-1421a1f3f594/#summary

Thanks for the report! Please allow ~15minutes for caches to update


Unable to extract uploader id

Checklist

[x ] I'm reporting a broken site support issue
[x ] I've verified that I'm running youtube-dl version 2021.12.17
[ x] I've checked that all provided URLs are alive and playable in a browser
[x ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x ] I've searched the bugtracker for similar bug reports including closed ones
[ x] I've read bugs section in FAQ

Verbose log

PASTE VERBOSE LOG HERE
dpotter@david-pc:~$ youtube-dl --verbose https://www.youtube.com/watch?v=lTrF2ryFH54
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://www.youtube.com/watch?v=lTrF2ryFH54']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 2.7.18 (CPython) - Linux-5.10.0-23-amd64-x86_64-with-debian-11.7
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] lTrF2ryFH54: Downloading webpage
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1794, in _real_extract
    'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1012, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

WRITE DESCRIPTION HERE
I get the following error message when trying to download the video https://www.youtube.com/watch?v=lTrF2ryFH54:
dpotter@david-pc:~$ youtube-dl https://www.youtube.com/watch?v=lTrF2ryFH54
[youtube] lTrF2ryFH54: Downloading webpage
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

the download does work on the main branch, maybe only the release version is broken

I happened to find a discussion about this issue on Stack Overflow:
https://stackoverflow.com/questions/75495800/error-unable-to-extract-uploader-id-youtube-discord-py
It appears to be a known problem.

I happened to find a discussion about this issue on Stack Overflow:

Why search SO, when the problem is listed in the pinned issue that you should have read before opening the issue? Useful answers about yt-dl problems are much more likely to be found here.


sfdx force:source:retrieve Cannot read property 'metadataName' of undefined

Summary
A particular metadata type added to package.xml causes cannot read property of undefined error
Steps To Reproduce:

Add the below to package.xml file

<types>
    <members>*</members>
    <name>Audience</name>
</types>

sfdx force:source:retrieve --manifest
ERROR running force:source:retrieve:  Cannot read property 'metadataName' of undefined

Expected result
Should be able to successfully retrieve org metadata
Actual result
sfdx force:source:retrieve should successfully execute with no error and return exit code 0
Additional information
Feel free to attach a screenshot.
SFDX CLI Version:
sfdx-cli/7.19.0-c5be43915c win32-x64 node-v10.15.3
SFDX plugin Version

@oclif/plugin-commands 1.2.2 (core)
@oclif/plugin-help 2.2.0 (core)
@oclif/plugin-not-found 1.2.2 (core)
@oclif/plugin-plugins 1.7.8 (core)
@oclif/plugin-update 1.3.9 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.5 (core)
analytics 1.2.1 (core)
generator 1.1.0 (core)
salesforcedx 46.9.0 (core)
├─ force-language-services 46.13.0 (core)
└─ salesforce-alm 46.12.0 (core)
sfdx-cli 7.19.0 (core)

OS and version:
Windows 10 Pro, version 1809, OSBuild 17763.615

@tbg-jasonfung run DEBUG=* sfdx force:source:retrieve with whatever other params you want to add and that will give you the stack trace.

I'm working on a community project using SFDX and I'm facing this issue too. As soon as I place the Audience metadata in package.xml and perform a source retrieve, I got the same error message as mentioned by the OP.
Trying to create the files manually, and then refresh them with "SFDX: Retrieve source from Org" gives the error: "Unexpected file found in package directory".
Also tried to retrieve the Audiences via Workbench, then performed a mdapi:convert command and an error is thrown too. It just seems that SFDX-CLI does not support the Audience metadata files.
I can provide more details if needed.
Thanks.

I am facing the same issue but cannot determine the cause of the error @clairebianchi can I send you the file for review?

@ybiyani I have added this to our backlog, we have confirmed it is a bug.

I discovered that this does not behave identically when API version 47.0 or 46.0 are mentioned in the package.xml file :

API 46.0 produces OK result
API 47.0 generates the "ERROR running force:source:retrieve:  Cannot read property 'metadataName' of undefined" error message

I tested that

I discovered that this does not behave identically when API version 47.0 or 46.0 are mentioned in the package.xml file :
* API 46.0 produces OK result

* API 47.0 generates the "ERROR running force:source:retrieve:  Cannot read property 'metadataName' of undefined" error message

I tested that and I still having the same issue. If I run sfdx:force:source:pull I get this message "No source tracking support for type: Audience. For details, visit https://developer.salesforce.com/docs/metadata-coverage and select your API version. Skipping..."

@tbg-jasonfung Trying to dig into this one and struggling to repro the exact issue. Would you or anyone else in this thread be able to set up a generic repo with your set-up that causes this retrieve issue?
Thanks!

@rvwatch Our codebase has changed quite a bit since I logged this ticket - however I'm able to reproduce the problem with a different metadata included in package.xml:
<types>
    <members>*</members>
    <name>NetworkBranding</name>
</types>

Here is the debug log:
 sfdx:SourceWorkspaceAdapter DEBUG retrievedContentPath: C:\Users\jason\AppData\Local\Temp\sdx_sourceRetrieve_1578581516478\unpackaged\networkBranding\cbWebsite.networkBranding +0ms
  sfdx:SourceWorkspaceAdapter DEBUG processMdapiFileProperty retrieveRoot: C:\Users\jason\AppData\Local\Temp\sdx_sourceRetrieve_1578581516478 +1ms
  sfdx:SourceWorkspaceAdapter DEBUG processMdapiFileProperty aggregateFullName: cbCharities +0ms
  sfdx:SourceWorkspaceAdapter DEBUG processMdapiFileProperty aggregateMetadataPath: undefined +1ms
  sfdx:SourceWorkspaceAdapter DEBUG processMdapiFileProperty this.forceIgnore.accepts(aggregateMetadataPath): true +0ms
  sfdx:SourceWorkspaceAdapter DEBUG processMdapiFilePropertykey: NetworkBranding__cbCharities +0ms
  sfdx:SourceWorkspaceAdapter DEBUG processMdapiFileProperty aggregateSourceElement.retrievedMetadataPath: C:\Users\jason\AppData\Local\Temp\sdx_sourceRetrieve_1578581516478\unpackages
  sfdx:SourceWorkspaceAdapter DEBUG retrievedContentPath: C:\Users\jason\AppData\Local\Temp\sdx_sourceRetrieve_1578581516478\unpackaged\networkBranding\cbCharities.networkBranding +0m
  sfdx:SourceWorkspaceAdapter DEBUG processMdapiFileProperty retrieveRoot: C:\Users\jason\AppData\Local\Temp\sdx_sourceRetrieve_1578581516478 +1ms
  sfdx:core TRACE Setup child 'SourceUtil' logger instance +10s
ERROR running force:source:retrieve:  Cannot read property 'metadataName' of undefined
  sfdx:SourceRetrieveCommand ERROR [ '\u001b[1mERROR running force:source:retrieve: \u001b[22m',
  sfdx:SourceRetrieveCommand   '\u001b[31mCannot read property \'metadataName\' of undefined\u001b[39m' ] +2m
  sfdx:analytics Sending cmd error log: { commandName: 'force:source:retrieve',
  commandParams: 'manifest,loglevel,wait',
  commandTimestamp:<PHONE_NUMBER>014,
  hubOrgId: '',
  toolbeltVersion: '7.36.0-b1c4e9c7c8 47.10.0',
  sourceApiVersion: '47.0',
  origin: 'sfdx-cli/7.36.0-b1c4e9c7c8 win32-x64 node-v10.15.3',
  artifactName: '<GDPR_HIDDEN>',
  orgType: 'unknown',
  errorName: 'TypeError',
  errorMessage: '<GDPR_HIDDEN>',
  errorStack: '<GDPR_HIDDEN>',
  __errorWhitelist__: undefined } +2m
  sfdx:core TRACE Setup child 'SpawnedTelemetry' logger instance +0ms
  sfdx:SpawnedTelemetry DEBUG 'SFDX_DISABLE_INSIGHTS': false +0ms
  sfdx:SpawnedTelemetry WARN Insights logging in enabled. This can be disabled by setting SFDX_DISABLE_INSIGHTS=true +1ms
  sfdx:SpawnedTelemetry DEBUG starting child process +1ms
  sfdx:SpawnedTelemetry DEBUG child process started at PID: 23364 +58ms
  sfdx:SpawnedTelemetry DEBUG Waiting 3000 ms to stop child process +0ms
  sfdx:core TRACE Setup child 'TelemetryReporter' logger instance +0ms
  sfdx:TelemetryReporter DEBUG 'SFDX_DISABLE_INSIGHTS': false +0ms
  sfdx:TelemetryReporter WARN Insights logging in enabled. This can be disabled by setting SFDX_DISABLE_INSIGHTS=true +1ms
  sfdx:TelemetryReporter DEBUG creating appInsightsClient +1ms
  sfdx:SpawnedTelemetry DEBUG stopping child process +3s
  sfdx:SpawnedTelemetry DEBUG Stopped child process +2ms
  lazy-require saving type cache to C:\Users\jason\AppData\Local\sfdx\module-types.json +2m
  lazy-require no changes to save +0ms
  sfdx:analytics using C:\Users\jason\AppData\Local\sfdx\analytics.log for usage error logging +3s
  sfdx:analytics spawned usage " C:\Users\jason\AppData\Local\sfdx\client\7.36.0-b1c4e9c7c8\bin\node.exe C:\Users\jason\AppData\Local\sfdx\client\7.36.0-b1c4e9c7c8\node_modules\@salesforce\plugin-analytics\lib\processes\logUsage " +44ms

I hope the above is useful

Thanks, @tbg-jasonfung ! I'll give that a try.

Unfortunately, I've been unable to replicate this issue locally. I'm concerned I'm missing a specific step in regards to how you're running/creating communities and then setting up an Audience or Network Branding type that might be the key for a repro of this issue.
FYI, I've been using this example repo: https://github.com/trailheadapps/ebikes-lwc. I'm able to auth to my dev hub, spin up a scratch org, open that scratch org and create a community and a Network Branding type via UI, then retrieve that type to my local project without a problem.
Let me know what I need to change in this setup or if I need to be approaching this from a different angle.
Thanks for your patience and help with this!
@tbg-jasonfung @kristualdandamudi @highered1 @ulistaerk ?

@rvwatch I've realised your repo doesn't contain a package.xml file under or a Manifest directory - think to reproduce the issue it shouldn't be spinning up a scratch org?

I've also been simply creating my own package.xml file with the updated entries as described and ran multiple retrieves against it. I'll attempt a "manifest" project as well, but I'm fairly certain the results will be the same. Hopefully, I'm wrong and it triggers the error! That would be a great direction to head if so.

@tbg-jasonfung or @kristualdandamudi , How are you going about setting up your audience types? I'd like to see a detailed breakdown I can follow so I'm matching your process.

@rvwatch , i am not using scratch org, so i already  community exist in my sandbox. so i trying to  pull all meta data related my community by using below package.xml. with below command:
sfdx force:source:retrieve --manifest c:\Users\xxx\Documents\SFDX\abc\manifest\package.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata">        <types> 	<members>abc</members> 	<name>CustomSite</name>   </types>   <types> 	<members>abc</members> 	<name>Network</name>   </types>   <types> 	<members>abc1</members> 	<name>SiteDotCom</name>   </types>   <types> 	<members>xxxx</members> 	<members>xxxx123</members> 	<members>xxx369</members> 	<members>xxxx36988</members>     <name>Audience</name>    </types>    <types>         <members>cbabc</members>         <name>NetworkBranding</name>     </types>  <version>46.0</version> </Package>
result : ERROR running force:source:retrieve:  Cannot read property 'metadataName' of undefined
then i removed Audience  meta data types from package.xml then tried with same pull command
result: Now i got all community metadata files.

as others have stated - seems to be an issue with v47, changing to 46 works...

So I was running into this issue with ManagedContentType and was in fact able to include it if I used version 46 in my package.xml manifest file but was not able to include it if I changed the version to 47 or 48 (even though the API I'm retrieving from is 48).
I'm confused as to why it's working when I change to 46 because if I'm reading the Metadata Coverage webpage correctly, it's saying that ManagedContentType is NOT supported in 46 but IS supported in 47 and 48, no? The checkmarks on that page indicate supported, not unsupported, no?

@tbg-jasonfung or @kristualdandamudi , How are you going about setting up your audience types? I'd like to see a detailed breakdown I can follow so I'm matching your process.

@rvwatch I've just had a look at our orgs communities set up and followed this guide to get our audience type set up. It doesn't appear that we have any! Sorry that I can't help any further.

UPDATE:
source:retrieve should work with the Audience type after this week's release. We're still hitting some issues with source:pull and the Audience type, but this will hopefully be taken care of soon. In the meantime, we've updated the error messaging for this issue to be a bit more clear with steps for the users to take.
Thanks for your patience and the help tracking this one down! We should have any remaining gaps for types like this filled soon.

I would be interested with the new Salesforce CLI release for Audience

Hi Ricardo (@rvwatch), I've spotted the same problem with the following metadata types :

Audience
RedirectWhitelistUrl
NetworkBranding
ConnectedApp
ManagedContentType

Will your change fix all these ?

I notice it with ManagedContentType.  How would a salesforce developer using vscode and sfdx  'know' which metadata type(s) cause this generic error during sfdx force:source:retrieve?  Can we get more verbose logs somehow during a retrieve? I tried setting --loglevel DEBUG however the terminal still showed me the generic error as :
"Cannot read property 'metadataName' of undefined"
Furthermore, ~/.sfdx/sfdx.log   was refreshed as expected during my attempt but doesnt show me any finer detail about the error, so sadly I dont know which metadatatypes are causing retrieve failures.
Thanks for the info,

Hey All. Be sure to update to the latest version of the CLI. @AltiusRupert - Audience type should be fixed. I've also tested against NetworkBranding and had no issues retrieving it. Same with ConnectedApp.
ManagedContentType is a known issue. We've reached out to the team that owns that and hopefully will have a fix in the works soon.
@peternoges The latest version of the CLI will capture this specific error and prompt users to file an issue here. This particular error seems to occur mostly with community types. We're working on filling our coverage gaps on these now and will hopefully be able to capture these before they become issues for our users soon.
Thanks for your patience!

Hi,
we´ve been working working with SFDX for a while with Communities, Sales and Services Cloud, and since we udpate the sfdx-cli version we are getting Issues wit the Audiences. Right now we have the versión sfdx-cli/7.53.0-839fc82926 win32-x64 node-v10.15.3. The previous versions that was working 7.48. We´ve been testing to run the pull command configuring apiVersion 48.0 and 46.0 and we are gettting the same results in both cases.
Here the errors:
$ sfdx force:source:pull -u dencinasDEVELOP_v2
WARNING: apiVersion configuration overridden at "48.0"
ERROR running force:source:pull:  You can’t retrieve the default audience.
$ sfdx force:source:pull -u dencinasDEVELOP_v2 --json
{
"status": 1,
"name": "RetrieveFailed",
"message": "You can’t retrieve the default audience.",
"exitCode": 1,
"commandName": "SourcePullCommand",
"stack": "RetrieveFailed: You can’t retrieve the default audience.\n    at MdapiPullApi._processResults (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:160:36)\n    at MdapiPullApi._postRetrieve (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:123:21)\n    at MdapiPullApi.doPull (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:86:31)\nOuter stack:\n    at Function.wrap (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\node_modules\@salesforce\core\lib\sfdxError.js:151:27)\n    at SourcePullCommand.catch (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\ToolbeltCommand.js:246:46)",
"warnings": [
"apiVersion configuration overridden at "48.0""
]
}`
Any Ideas about when is going to be fixed. Do you have any workaround?

Hi,
#151 (comment)
We just updated to the latest versin yesterday but still not working.
We´ve been working working with SFDX for a while with Communities, Sales and Services Cloud, and since we udpate the sfdx-cli version we are getting Issues wit the Audiences, we don´t have any Audience define. Right now we have the versión sfdx-cli/7.53.0-839fc82926 win32-x64 node-v10.15.3. The previous versions that was working 7.48. We´ve been testing to run the pull command configuring apiVersion 48.0 and 46.0 and we are gettting the same results in both cases.
Here the errors:
$ sfdx force:source:pull -u dencinasDEVELOP_v2
WARNING: apiVersion configuration overridden at "48.0" ERROR running force:source:pull: You can’t retrieve the default audience.
$ sfdx force:source:pull -u dencinasDEVELOP_v2 --json
{
"status": 1,
"name": "RetrieveFailed",
"message": "You can’t retrieve the default audience.",
"exitCode": 1,
"commandName": "SourcePullCommand",
"stack": "RetrieveFailed: You can’t retrieve the default audience.\n at MdapiPullApi._processResults (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:160:36)\n at MdapiPullApi._postRetrieve (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:123:21)\n at MdapiPullApi.doPull (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:86:31)\nOuter stack:\n at Function.wrap (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\node_modules@salesforce\core\lib\sfdxError.js:151:27)\n at SourcePullCommand.catch (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\ToolbeltCommand.js:246:46)",
"warnings": [
"apiVersion configuration overridden at "48.0""
]
}`
Any Ideas about when is going to be fixed. Do you have any workaround?

Same here.
SFDX version: sfdx-cli/7.53.0-839fc82926 win32-x64 node-v10.15.3
Error:
sfdx force:source:pull --json
{
"status": 1,
"name": "RetrieveFailed",
"message": "Não é possível recuperar o público padrão.",
"commandName": "SourcePullCommand",
"stack": "RetrieveFailed: Não é possível recuperar o público padrão.\n    at MdapiPullApi._processResults (C:\Users\rebeka.franca\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:160:36)\n    at MdapiPullApi._postRetrieve (C:\Users\rebeka.franca\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:123:21)\n    at MdapiPullApi.doPull (C:\Users\rebeka.franca\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:86:31)\nOuter stack:\n    at Function.wrap (C:\Users\rebeka.franca\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\node_modules\@salesforce\core\lib\sfdxError.js:151:27)\n    at SourcePullCommand.catch (C:\Users\rebeka.franca\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\ToolbeltCommand.js:246:46)",
"warnings": []
}
Someone has any workaround?
Thanks! :)

I'm having the exact same issue as @dencinas . I've tried to downgrade the SFDX plugins, but the error persistis. Does anyone came up with a workaround already? Thanks in advance!

Hi,
#151 (comment)
We just updated to the latest versin yesterday but still not working.
We´ve been working working with SFDX for a while with Communities, Sales and Services Cloud, and since we udpate the sfdx-cli version we are getting Issues wit the Audiences, we don´t have any Audience define. Right now we have the versión sfdx-cli/7.53.0-839fc82926 win32-x64 node-v10.15.3. The previous versions that was working 7.48. We´ve been testing to run the pull command configuring apiVersion 48.0 and 46.0 and we are gettting the same results in both cases.
Here the errors:
$ sfdx force:source:pull -u dencinasDEVELOP_v2
WARNING: apiVersion configuration overridden at "48.0" ERROR running force:source:pull: You can’t retrieve the default audience.
$ sfdx force:source:pull -u dencinasDEVELOP_v2 --json
{
"status": 1,
"name": "RetrieveFailed",
"message": "You can’t retrieve the default audience.",
"exitCode": 1,
"commandName": "SourcePullCommand",
"stack": "RetrieveFailed: You can’t retrieve the default audience.\n at MdapiPullApi._processResults (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:160:36)\n at MdapiPullApi._postRetrieve (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:123:21)\n at MdapiPullApi.doPull (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\lib\source\sourcePullApi.js:86:31)\nOuter stack:\n at Function.wrap (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\node_modules@salesforce\core\lib\sfdxError.js:151:27)\n at SourcePullCommand.catch (C:\Users\David Encinas\AppData\Local\sfdx\client\7.53.0-839fc82926\node_modules\salesforce-alm\dist\ToolbeltCommand.js:246:46)",
"warnings": [
"apiVersion configuration overridden at "48.0""
]
}`
Any Ideas about when is going to be fixed. Do you have any workaround?

I've found a workaround that allowed me to pull from my scratch org. I uninstalled Salesforce CLI from my computer then I installed again from https://developer.salesforce.com/tools/sfdxcli (version 7.36.0). A warning saying "No source format support for type Audience..." is displayed, but I was able to run sfdx force:source:pull. Not ideal, but it works for now.

I'm having issues as well with ManagedContentType - I've tried every which way to retrieve via VSCode and Workbench. Workbench shows me the following error:

Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:ManagedContentType and file name:news.

Good to know that ManagedContentType is being looked into @rvwatch.

I am getting the same with the latest cli
sfdx update
sfdx-cli: Updating CLI from 7.53.0-839fc82926 to 7.54.4-8ff9ba9cc5... done

I get
sfdx force:source:pull -f -u<EMAIL_ADDRESS>ERROR running force:source:pull:  You can’t retrieve the default audience

Seems that this issue is the dump of all the metadata not supported errors?
I've run into the problem described here: https://github.com/forcedotcom/cli/issues/351
And it was closed as a duplicate of this issue even if the symptoms are not the same.
I'm getting this error message:
Entity type 'WaveApplication' is not available in this organization
Entity type 'WaveDataflow' is not available in this organization
Entity type 'WaveDashboard' is not available in this organization
Entity type 'WaveDataset' is not available in this organization
Entity type 'WaveXmd' is not available in this organization

I tried disabling Einstein Analytics in my scratch org but it still won't work with sfdx force:source:pull

FYI, If you start getting this on every command it could be due to an installed plugin.  sfdx plugin:uninstall anything you have recently added and it may go away.


Add e2e test for progress circle

Closing this as we need to write e2e tests for all the components, which we can track outside of issues.


bugfix -- Pisces scheme sidebar positioning error

Use pisces scheme, when the first time open a page, if the browser window is less
than 991 px, and then adjust the browser window more than 991
px, the #sidebar margin-top error.
I add a media change event listener to fix it.

Thanks. :+1:


Android : clang + libc++

I want to build for android arm64-v8a using clang toolchain and libc++ but i get errors. ( it compiles fine with libstdc++ ).
I'm using Android NDK r13 beta2

I'm curious, why do you need the validation layers compiled with libc++?

Clang uses libc++; not libstdc++. They are not ABI compatible.

@courtney-g, if there are no short-term plans to add libc++ support can you close this one?

I can only guarantee the default build environment will work for the validation layers. So, closing this as will-not-fix.


Downloaded files are not visible on the desktop

OS/Platform
Windows
Installed
https://ungoogled-software.github.io/ungoogled-chromium-binaries/
Version
113.0.5672.64-1.1
Description
Downloaded files are not visible on the desktop
How to Reproduce?
Select the desktop as the download location.
Actual behaviour
When Desktop is selected as the download location, you need to Refresh the Desktop to see the downloaded files.
C:\Users\User\Desktop = Downloaded files in this location are not visible. (Refresh required)
C:\Users\User\Downloads = No problem
Expected behaviour
The file should appear on the desktop without refreshing.

Have you tested that this is not an upstream issue or an issue with your configuration?

Yes that's how it only happens with ungoogled-chromium.

I really doubt that this is an issue with ungoogled-chromium patches rather then Windows itself. Please try latest version, this might be fixed there if it is a genuine Chromium bug.


How to get feature maps with trained VGG16

Please make sure that the boxes below are checked before you submit your issue. Thank you!

[x] Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps

[x] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

[x] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

The example 'Extract features with VGG16' on https://keras.io/applications/
I use my picture try to extract features
from keras.applications.vgg16 import VGG16
from keras.preprocessing import image
from keras.applications.vgg16 import preprocess_input
import numpy as np
from scipy.misc import imsave
model = VGG16(weights='imagenet', include_top=False)
img_path = '1.jpg'
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
features = model.predict(x)
print features
imsave('2.png', features)
print features--I get many matrices
but imsave('2.png', features) get error--ValueError: 'arr' does not have a suitable array shape for any mode.
I am a beginner about keras and python,I don't know how to get my feature maps by this example.Thank You!

As you have set include_top=False, it doesn't use the FC layer, thus you get the 7 x 7 x 512 matrix as output. See the VGG-16 macro-architecture here.
Also a 7 x 7 x 512 array cannot be saved as an image.

Get the 7 x 7 x 512 matrix as output? I was expecting a 3 x 3 x 512 matrix as output, totalizing 4608 features in the case of VGG16. In this case, this model extracts 25088 features from images resized to 50176 pixels, that does not seem in accordance with the first dense layer in the cited figure: https://www.cs.toronto.edu/~frossard/post/vgg16/vgg16.png

Did you manage to solve your problem? I'm struggling with the same issue.

@barbaradarques
'''
from keras.applications import vgg16
from keras.preprocessing import image
from keras.applications.vgg16 import preprocess_input
from keras.models import Model
import numpy as np
import matplotlib.pyplot as plt
img_path = '1.png'
img = image.load_img(img_path, target_size=(224, 224))
model = vgg16.VGG16(weights='imagenet', include_top=True)
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
features = model.predict(x)
model_extractfeatures = Model(input=model.input, output=model.get_layer('fc2').output)
fc2_features = model_extractfeatures.predict(x)
fc2_features = fc2_features.reshape((4096,1))
np.savetxt('fc2.txt',fc2_features)
plt.plot(fc2_features)
plt.show()
'''
It's my code to get feature matrix with VGG16 (keras version 1.2).

Oh, that was fast! Thanks!
But... isn't the feature map supposed to be a variation of the input image, like (filter * image)? Why are you flattening the output? How do I go from this long vector to such an image?

@barbaradarques
The VGG16's input size is restricted to 224*224 so the feature map is not variable.I flatten the output just for my following work.

Hmm, ok.

@barbaradarques
from keras.applications.vgg16 import VGG16
from keras.preprocessing import image
from keras.applications.vgg16 import preprocess_input
import numpy as np
from keras.models import Sequential
from keras.layers import *
import pylab
model = VGG16(weights='imagenet', include_top=False)
img_path = 'img.jpeg'
img = image.load_img(img_path)
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
features = model.predict(x)
pic=features[0,:,:,128]
pylab.imshow(pic)
pylab.gray()
pylab.show()
Here's my code to visualize one of the 512 feature map. Here I choose 128th feature map to visualize, U can set it at will.

@GloryDream That's exactly what I was looking for! Thank you very much!

Hi, I am new to programming in python. Can anyone please tell me the feature vector length for one image in (4096,1) if we use fc1 layer. What will be the length of feature vector for more then one image? Will it be for example (4096,10) or some other number?


Add miner of Sonar warnings

Hi all,
This is a new, simple feature that we might use for several things, such as checking for projects that might be used in our experiments. More important, this allows us to do large-scale analyses since we don't need to upload projects on Sonar Cloud.
Running the miner on INRIA/spoon, passing the folder /src/main/java/ as argument, for instance, the output will be:
GetClassLoaderCheck=1
SynchronizationOnGetClassCheck=0
CastArithmeticOperandCheck=0
ArrayHashCodeAndToStringCheck=0
UnclosedResourcesCheck=0
BigDecimalDoubleConstructorCheck=0
CompareToReturnValueCheck=0
MathOnFloatCheck=0
UnusedThrowableCheck=0
SynchronizationOnStringOrBoxedCheck=0
SelfAssignementCheck=0
EqualsOnAtomicClassCheck=0
IteratorNextExceptionCheck=0
CompareStringsBoxedTypesWithEqualsCheck=0

Thanks!


[SPARK-38298][SQL][Tests] Fix DataExpressionSuite, NullExpressionsSuite, StringExpressionsSuite, complexTypesSuite, CastSuite under ANSI mode

What changes were proposed in this pull request?
The PR fixes the following tests under ANSI mode:

DataExpressionSuite,
NullExpressionsSuite,
StringExpressionsSuite,
ComplexTypesSuite,
CastSuite

Most of them should only work with ANSI off. The fix wrap the corresponding code with
withSQLConf(SQLConf.ANSI_ENABLED.key -> "false") {
  // code only works under ANSI off
}

The CastSuite intentionally tests the case of ANSI off. The fix explicitly set ANSI off in beforeAll and reset it in afterAll.
Why are the changes needed?
To set up a new GA job to run tests with ANSI mode before 3.3.0 release.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Test locally with both ANSI on and off, both passed.

@gengliangwang ;))

Thanks, merging to master


drop patch that's disabling -Werror

OK, so at the very least, pypy isn't ready for -Werror it seems.


Slack invite is expired

Hello hello!
I was looking to join the slack workspace but I believe the link is expired.
https://github.com/opensearch-project/project-website/blob/a1a6c47f28b1dab6e4a75e02d3ef923c0a987764/slack.markdown?plain=1#L25

thanks @dmoreira-sbp - will work on updating it this morning

thanks again @dmoreira-sbp - page is now updated https://opensearch.org/slack.html

Thank you @krisfreedain! Much appreciated :)


Broken Extra Sweet Berry Cookie Recipe Doesn't Use Sweet Berries

Minecraft Version
1.20.1
Describe the Bug
This mod erroneously adds a recipe for Sweet Berry Cookies that uses Honey instead of Sweet Berries.
(And also I can't help but ask why the shaped recipe variants are even needed? The shapeless ones work the same way but in any shape.)
https://github.com/vectorwing/FarmersDelight/issues/867
Reproduction Steps
Check the recipes for Sweet Berry Cookies in JEI
Expected Result
They should only be crafted using Sweet Berries, as Honey Cookies are a seperate item.
 That commit did the exact opposite of fixing the problem. It looks like you just added yet another recipe for the same thing?
The problem is that the recipe existed in the first place. It shouldn't.
Honey Cookies already exist, Sweet Berry cookies should be crafted using Sweet Berries, not with honey.

Sorry, I was in a hurry when I read this issue earlier and didn't read the details


Input tag helper ignores validation attributes defined in the most specific model class

Context
Please consider the following example that demonstrates the issue.
Example
Consider the following cshtml simplified View:
@model MvcSandbox.Models.Holder
        <form>
            <input asp-for="Name" />
        </form>

This view is strongly typed with the following Holder Model:
public class Holder
    {
        [Required]
        public virtual string Name { get; set; }
    }

The Holder Model as a subclass:
public class SubHolder : Holder
    {
        [MaxLength(200)]
        public override string Name { get; set; }
    }

The SubHolder class redefines the Name property and adds the [MaxLength] validation attribute.
In the Controller action that returns this view we supply an Instance of SubHolder:
return View(new SubHolder());
What Happens?
One of the responsibilities of the input tag helper is to render an input tag that has the correct html validation attribute applied, so one would expect to see the following input tag rendered for the Name property in the previous example:
<input data-val="true" data-val-maxlength="The field Name must be a string or array type with a maximum length of '200'." data-val-maxlength-max="200" data-val-required="The Name field is required." id="Name" name="Name" value="" type="text">
Unfortunately this is not the case and the [MaxLength] attribute is ignored we get something like this instead:
<input data-val="true" data-val-required="The Name field is required." id="Name" name="Name" value="" type="text">
Motivation
Ignoring validation attribute in specific classes makes the chtml view non reusable for sub classes of the class used to type the view, I understand that this case might be "edgy" but I think that taking into account attributes in the most specific class makes the template engine more polymorphic and avoids duplicating the view when subclasses only redefine properties in order to add new attributes.
Causes of this behavior
It seems that the cause of the behavior lies in the ExpressionMetadataProvider.FromLambdaExpression<TModel, TResult> method which returns a ModelExplorer object that contains the more abstract type of the model (the one specified in the view) to the input tag helper.
Proposal
Make the input tag helper recognize the most specific type.
P.S
For the record I already successfully made the necessary changes to ExpressionMetadataProvider.FromLambdaExpression<TModel, TResult> to realize the desired behavior (from the standpoint of the issue), I would like to get some feedback before sending a pull request.

@MissaouiChedy , the change you are proposing would cause incoherent behavior between client validation and server side validation performed during the Model Binding stage. In fact, when you post the form the model binder can no way understand you are posting  SubHolder fields, so it will attempt to create an Holder instance thus applying  Holder validation rules.
In general, the Mvc framework has no way to understand you want to deal with the more specific subclass of the View ViewModel. Moreover, dealing with View ViewModel subclasses would require rendering also the subclass extrafields, so in any case, the general solution of the problem is more complex of the way you are scketcing it here.
If we suppose that the action method where you post the page already knows wich subclass it will receive the general solution to your problem is something like:
`

@if(Model is SubHolder)
{
var Model = ViewData.Model as SubHolder;

......
}
else if (Model is ...)
.....
....
`
This way you declare explicitaly which subclasses to handle and how to handle them.
On the other side if the action method where you will post the page doesn't know which subclass it will receive, then you must put this information, somehow, in the View, and use a custom model binder.
Give a look to this subclass tag helper it solves exactly this problem in general. Full doc is here

@frankabbruzzese I did not foresee the incoherence between client-side and server-side validation thanks for pointing it out.
Actually the situation in which I initially needed this behavior is not properly depicted in the example I provided, so please bear with me :-)
Consider now that we have the following chtml file:
@model MvcSandbox.Models.Holder
     <div>
         <input asp-for="Name" />
     </div>

The previous view is used as a generic editor template for objects of the Holder class or its subclasses.
Assuming that:

Holder and its sub classes are always used as properties in other view models
Subclasses of Holder only override existing properties to add validation attribute

How can I introduce the proposed behavior without changing the framework?
Currently in my project I copy pasted the ModelExpressionProvider service and the ExpressionMetadataProvider static class, slightly changed their name by prefixing them with custom, introduced the needed behavior and then registered the CustomModelExpressionProvider under Startup.ConfigureServices. I don't think this solution is clean, is there a better way?

What have you done is the correct way to change a behavior. However, behavior should be changed coherently.  If the problem is just client validatio you dont need to change anything something like;
@if(Model is SubHolder)
{
var Model = ViewData.Model as SubHolder;
<input<EMAIL_ADDRESS>/>
......
}
else {
<input asp-for="Name" />
}
.....
....

should work.
However, the fact remains that the model binder is not able to understand which has been submitted.
So if the Action method where you post your page has a ViewModel like:
public class MyViewModel
{
    public SubHolder MySubProperty {get; set;}
}

everything should work properly. However, if the receiving ViewModel is:
public class MyRawViewModel
{
    public Holder MyProperty {get; set;}
}

the model binder wouldn table to create a SubHolder instance but would create simply an Holder instance. Your simple meta data provider can't change also the model binder behavior.

Understood, thank you for the support.


Add a license

Hi, I'm currently in the process of adding license info to all the games in Erwin's Arduboy repo so people can easily filter out proprietary games. Would you be willing to add an open source license to your project so I can tag it as an open source game in the repo?
Thanks!

Have just added the MIT license - tag away :)


Waylon/gitmodules

Closes #133

Portfolio should have the correct constructor args but i hit this invalid type when tokenizing the args. I am wondering if i need to figure out the right rust type to have them tokenized as an Address.


when i add onclick attribute, application crashes

hey guy, what's up?
i have problem, when i add android:onclick="..." attr in AutoResizeTextView and after the run it, when i click on the AutoResizeTextView ,application crashes and force close!
but when I change the AutoResizeTextView  to TextView, the problem is fixed
i think this is a bug and should be fix it to make better library

Please show it in code. Make a minimal project to demonstrate the issue.

ok, this is a simple example:
activity.xml :
`
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.mohasebegar.AutoResizeTextView
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    **android:onClick="clickReaction"**
    android:clickable="true"
    android:focusable="true"
    android:fontFamily="@font/work_sans_light"
    android:singleLine="true"
    android:text="00"
    android:textSize="80dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"/>

</android.support.constraint.ConstraintLayout>`
Activity.class
`public class demo extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.demo);
}

**public void clickReaction(View view) {

}**

}
`

Can't confirm any issue with clicking.
Attached sample project.
MyApplication.zip

your MyApplication not work when click on AutoResizeTextView, ok? you got it?
this is a bug and If you do not know how to fix it, fix it myself
No need for the project

@saeedm1 What is the bug exactly?
Clicking on it will cause the toast that I wrote to appear.
Put a full project and I could check it.

@saeedm1 Here. Attached a video showing that it works just fine.
device-2018-02-10-203015.zip

video.zip
project.zip
the project size is 30MB So I optimized it to 3mb

I can't open it. Please make a minimal working project, showing the issue.
To minimize size of the project, just delete the "build" folders.

Also, have you tried the project I've sent you, showing it works just fine?

And what's the exception exactly?

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mohasebegar, PID: 14383
java.lang.IllegalStateException: Could not find a method primaryMoneyReactionClick(View) in the activity class android.support.v7.widget.TintContextWrapper for onClick handler on view class com.lb.auto_fit_textview.AutoResizeTextView with id 'tvPrimaryMoney'

So there you go. You didn't set it correctly. Nothing related to my library. Would happen to you on a normal TextView too.
Do like I did in the project I've sent you, or just use fineViewById .
Meaning:
fineViewById(R.id....) . setOnClickListener(...)

ok,I don't have other way for solve this problem.
But I have another problem with style

I'm glad you've solved it.

but i have another problem:
to be able to use AutoResizeTextView, need to specify its boundaries, like this:

    <AutoResizeTextView
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:singleLine="true"
        android:text="0"
        background="#f27070"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

But these bounds are difficult themselves, because when set background color,all marked places are colored, but I just want to change the background color of the text
how can i solve this problem?

That's not related to my library.
It's related to TextView alone.
And for this you can find plenty of solutions on StackOverflow.
Example:
https://stackoverflow.com/questions/15582900/android-textview-text-background-color/15582926


blitz.web.api.sh: install poetry and install dependencies with it

the blitz.web.api.sh the script doesn't install the dependencies cause it's missing poetry`.
https://python-poetry.org/docs/#installation
and then poetry install in the /home/admin/blitz_api directory instead of the pip install

@fusion44 is poetry needed? With your latest fixes, the api runs without issues on a blitz.
If not, we can close this issue.

Poetry is only useful for development purposes. Everyone else should use a standard pip install. There was a problem because I had included a git dependency which, pip didn't like. Should be fixed now.

Thx for the clarification @fusion44
:)


MEN-1025 State scripts documentation.

Changelog: None
Signed-off-by: Marcin Pasinski<EMAIL_ADDRESS>

@kacf @drewmoseley @estenberg please review and check if we are missing anything.

@kacf @drewmoseley thanks for review. All should be fixed now.

@drewmoseley thanks for review. Should be fixed now.

Nice! Was this backported? I don't yet see it in 1.2 on docs.mender.io at least.

@estenberg it was merged here: https://github.com/mendersoftware/mender-docs/pull/206
I haven't personally run the deploy script lately.  Partly due to PTO and partly due to https://tracker.mender.io/browse/INF-491.


Support for Estimated Count (Faster Count)

Problem
Exact Count suffers from performance

Note that the larger the table the slower this query runs in the database. The server will respond with the selected range and total
Reference: https://postgrest.org/en/v7.0.0/api.html#exact-count

Suggested solution
Faster count using Estimated count.
Reference: https://postgrest.org/en/v7.0.0/api.html#estimated-count
There are some trade offs to consider. While using Estimated Count which is fast, it suffers from accuracy. The usage of these feature depends on every project. There should be small margin of mismatch to the actual count and estimated count.

@sandbox-apps I like this idea and I like how Postgrest implemented it. I wonder if the other databases support it.
For now you can use $queryRaw:
await prisma.$queryRaw`SELECT reltuples AS estimate FROM pg_class WHERE relname = ${table_name};`

Any way this could be done as an extension to replace the count of existing models


Webpack content pages and serve them from the lib directory

@Mossop you wanted to have a look at this.
Fixes https://github.com/mozilla/tofino/issues/555

Coverage increased (+0.1%) to 42.641% when pulling 1fe452dca5b59240c9c0802bd445f5d8457a67ad on victorporof:webpack-content-pages into 2aed5a4e87f6de526f397eaeb6602eb8748641ec on mozilla:master.


feat(definition): get scalar definition

This PR makes it possible to jump to the definition of a named scalar type.
How this would look like once integrated into VSCode for example:

nice work!


Navbar :First Iteration

Signed-off-by: Kamal Nayan<EMAIL_ADDRESS>Description
This is the navbar component
This PR fixes #52
Notes for Reviewers
Currently it looks like this

Signed commits

[x] Yes, I signed my commits.

This is under construction but any suggestions are welcome :)

🚀 Preview for commit 0d5163c2cca9e9a781f76dc1dba8da55a87a54fe at: https://62f253a5d3be3f3b83f4777f--service-mesh-patterns.netlify.app

🚀 Preview for commit ab24a3c7c86e5a50c29e65618b12be43ed94df94 at: https://62f2583f822c9e3ec0d1286c--service-mesh-patterns.netlify.app

🚀 Preview for commit 3b8465f27521438b12b8a53f80dd1072f5c82098 at: https://62f7b202c580452cd32f30b8--service-mesh-patterns.netlify.app

Updated ss

The navbar is not full-width.

width set to full

🚀 Preview for commit ec5d50e9e2d2d4b3d2781b06332bcbae81d52bf2 at: https://62fa223cfc1ab237dea08fc1--service-mesh-patterns.netlify.app

🚀 Preview for commit 328f0897c57a1fe939deb9165ba3e16099147016 at: https://6300a61444ba2e22e4d4fe19--service-mesh-patterns.netlify.app

The navbar is not full-width and not to the top of the page.

ok @Nikhil-Ladha I will look into and make changes by today :+1:

Now It is at the top with full width

🚀 Preview for commit 06246212defd10d0639319b298e07e44583f0ba9 at: https://6309e4c3bb46d553a86e264b--service-mesh-patterns.netlify.app

Yes @debo19 addition of a hamberger for it remains, I will add it soon

🚀 Preview for commit e3af6319ade3d619ea924c102c259f10f0cfff85 at: https://6316309f9c4ac3741872c662--service-mesh-patterns.netlify.app

Now a Hamberger icon also appears at < 760px screen.

@debo19 I have dropped in a hamberger menu too + modified the links considering they will be used to navigate around the page as per different sections ,
lets get this merged first and then we can tackle a little here and there responsiveness issues . :smiley:

🚀 Preview for commit 7cafc017df21bf39b50ff94541964cc53feaa568 at: https://631657e64f16cf2b280a11d6--service-mesh-patterns.netlify.app

🚀 Preview for commit 79ca0fbbbd5c10bf65af7906657505b2f8d83b75 at: https://6316b3ea4f16cf68850a12ff--service-mesh-patterns.netlify.app

A few changes still needed before I would consider merging this:

The nav item's color need to be reversed, i.e, by default they should be keppel green and on hovering the Caribbean grean (current color).
Move the two ends closer to each other, similar to the navbar structure of layer5.io site.
Please fix that button's default styling. Add a Button component, copy paste (some modification might be needed, do that) from layer5.io repo and use that.
The navbar is not responsive from 1180px to 768px.
The dropdown menu is not working as expected in mobile view. Which makes me think did you even build the site locally before pushing the changes?
No need to use the styled-components for each element, we can simply apply styles to the element's directly. Revert that.

Ok @Nikhil-Ladha accepted will do the necc by today 🙂

responsiveness fixed , just minor tweaks left

🚀 Preview for commit 0ff12ca81c60c98b4a08dbe7d6cef4466d201015 at: https://631b9a735fa5951b0bff8e30--service-mesh-patterns.netlify.app

🚀 Preview for commit dea57c1eb21105b49ff03cf5d5103bd5b13ff3b9 at: https://631cc469d1b60469639d7769--service-mesh-patterns.netlify.app

🚀 Preview for commit 22dd8a4dd5c6cd00dced9fd77fa8f6450f282bad at: https://631e3ee6f19e9b6df8e0b295--service-mesh-patterns.netlify.app

🚀 Preview for commit f2555541db957205fb8086dc674199edb2ee7414 at: https://631e461fbb7dd76aac026137--service-mesh-patterns.netlify.app

There is a gap between the navbar drawer and the navbar in the mobile view.

@Nikhil-Ladha fix was made, what else needs modification in navbar?

Also, the build seems to be failing

No need to break up a simple navbar code into multiple files. Please merge them all into one component as earlier.

ok

🚀 Preview for commit 86a91c03a95a3964dccb72225e39f85f60bf8edb at: https://63242f402139ab7fc08d382e--service-mesh-patterns.netlify.app

🚀 Preview for commit e4c44961d45212130a8d101bac7e8900c7f4f425 at: https://63249deac2a8216ca1629a96--service-mesh-patterns.netlify.app

🚀 Preview for commit 01c89a292bd1d962743dbd25fb3a928e282e3987 at: https://6327d91c3cd2e037006de810--service-mesh-patterns.netlify.app

🚀 Preview for commit 0ba1104348bb8bf2a8a5505d42f35fb9cec83b00 at: https://632833b5095227007927be60--service-mesh-patterns.netlify.app

🚀 Preview for commit 41bf6f5719c026fcab886b60e93c8874e3876175 at: https://632da222800fd4033dddcb11--service-mesh-patterns.netlify.app

// @Nikhil-Ladha all suggestions have been implemented , anything else needed ? :)


create tag from tag selector

closes #3630
blocked by #3628

Assigned @ncresswell for the functional review.
We'll review the code once #3628 is merged.

@chiptus this one needs a rebase on the updated version of #3628 I think

@ncresswell done rebase, please check again

@ncresswell you'll need to wait for the CI to rebuild the image.

@chiptus I wonder if this could be because the tag is interpreted as HTML ? If that's the case, we have to be wary of potential XSS injections.

yes, this is because of the HTML like syntax. in the directive they use "ng-bind-html" and that's why we don't see these (it's passing sanitize). I tried adding a tag , a tag was created and no alert was thrown, I guess because the browser interprets it as a string and not as HTML. So I don't think XSS is trouble, we can escape the brackets just to be sure.
It might cause a problem because we would need to use ng-bind-html in the display of the selected tag (and for backward compatibility, it will break these cases). The question is, do we really use these special cases? If we do, they didn't appear in the search result, as the problem is not with the line I added, it's with the ui-typeahead directive.
try this:

use portainer 1.23
create a tag ""
go into an endpoint and try to search for this tag. it should be an empty line (if you hover over the results, it will be a very small line

type <
now the result will be visible (behind the scenes: the HTML is now <chaim> so it's not an HTML tag now

@deviantony @ncresswell what about the special char issue? did you read my comment?

As this one is going to be merged into develop, I'll ask @xAt0mZ for a review.

Assuming LGTM from @xAt0mZ

@deviantony wasn't good, the bold part is not what is expected
currently
catch (err) {
throw { msg: 'Unable to create tag', err }
}
I wanted
catch (error) {
throw { msg: 'Unable to create tag', err: error }
}
so we could keep the context error in err key of the throwed error ...
Notification will always show Unable to create tag without beeing able to show a more detailed reason of the failure ...

Not sure what is the difference
On Wed, 8 Apr 2020, 15:29 xAt0mZ<EMAIL_ADDRESS>wrote:

@deviantony https://github.com/deviantony wasn't good, the bold part is
not what is expected
currently
catch (err) {
throw { msg: 'Unable to create tag', err }
}
I wanted
catch (error) {
throw { msg: 'Unable to create tag', err: error }
}
so we could keep the context error in err key of the throwed error ...
Notification will always show Unable to create tag without beeing able to
show a more detailed reason of the failure ...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/portainer/portainer/pull/3640#issuecomment-610929637,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKRKF6UQVXYON7XETU2GYTRLRUZXANCNFSM4LSF3PAQ
.

One is saving the caught error object in the err field, the other one is deconstructing the caught error object into the new throwed one and overriding the msg field
If caught error is
{
  msg: 'Internal server error`,
  code: 500,
  randomKey: 'Random string value'
}

We want
{
  msg: 'Unable to create tag',
  err: {
    msg: 'Internal server error`,
    code: 500,
    randomKey: 'Random string value'
  }
}

and not
{
  msg: 'Unable to create tag',
  code: 500,
  randomKey: 'Random string value'
}

With this pattern we can keep the original caught error, and NotificationService will try to find the appropriate description message field in err, with a fallback on msg if it's not able to find it.
This service is able to handle a lot of error formats throwed by the different APIs we are reaching on the project.
https://github.com/portainer/portainer/blob/develop/app/portainer/services/notifications.js#L16

@xAt0mZ ah sorry was merged too quickly.
@chiptus please open a PR to add the fix for this.


Vowel prototype files -> dataset repositories

Each dataset repository (hosted at CS) should have a vowel prototype CSV among the files in the "enrichment" subdirectory. These are the files like
ICECAN_prototypes.csv
that's currently in
SPADE/ICECAN/ dir of this (Github) repository. Etc.
so these need to be checked in to CS repos, and a note for yourself added that this file is needed for any new corpus.

This is done, but apparently you need to be a collaborator on a repo to close an issue through the web interface without a commit. Could you close it or make me a collaborator, please?


Fix example target URL in recording docs

Remove the trailing slash from the suggested example target URL because it causes java.lang.IllegalArgumentException: URI path begins with multiple slashes when the curl request is made later in the example.
curl http://localhost:8080/recordables/123

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 java.lang.IllegalArgumentException: URI path begins with multiple slashes</title>

HTTP ERROR 500 java.lang.IllegalArgumentException: URI path begins with multiple slashes

URI:	/recordables/123

STATUS:	500

MESSAGE:	java.lang.IllegalArgumentException: URI path begins with multiple slashes

SERVLET:	com.github.tomakehurst.wiremock.servlet.WireMockHandlerDispatchingServlet-58594a11

CAUSED BY:	java.lang.IllegalArgumentException: URI path begins with multiple slashes

Removing the trailing slash in the suggested target URL fixes the example.
References

TODO

Submitter checklist

[ ] The PR request is well described and justified, including the body and the references
[ ] The PR title represents the desired changelog entry
[ ] If the change against WireMock 2 functionality (incompatible with WireMock 3),
it is submitted against the 2.x branch
[ ] The repository's code style is followed (see the contributing guide)

Details: Contributor Guide

Thanks a lot!


Interactive authentication

I really don't feel comfortable putting my password in as a command line argument (i.e. xfreerdp /p:hunter2 ...) where it can be inadvertently stored in plaintext in my shell history. Please consider adding an interactive prompt for the password, much like in SSH.

Never mind - this post suggests that this is already implemented and that I need to put the /p at the end to use it, like:
$ xfreerdp /v:farm.company.com /d:company.com /u:oshiro /g:rds.company.com /p

That said, this wasn't at all mentioned in man xfreerdp. It may be worth adding this there to avoid this kind of stupid question.


Auto discovery for clusters with no "local" nodes

For some reason** my main cluster in system.clusters has no node with is_local = 1.
For example:
select host_address, is_local, default_database from system.clusters where cluster = 'ch_cluster'
┌─host_address─┬─is_local─┬─default_database─┐
│ <IP_ADDRESS>  │        0 │ stats_0          │
│ <IP_ADDRESS>  │        0 │ stats_1          │
│ <IP_ADDRESS>  │        0 │ stats_0          │
│ <IP_ADDRESS>   │        0 │ stats_1          │
│ <IP_ADDRESS>   │        0 │ stats_0          │
│ <IP_ADDRESS>  │        0 │ stats_1          │
└──────────────┴──────────┴──────────────────┘

Building a ClickHouseCluster via AUTO_DISCOVERY does not work, because in the discovery routine in ClickHouseNodes.queryClusterNodes()
https://github.com/ClickHouse/clickhouse-java/blob/c676f8c363ece6cee04fbbfbe3dbd7d0ea0842e0/clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNodes.java#L427-L432
the first query is done with clause is_local = 1:
https://github.com/ClickHouse/clickhouse-java/blob/c676f8c363ece6cee04fbbfbe3dbd7d0ea0842e0/clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseLoadBalancingPolicy.java#L110-L113
Then, only if some rows are returned, proceed is set to true and the other non-local nodes are queried.
This makes it impossible for me at the moment to exploit the auto discovery feature.
Why is the discovery made it this way?

** The current reason is that I specified a default_database in the cluster definition in config.xml, and ClickHouse never sets is_local = 1 when the default_database is set. The rationale for this is not clear to me at the moment:
https://github.com/ClickHouse/ClickHouse/blob/2cfeff45ba2dbc4cbd9be9428251b932c7e6a9cf/src/Interpreters/Cluster.cpp#L40-L53
I confirmed that default_database is causing this, because with another cluster without default_database the is_local is correctly set to 1.
I'm using default_database to implement circular replication.

This is embarrassing - looking at the code for a while and I cannot remember why it's there :< If it's not required, I'll remove that so that you don't have to write a custom policy.

I think I will need to work around this for urgency, anyway it would be nice if it got fixed

Sorry for the inconvenience. As a workaround, you may specify a few more nodes in connection string. Will try to make the discovering query customizable(via a new option), and perhaps reading hosts from a centralized configuration file.


"ValueError: The device has no langid" after installing Facedancer on Windows

I recently received my Cynthion device, and have been working through the "Getting Started" guide ( https://cynthion.readthedocs.io/en/latest/getting_started.html ).  Everything was successful through the "Using Cynthion with Packetry" step, but the "Using Cynthion with Facedancer" ( https://cynthion.readthedocs.io/en/latest/getting_started_facedancer.html ) seems to break Cynthion functionality for me.
Everything appears to be successful until the "cynthion info" step, which returns:
C:\Users\DogP>cynthion info
Cynthion version: 0.1.3
Apollo version: 1.1.0
Python version: 3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]

Found Apollo stub interface!
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\DogP\AppData\Roaming\Python\Python311\Scripts\cynthion.exe\__main__.py", line 7, in <module>
  File "C:\Users\DogP\AppData\Roaming\Python\Python311\site-packages\cynthion\commands\cli.py", line 91, in main
    args.func(args)
  File "C:\Users\DogP\AppData\Roaming\Python\Python311\site-packages\cynthion\commands\cynthion_info.py", line 19, in cynthion_info
    if ApolloDebugger.print_info(force_offline=args.force_offline, out=logging.info,
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\DogP\AppData\Roaming\Python\Python311\site-packages\apollo_fpga\__init__.py", line 436, in print_info
    out(f"\tBitstream: {device.product} ({device.manufacturer})")
                        ^^^^^^^^^^^^^^
  File "C:\Users\DogP\AppData\Roaming\Python\Python311\site-packages\usb\core.py", line 875, in product
    self._product = util.get_string(self, self.iProduct)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\DogP\AppData\Roaming\Python\Python311\site-packages\usb\util.py", line 313, in get_string
    raise ValueError("The device has no langid"
ValueError: The device has no langid (permission issue, no string descriptors supported or device error)

And the Facedancer demos fail as well.
If I click the program button, running "cynthion info" is successful again (with only LED A lit).  But I'm no longer able to run analyzer on the PC.  If I run "cynthion run analyzer", LEDs A-D light, and running "cynthion info" outputs the same langid error.  And Packetry now complains "The device is not usable because: Failed to claim interface".
I initially tested on a Windows 10 laptop and got the exact same error.  To make sure the device didn't get flashed a bad image or something, I ran through the process again on a Windows 11 desktop, which again worked great until the Facedancer step.  So it seems to be a reproducible software issue (or I'm consistently doing something wrong).
Lastly, I tried "pip uninstall facedancer" and "pip uninstall cynthion", then starting over from the beginning, but get the langid error from the start.
Any help or ideas?

Did you try to use Facedancer and Packetry at the same time, i.e. run Packetry  with analyzer gateware and then keep Packetry open while doing the cynthion info command?
I learned that the WinUSB driver allows only bound access to a single process per device. That means if Packetry claimed the analyzer device, running cynthion info (which is a new process) will get permission problems accessing the analyzer device to grab some infos like the language id. The device had been claimed by Packetry process so that process must release the WinUSB driver first before other tools like Cynthion CLI can access it.
You should make sure that only a single process is accessing the device so either Cynthion CLI or Packetry but not both at the same time.

We need to update the documentation to say this, but Facedancer only works on Linux and macOS at this time.

Did you try to use Facedancer and Packetry at the same time, i.e. run Packetry with analyzer gateware and then keep Packetry open while doing the cynthion info command?
Packetry was closed before trying Facedancer, unless there's a background process keeping something open.

We need to update the documentation to say this, but Facedancer only works on Linux and macOS at this time.
Ah... that makes sense then!  Would you expect that to break the analyzer functionality on Windows, and are the instructions on completely removing/reinstalling?  I used pip install to install Facedancer but pip uninstall didn't fix it.

Thanks!

It looks like I was able to resolve this by plugging the Cynthion device into the computer, opening Device Manager and manually clicking "Uninstall device" for both "USB Analyzer" devices under "Universal Serial Bus devices"... then right-clicking and selecting Scan for hardware changes to reinstall.  This seems to have brought back the original functionality I had before running Facedancer.
BTW, since I had done this on two different computers, I took before/after screenshots of the 2nd one, and didn't notice any obvious differences between what was installed and what got reinstalled (same driver/version, VID/PID, etc), but presumably there was some minor difference, something cached, etc.
And thanks again for clarification on Facedancer... I'll try it on my Ubuntu laptop.

I actually encountered this issue yesterday while trying to test some things, and I was able to resolve it similarly. I wasn't 100% sure at the time that I hadn't done something else wrong to cause the problem, but it matched your experience closely.
These steps worked for me to get the analyzer gateware working again:

Press PROGRAM
cynthion info for confirmation
cynthion flash analyzer
Open Device Manager and find pair of USB devices called "USB Analyzer" or "WinUSB Device"
Right-click and "Uninstall" both devices
Unplug Cynthion
Plug in Cynthion
cynthion info for confirmation


6502 JMP indirect incorrectly disassembled

Describe the bug
The way Ghidra represents an indirect JMP is misleading. An indirect JMP (0x6c) is where the CPU reads the contents of a memory location and then sets PC to that address. This is opposed to an absolute JMP (0x4c) which just jumps to the passed address.
This is often used to make look up tables which are often dynamic.
Ghidra tries to be clever and reads the memory location and puts in a link to the result; which causes it to be inconsistent.
For example (in the below, CLIV is set to 0x0208),
                            OSCLI
            fff7 6c 08 02        JMP        CLIV

Is an indirect JMP, which should be disassembled as JMP (CLIV); but is disassembled as a JMP to 0x0208 when it should be the address at 0x0208.
But this is inconsistent as it can sometimes return a variable to the actual destination:
                             OSBYTE                                          XREF[5]:     FUN_0fc2:0fcd(c),

            fff4 6c 0a 02        JMP        offset FUN_e772

I can't work out a pattern of when it sets the destination to the indirect value or the absolute value.
This method makes it looks exactly the same as an absolute JMP:
            2292 4c 33 23        JMP        LAB_2333

This could cause misinterpretations in program flows and; if the program is using this for dynamic tables then will cause it to be wrong in many circumstances.
To Reproduce
Create binary file with at least:
4c 0a 02
6c 0a 02
Where 0x020a has a value.
Expected behavior
I'd expect an indirect JMP to disassemble using the indirect mode and an absolute JMP to use the absolute mode:
4c 0a 02        JMP        0x020a                          Absolute
6c 0a 02        JMP        (0x020a)                        Indirect

This is a formatting issue with the indirect jumps lacking the parentheses around the operand to represent the indirection. The actual behavior of the indirect jump instruction is correct, in that ghidra is correctly jumping to the address located at the memory location.

As I said above, it sometimes does this, and sometimes it doesn't and leaves a pointer to the indirect address. I can't work out how it decides what to do.
IMO It should always use a pointer to the indirect address (e.g. to 0x0208, not to the contents of 0x0208) as this instruction is often used to make dynamic jump tables, which means that if you place the label at the contents of the memory location then it will only be correct for the value of the memory at disassembly time and will not reflect other changes.
If this was pointing to the address, then the reverse engineer can see this and makes notes accordingly. If this is pointing to the contents of the address, then the reverse engineer may incorrectly assume that it's always that value and waste time.

Any ETA for what should be a simple fix? I've just wasted 2 hours wondering what code was doing, before I realised that this bug still hasn't been fix.

Apologies for not getting this into the baseline sooner.
There two things going on here.  The missing parens, and the computed address that hides the read address.
This has to do with trusting things in memory, which have a constant value, which there are ways of marking memory as constant, or volatile so that the memory will not be trusted.  Blocks of memory can also have this set R readonly or RW.
I do agree with you we should be displaying it differently.  I believe I'd rather see it this way:
JUMP (0x020A)=>LAB_0233
This would be an indication that there was a read, and that a value was loaded from memory and a reference to that location created.  Currently the primary reference the JUMP reference is displayed, and the secondary read is hidden and indicated by and "__" under the operand, so there is some indication this is occuring.
We may be able to get the syntax in soon but I hesitate changing the markup as a new release is imminent.


Chapter 02

I would suggest updating Exercise 4 in Chapter to reflect the solution for the most recent k8s version.
Issuing Service Account Token
Service Account Tokens no longer get generated automatically and should use the TokenRequest API
➜  RBAC git:(main) ✗ kubectl describe serviceaccount api-access -n apps
Name:                api-access
Namespace:           apps
Labels:              <none>
Annotations:         <none>
Image pull secrets:  <none>
Mountable secrets:   <none>
Tokens:              <none>
Events:              <none>

You are correct. The default behavior has been change in the meantime. The book was written based on Kubernetes 1.23, as indicated on page 1. I assume you are referencing the content on page 18, "Rendering ServiceAccount Details" here?
Unfortunately, I can't easily change a printed book. We'd have to release a second edition. The better place to raise those issues is using the errata. The GitHub repository just contains the code snippets used in the book. Would you mind raising an issue there? I will take it into account for the next edition.

Recognizing that we can't overhaul the whole book in here, is there a spot where we could discuss alternate solutions to the Service Account Token questions? I've found alternate solutions to generate the new token, and have declarative YAML to assign it to the service account, but haven't been able to do it successfully with imperative CLI commands. Would be happy to be able to join a conversation about alternate approaches for those steps and benefit from everyone's wisdom if there were a better place to do so.

My CKS book has been using a newer Kubernetes version that covers the latest changes to ServiceAccounts. Of course, this also has the potential for being changed in Kubernetes.
For general discussions about Kubernetes, I can suggest the Kubernetes Slack channel. There's no book discussion forum at this time, but I'd be happy to discuss things here as part of GitHub issues.

Thank you! I've filed a ticket in errata and I hope the feedback helps.

Thanks, it does.

Did you already submit the errata at https://www.oreilly.com/catalog/errata.csp?isbn=0636920548300? I do not see it in the system.


Add minified build configuration

Implements #1.
Notes:

Adds Lodash as a development dependency.
Adds a yarn.lock file for Yarn users.

/cc @jameshfisher


SLC / MVP requirements

Ability to deploy an app (like Wordpress) and its dependencies (resp. dependent services, like MySQL) honoring Dev/Prod parity

can deploy an app like wordpress (see #144)
can deploy and bind to service in public cloud (see #157, #160; using crossplane)
can deploy and bind to service in local cluster (tba; using minibroker)
TLS enabled (#62, #63, #130)
most bugs fixed

done


Docs: Swagger

Status
Type
Env Vars Change

:white_check_mark: Ready
Docs
No

Description
This PR adds the swagger documentation for

[x] import/export paths
[x] invite code paths

Motivation and Context

Screenshots / GIFs (if appropriate):

Checklist

[x] I have read the CONTRIBUTING document.
[x] I have considered the accessibility of my changes (i.e. did I add proper content descriptions to images, or run my changes with talkback enabled?)
[x] I have documented my code if needed

Resolves

shouldnt we move import/export package to the package tag and import/export group to the group tag?


San Diego 2024

Set for Sept 14.
Test event created

Event live

Reg link incorrect, updating from email

Event complete


[FEATURE] - Support jest-cucumber

Testdeck Version
latest
Description
Add an extra package for bencompton/jest-cucumber as a companion to testdeck, its very worth it.
Workaround
Apply the "decorators" in constructor call like your usual test, or not using testdeck at all by separating BDD tests and (testdeck native) TDD tests
Conceptual code
import { suite, given, when, then, and, but } from '@testdeck/jest-cucumber'
import { expect } from '@testdeck/jest'

var DB;

class BankAccount {
  constructor(private readonly iban: UUID) {}

  private get record(): Promise<DB.bank.account.Record> {
    return DB.bank.account.load(this.iban);
  }

  public async getBalance(): Promise<number> {
    return (await this.record)?.balance;
  }

  public async setBalance(amount: number): Promise<void> {
    const record = await this.record;
    record?.balance = amount;
    await record.save();
  }

  public async withdraw(amount: number): Promise<void> {
    if (amount <= 0) {
      throw new Error("invalid amount");
    }
    // or contract.ensure(amount > 0, "invalid amount")

    const balance = await this.getBalance();
    if (balance <= 0 || (balance - amount) < 0) {
      throw new Error('insufficient balance');
    }

    return this.setBalance(balance - amount);
  }

  public async deposit(credit: number): Promise<void> {
    if (credit <= 0) {
      throw new Error("invalid credit");
    }

    return this.setBalance((await this.getBalance()) + credit);
  }

  public static async transfer(from: BankAccount, to: BankAccount, balance: number): Promise<void> {
    if (balance <= 0) {
      throw new Error("invalid balance");
    }
    const transaction = await DB.transaction();
    try {
      await from.withdrawl(balance);
      await to.deposit(balance);
      await (await DB.bank.transaction.push({ from, to, credit: balance })).save();
      await transaction.commit();
    } catch (err) {
      await transaction.rollback();
      throw err;
    }
  }
}

@suite({
  feature: "specs/banking-scenario.feature"
  // if test argument is not supplied, assume this is a test base
})
abstract class BankAccountTestBase {
  protected bankAccount: BankAccount;

  async before() {
    await DB.setupMock();
    this.bankAccount = await DB.bank.account.create();
  }
}

@suite("Adding the right amount of money")
/* or
@suite({
  feature: "specs/banking-scenario.feature",
  test: "Adding the right amount of money",
}) or
@suite("specs/banking-scenario.feature", {
  test: "Adding the right amount of money"
}) or
@suite("specs/banking-scenario.feature", "Adding the right amount of money")
*/
class BankAccountAddTest extends BankAccountTestBase {
  @given
  async "I initially had no money in the bank account"() {
    await this.bankAccount.setBalance(0);
  }

  // automatic compilation to regex, and also automatic parsing to parameter type for captures (maybe use reflect-metadata)
  @when
  async "I deposited some money $(\\d+) in the bank account"(amount: number) {
    await this.bankAccount.deposit(amount);
  }

  @then
  async "My bank account now have $(\\d+)"(amount: number) {
    expect(await this.bankAccount.getBalance()).toBe(amount);
  }
}

@suite("Deduct the right amount of money")
class BankAccountDeductTest extends BankAccountTestBase {
  @given
  async "I initially had some money $(\\d+) in the bank account"(
    amount: number
  ) {
    await this.bankAccount.setBalance(amount);
  }
  @when
  async "I withdrawn some money $(\\d+) in the bank account"(amount: number) {
    await this.bankAccount.withdraw(amount);
  }

  @then
  async "My bank account now have \\$(\\d+)"(amount: number) {
    expect(await this.bankAccount.getBalance()).toBe(amount);
  }
}

@suite("Don't deduct the money if not enough")
class BankAccountDeductFailureTest extends BankAccountTestBase {
  @given
  async "I initially had no money in the bank account"() {
    await this.bankAccount.setBalance(0);
  }

  @but("My bank rejected the request")
  @when
  async "I tried to withdraw some money $(\\d+) in the bank account"(
    amount: number
  ) {
    expect(() => this.bankAccount.withdraw(amount)).toThrow(Error);
  }
  /* or
  @when("I tried to withdraw some money $(\\d+) in the bank account")
  @but async "My bank rejected the request"(
    amount: number
  )
  */
}

@suite({
  feature: "specs/banking-scenario.feature",
  test: "Transfer from the right account to a right account",
})
class BankAccountTransferTest {
  private alice: BankAccount;
  private bob: BankAccount;

  async before() {
    await DB.setupMock();
    this.alice = await DB.bank.account.create();
    this.bob = await DB.bank.account.create();
  }

  @given
  async "Alice had $100 in the bank account"() {
    await this.alice.setBalance(100);
  }

  @given
  async "Bob had no money in the bank account"() {
    await this.bob.setBalance(0);
  }

  @when
  async "Alice transferred $40 to Bob"() {
    await BankAccount.transfer(this.alice, this.bob, 40);
  }

  @then
  async "Alice now have $60 left"() {
    expect(await this.alice.getBalance()).toBe(60);
  }

  // or still use @then
  @and
  async "Bob now have $40"() {
    expect(await this.bob.getBalance()).toBe(40);
  }

  @and
  async "There exists a transaction record from alice to bob"() {
    const record = await DB.bank.transaction.findLast({
      from: this.alice,
      to: this.bob,
    });
    expect(record).toExist();
    expect(record!.amount).toBe(40);
  }
}

Nice idea, however, this leaves you with one set of given/when/then.
What about just using jest-cucumber (with the appropriate typings) and then have it like so
@suite
class BankAccountTests {

  @test
  someTest() {
     given("Alice had $100 in the bank account", () -> alice.setBalance(100))
     .when("Alice transferred $40 to Bob", () -> BankAccount.transfer(alice, bob, 40))
     ...
  }
}

That way, you can have multiple tests in the suite and still be able to use the BDD approach from inside your tests.
However, and looking at the jest-cucumber code, this is a bit more involved as one needs to define features using defineFeature and also binding it to a given feature spec that has been loaded before that the feature gets defined.
And this iwll then pass the jest test function to a given scenario definition function, which will then wrap the various scenario step definitions in a single test declaration.
So this is not the way that testdeck works.
@suite        // define("...", () => {
class Suite {

    @test     //     it("...", () => {
    someTest() { // this.someTest();
    } // });
}
// });

whereas jest-cucumber does something like this
defineFeature("", (test) => {  // define(..., () => {
   test("...", {given, when, then} => {
   });
}) // });

So extending the existing @suite will not work since defineFeature does something in the background that is required for jest-cucumber to work properly.
As soon as I find more time, I will have a more indepth look at it. ATM I am preparing for my exams and I do not have the time to investigate this any further.

this will require a major reimplementation of how testdeck works, atm this is just a bunch of decorators that will run standard mocha based suites and tests.

@stevefan1999-personal have you had any luck with that or did you move to plain jest/cucumber instead? Please give us some feedback, mate, so that we can evolve the software.

@silkentrance Sorry to not responding after half a year. There's so many things happened as I've moved forward from frontend to backend, but I think your approach of just using jest-cucumber in each test unit will be a pretty good balance between UX and DX. But I have no idea about how to make testdeck compatible with defineFeature


FEATURE: 建议集成electron支持

Version
Vben Admin V5
Description
集成对electron桌面端的支持
Proposed Solution
集成对electron桌面端的支持
Alternatives Considered
No response
Additional Context
No response
Validations

[X] Read the docs
[X] Ensure the code is up to date. (Some issues have been fixed in the latest version)
[X] I have searched the existing issues and checked that my issue does not duplicate any existing issues.

强烈支持

强烈支持


[Feature] Add Contact us Section

Add Contact us Section of the Website. UI Design
To - do's:-

Make a New Contact.jsx file in Components folder
Use Barrel export
Import it in App.jsx
Use TailWindCSS

For using any other package or technique contact us over our Discord.

Assign

Please close this issue


Unit tests: Make monitor work in subshells

This is done by storing key/values in a temporary file instead
of shell variables.
This allows thorough testing of command sequences, especially
tests like create2.sh profit from this.
Requires sysutils/flock when running on FreeBSD.

Thanks for this, it's a great improvement.
The test execution time is about 3x, but it doesn't really matter, it's still very acceptable.
I would add a line in the Changelog about the potential new dependency (flock) to run tests

@pizzamig Added the changelog entry and managed to reduce test time by over 50% (which means it's only about 50% slower than the original tests).


Fuel running in a worker thread?

  Hi,
        I come from the 'Retrofit' world and I am used to Rx, i.e. using 'observeOn()' and 'subscribeOn()' to avoid doing too much work in the Main Thread. I know Fuel is compatible with Rx, but my question is: does Fuel run in a worker thread by default?! Or, as I think, it run asynchronously in the Main Thread unless you use the Rx compatible feature?!
        Thanks and regards,

I think I leave the thread usage to be the responsibility of the client so that you can just use observeOn and subscribeOn in any threads you desire? Is this working as expected or not?

Hey! Thanks for your response.
The behavior is the expected when using the Rx feature. I was simply wondering what is the standard approach that Fuel uses; I mean whether it swaps thread for the query or it simply sticks to the main thread. Thanks!

Ah, in Fuel default implementation, it runs on the worker threads by default so you don't have to worry about it. In Android implementation, Fuel also calls the callback in the mainThread environment for you automatically.

I think this issue can be closed :)


Update failure

/kind bug
I have tried to update my odo version using the recommended curl command on odo version command and it failed with the below messages.
Output of odo version:
❯ ❯ odo version
odo v1.0.0-beta5 (4d1d5071)

Server: https://api.rh-us-east-1.openshift.com:443
OpenShift: v3.11.154
Kubernetes: v1.11.0+d4cacc0
---
A newer version of odo (version: v1.1.2) is available.
Update using your package manager, or run
curl https://raw.githubusercontent.com/openshift/odo/master/scripts/installer.sh | sh
to update manually, or visit https://github.com/openshift/odo/releases
---
If you wish to disable the update notifications, you can disable it by running
'odo preference set UpdateNotification false'

❯ curl https://raw.githubusercontent.com/openshift/odo/master/scripts/installer.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9213  100  9213    0     0  33501      0 --:--:-- --:--:-- --:--:-- 33501
# Detecting distribution...
# Detected platform: darwin-amd64
echo_stderr #
odo version "odo v1.0.0-beta5 (4d1d5071)" is already installed on your system. Running this installer script might cause issues with your current installation. If you want to install odo using this script, please remove the current installation of odo from you system.
Aborting now!

/remove-area component

The installer script needs an overall. I think we are already looking at breaking off into a sort of upstream/downstream so the install scripts are going to need an overhaul. cc @kadel
For now, i think the goal should be the script should detect if os is windows/mac/os (if memory serves bash is available on all of these os's) and the automatically curl download appropriate binary.
Long term though, assuming we break off, we should install from rpm for rpm based os's and do a curl download for rest. For downstream os'es we should instead ask use to subscribe to appropriate channels
If script fails, it will give link to binary
wdyt @girishramnani

For release engineering, always go with long term solutions.

Please plan for long term, what ever the solution might be

Long term will need decision on if we want to breakout upstream/downstream. Of course we will  still build internally, it the upload to github/internal delivery mechanisms and signing that will change. This is to avoid divergence as much as possible

One option we also have is dropping the script altogether and let our documentation handle it

One option we also have is dropping the script altogether and let our documentation handle it

I would be fine with that.

@gorkem considering its a simple matter of downloading binary and placing it in your path, it does not make sense to keep this script anymore. You can refer https://github.com/openshift/odo/releases and https://odo.dev/docs/installing-odo/.

That is fine as long as you are not printing a message that references a non-working script

That is happening in older version of odo. The newer versions do not point to the script


Support org-mode format

Org-mode is a quite popular format. Github supports it. Would it be possible to build support for it in the app? That'd be awesome!

Hey @agzam,
that's a cool idea but I think it's a bit out of scope for vmd. GitHub supports a number of "markup" formats: Markdown, Textile, RDoc, Org mode, Creole, MediaWiki, reStructuredText, AsciiDoc, and Perl Pod.
If we added Org mode it would make sense to also support all the others. But supporting multiple different markups would require significant architectural changes in the code. And making all of them look like they do on GitHub would require additional CSS work and a lot of testing and attention to detail.
It'd be fairly simple if we could use github/markup but that would make Ruby a dependency of vmd and users would have to make sure that they have installed a compatible version of it before installing vmd. I would prefer it if all of vmd's dependencies could be resolved through npm.

" I would prefer it if all of vmd's dependencies could be resolved through npm"

👍


[AutoNHITS,AutoRNN,AutoLSTM,AutoMLP,AutoDilatedRNN]  ValueError: invalid literal for int() with base 10: '216 (1)'

What happened + What you expected to happen
While doing hyperparameter selection with AutoNHITS,AutoRNN,AutoLSTM,AutoMLP,AutoDilatedRNN , I expect the process to finish.
For some point after it starts and does it, eventually this error appears for each model.
ValueError                                Traceback (most recent call last)
 in <cell line: 20>()
18 models=models2,
19 freq='b')
---> 20 nf.fit(df=Y_train_df)
12 frames
/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loggers/tensorboard.py in _get_next_version(self)
244             if is_dir(self.fs, d) and bn.startswith("version"):
245                 dir_ver = bn.split("")[1].replace("/", "")
--> 246                 existing_versions.append(int(dir_ver))
247         if len(existing_versions) == 0:
248             return 0
ValueError: invalid literal for int() with base 10: '216 (1)'
Versions / Dependencies
Python 3.10.12, neuralforecast 1.6.4, on google colab
Reproduction script
from neuralforecast.tsdataset import TimeSeriesDataset
from neuralforecast.utils import AirPassengers, AirPassengersPanel, AirPassengersStatic
import pandas as pd
from neuralforecast import NeuralForecast
from ray import tune
from neuralforecast.auto import AutoNHITS,AutoRNN,AutoLSTM,AutoMLP,AutoDilatedRNN
from neuralforecast.losses.pytorch import MAE
#AirPassengersPanel['y'] = AirPassengersPanel['y'] + 10
Y_train_df = AirPassengersPanel[AirPassengersPanel.ds<AirPassengersPanel['ds'].values[-12]] # 132 train
Y_test_df = AirPassengersPanel[AirPassengersPanel.ds>=AirPassengersPanel['ds'].values[-12]].reset_index(drop=True) # 12 test
models2= [AutoLSTM(h=15,
loss=MAE(),
config=None,
num_samples=2,gpus=1 )]
nf= NeuralForecast(
models=models2,
freq='b')
nf.fit(df=Y_train_df)
models2= [AutoRNN(h=15,
loss=MAE(),
config=None,
num_samples=2,gpus=1 )]
nf= NeuralForecast(
models=models2,
freq='b')
nf.fit(df=Y_train_df)
models2= [AutoNHITS(h=15,
loss=MAE(),
config=None,
num_samples=2,gpus=1 )]
nf= NeuralForecast(
models=models2,
freq='b')
nf.fit(df=Y_train_df)
models2= [AutoMLP(h=15,
loss=MAE(),
config=None,
num_samples=2,gpus=1 )]
nf= NeuralForecast(
models=models2,
freq='b')
nf.fit(df=Y_train_df)
models2= [AutoDilatedRNN(h=15,
loss=MAE(),
config=None,
num_samples=2,gpus=1 )]
nf= NeuralForecast(
models=models2,
freq='b')
nf.fit(df=Y_train_df)
Issue Severity
High: It blocks me from completing my task.

Hey @ams015, thanks for using neuralforecast. Can you include the full stacktrace?

for some reason the issue has gone away. might have been a c