[nccl] build failure

Operating system
Linux(rhel 9)
Compiler
GCC
Steps to reproduce the behavior
sudo ./vcpkg install flashlight-cuda[core,asr,fl,imgclass,lib,lm,objdet]:x64-linux --clean-after-build                                                        1 ✘  base    at 11:39:54

Failure logs
Computing installation plan...
The following packages will be built and installed:
flashlight-cuda[asr,core,fl,imgclass,lib,lm,objdet]:x64-linux -> 0.3#4

nccl[core]:x64-linux -> 2.4.6#2
openmpi[core]:x64-linux -> 4.1.3#1
stb[core]:x64-linux -> 2022-09-09
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-linux...
Restored 0 package(s) from /root/.cache/vcpkg/archives in 66.8 us. Use --debug to see more details.
Installing 1/4 nccl:x64-linux...
Building nccl[core]:x64-linux...
-- Could NOT find NCCL (missing: NCCL_LIBRARIES) (found suitable version "2.17.1", minimum required is "<IP_ADDRESS>")
CMake Error at ports/nccl/portfile.cmake:15 (message):
Please install NCCL using your system package manager (the same way you
installed CUDA).  For example: apt install libnccl2 libnccl-dev.
Call Stack (most recent call first):
scripts/ports.cmake:147 (include)

error: building nccl:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+nccl
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[nccl]+Build+error&body=Copy+issue+body+from+%2Fhome%2Fbazunzhi%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
Additional context
No response

Please install NCCL using your system package manager (the same way you
installed CUDA). For example: apt install libnccl2 libnccl-dev.

?

I have already installed it with yum and even build it from source cloned from github(put it in CUDA_HOME,where cuda11.8 installed), but the error still exist.

Please install NCCL using your system package manager (the same way you
installed CUDA). For example: apt install libnccl2 libnccl-dev.

?

I have already installed it with yum and even build it from source cloned from github(put it in CUDA_HOME,where cuda11.8 installed), but the error still exist.

It is a strange result, a "suitable version" (by headers) but "missing: NCCL_LIBRARIES".
config logs could provide more information.

It is a strange result, a "suitable version" (maybe by headers?) but "missing: NCCL_LIBRARIES". config logs could provide more information.
Did it generated in vcpkg/buildtrees/nccl ? I can't find it through I run without "--clean-after-build"

Did it generated in vcpkg/buildtrees/nccl ? I can't find it through I run without "--clean-after-build"

Good point. This port is just to check for the package, and it comes with its own find module. But it does so in script mode, not in project mode, so there are no other logs. It uses some environment variables and known paths to look for certain name patterns.
https://github.com/microsoft/vcpkg/blob/master/ports/nccl/FindNCCL.cmake
Where is you NCCL? Which libraries are installed? Which environment variables did you set?

Did it generated in vcpkg/buildtrees/nccl ? I can't find it through I run without "--clean-after-build"

Good point. This port is just to check for the package, and it comes with its own find module. But it does so in script mode, not in project mode, so there are no other logs. It uses some environment variables and known paths to look for certain name patterns. https://github.com/microsoft/vcpkg/blob/master/ports/nccl/FindNCCL.cmake
Where is you NCCL? Which libraries are installed? Which environment variables did you set?

Here is the nccl I build:

Paths I using:

Information from yum:

The first libnccl is installed by yum but it is for cuda-12.1,so I built and installed it from source.

What I do see is that

your local build is in /usr/local/cuda-11.8,
(can be okay)
CUDA_HOME is set to ${CUDA_HOME}:/usr/local/cuda,
(Is this meant to be a list of dirs, or just a single dir such as /usr/local/cuda-11.8 [!]?)
vcpkg doesn't look at CUDA_HOME.
(For the libs, it looks at CUDA_PATH, CUDNN_ROOT_DIR, CUDA_TOOLKIT_ROOT_DIR, NCCL.)

What I do see is that

your local build is in /usr/local/cuda-11.8,
(can be okay)
CUDA_HOME is set to ${CUDA_HOME}:/usr/local/cuda,
(Is this meant to be a list of dirs, or just a single dir such as /usr/local/cuda-11.8 [!]?)
vcpkg doesn't look at CUDA_HOME.
(For the libs, it looks at CUDA_PATH, CUDNN_ROOT_DIR, CUDA_TOOLKIT_ROOT_DIR, NCCL.)

I have tried add $ENV{CUDA_HOME} to FINDNCCL.cmake but it still useless,what should I do?

Not sure if you edited the right FINDNCCL.cmake but you shouldn't do it anyways. CUDA_HOME is an environment variable.

Not sure if you edited the right FINDNCCL.cmake but you shouldn't do it anyways. CUDA_HOME is an environment variable.

I just want to have a try to solve it through it did not work.

what should I do?

Maybe set one of the supported env variables?


outdated puppeteer version

ERROR: https://www.toptal.com/developers/hastebin/umowehuwej.sql
not sure what else I can say... All I do is start a steam with:
const stream = await getStream(tab, { audio: true, video: true, frameSize: 1000 })
launch options:
            browser = await launch({                 headless: false,                 args: ['--window-size=1080,1920', '--start-fullscreen', '--autoplay-policy=no-user-gesture-required', '--disable-infobars', "--no-default-browser-check","–allow-file-access-from-files","-disable-web-security"],                 ignoreDefaultArgs: ['--enable-automation'],             });

updated error link: https://pastebin.com/raw/LF4pfdxA

after adding in a missing await now im getting this error: https://pastebin.com/raw/XTwaFXng

It looks like chrome.tabCapture isn't defined. What version of puppeteer are you using?

It looks like you are using an outdated version of puppeteer, please upgrade to the latest one:
npm install puppeteer@latest

I did not update, however after I removed 2 flags from the launch args it started working. I currently cannot get to my computer to check which two resolved this issue, but I will let you know as soon as I find them.

@KennyHarrer any updates?

Completely forgot about this, Ill try to get an answer to you by tonight.


snap does not host latest jbang version

Hi,
I just installed snap on a raspberry pi and then downloaded jbang with it. The version that was installed is 0.52.1.
Is there a reason why the latest jbang version is not uploaded to snap?
Thanks,
Daniel

It's not updated as after it took months before snap allowed it in I didn't have time to find a way to do fully automated releases. At the moment its releases was done by hand.
I'll see if I can remember / find how to make it automated.
If anyone knows how I would appreciate pointers/PRs :)

for now I've updated snap manually to latest 0.66.1 - so your firestarter should work! :)


Add "being used now" calculated sensor as shown in the octopus smart meter in £/hr

The octopus smart meter shows values of the usage per hour in pounds (£/hr)
which is (current demand) x (current rate) / 1000
Whilst this can be calculated as a custom sensor within home assistant:
{{ ( states('sensor.electricity_current_rate') | float * states('sensor.electricity_current_demand') | float /1000 ) | round(2) }}
it is handy to have it built in.

Hi sorry for the lack of response. As this can be solved via a template sensor for the moment, this will be further down on my to-do list.

The octopus smart meter shows values of the usage per hour in pounds (£/hr)
which is (current demand) x (current rate) / 1000
Whilst this can be calculated as a custom sensor within home assistant:
{{ ( states('sensor.electricity_current_rate') | float * states('sensor.electricity_current_demand') | float /1000 ) | round(2) }}
it is handy to have it built in.

Do you have a Home Mini?

Yes, I have a home mini


GROK-15116: Help | Diff Studio: Sensitivity Analysis

Sensitivity Analysis feature description is added

Everything looks good.
I'll probably extend this section and reorganize the documentation next week.


Allow creating routes with re-encrypt

why
EnMasse manages its own certificates. But when cluster wide certificates are properly installed, it may be beneficial to use them instead.
Proposal
Currently the routes are created with "passthrough". My recommendation would be to allow them to be created with "reencrypt" in addition. When setting "reencrypt" it would be necessary though to set the "destination CA certificate" as well. The content would be the EnMasse created CA certificate.
This would require a change of the OpenShift templates as well as the component which automatically creates e.g. the "messaging" route.
Testing
Testing is good, but I don't have a plan.
Documentation
A new switch in the installer has to be documented.
Tasklist

[x] Change templates
[ ] Create feature in "operator" component
[ ] Update documentation
[ ] Test with proper certificate

I am doing this as part of #1650 , where both keycloak, restapi and console routes will be using reencrypt (running into a small issue with console there but hope to get it fixed at least).
The messaging and mqtt routes cannot use reencrypt, because it relies on HTTP features.

The messaging and mqtt routes cannot use reencrypt, because it relies on HTTP features.

Yes, I figured that out. However it still works for the websockets port.

Btw .. I did raise an issue about that: https://bugzilla.redhat.com/show_bug.cgi?id=1631377

I'd be nervous about the websocket case in the event we (at some point in the future) want to use the SNI information from the original request (unless OpenShift automagically retains this in the re-encrypted communication).

Fixed on master/0.240


ENH: Update CI Build to build against 5.0.0.post1

data.kitware.com is down for expected maintenance.

Please re-trigger the CI check on this.

@thewtex I cannot push to your repository. Please rebase this on top of master yourself in order to trigger a rebuild.


nginx example for ssl proxying

this PR adds another example to the examples folder
this example demonstrates how to coordinate an nginx sidecar to enable ssl proxying as well as proxying /rspamd to the rspamd web ui
resolves #97

@eleith I have updated the CODEOWNER for this example if that's ok for you: https://github.com/anonaddy/docker/commit/852703f98eb53051cd24e9796b0d8951a9fc7bd5


feat(ai-proxy): google-gemini support

Summary
Adds Google Gemini support to Kong AI Gateway.
Checklist

[x] The Pull Request has tests
[x] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
[ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference
AG-27

@tysoekong Let's get this merged.


Added VSIX Fix to include Frameworks.xml

Added Frameworks.xml to VS2022 VSIX installer. This was missing, causing the execution to fail.

Thanks for the PR!
I really busy and I expect I have time to check this next week.

@304NotModified no problem.
I've never done a github PR, or have played with VSIX for that matter. So, if I did something incorrectly, feel free to reach out and let me know.
As I mentioned, with the VS2022 VSIX, the xml file was not included per the install. So, if my PR fails for whatever reason, that was the only change I made.
Extension works great on VS2022 Enterprise.


Is there any way to add authentications?

Hi,
I want to know where the "swatch" user is defined?
Should it be possible to add users? Then let users only see their own jobs。
Thank，
John

Hello, sorry for the delay, I only had just noticed I had a notification next to this repo.
Currently, the swatch user is hardcoded in the HTTP auth logic code. Due to my usecase for writing this, the intent is for users to run their own instance of swatch in a foolproof fashion, tunneling through SSH, to make it as much of a non-issue as possible from a security perspective.
That being said, jobs launched with an username matching the user running the swatch process get sorted to the top of the list for convenience.
The tool does some ugly parsing of slurm command outputs, so I am not sure how suitable it is to any larger clusters than what I have tried it on (which usually tops out at hundreds of jobs).


Make Silver available in a repo somewhere

oss.sonatype.org https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide  would be great, but if that's too much overhead, a quick fix is to do something like http://stackoverflow.com/questions/14013644/hosting-a-maven-repository-on-github

Hmm, I think Im not going to officially publish this one.  If a maven dependency is needed, you can use jitpack to reference a commit directly:
https://jitpack.io/#johncarl81/silver/281de9d526


Zoomable viewGroup using same concept

I am sorry if this is totally unrelated and I do not know how to tag it as a question.
This library provides a very smooth zooming experience. Would you be able to create a zoomable viewGroup using the same layout? I have tried to make many changes to it and I am close but I cannot get the final desired results.
I have tried more than a dozen zoomable layouts and none of them work properly.  Or simply tell me if you think this is not possible using this library.
I apologise again for an unrelated question.

I don't think it's possible using this library, about 99.9% of the code would be different if images were changed to Views :-)

Oh okay. Thank you for the response. Please keep in mind that there is not even one good working open source zoomable layout if you are in mood to create another library in future :)
Have a nice day.


Release Service Bus Track 2 Library GA Release for Java

Epic for service bus GA release.

Released 7.0.0 https://repo1.maven.org/maven2/com/azure/azure-messaging-servicebus/7.0.0/
Released 7.0.1 https://repo1.maven.org/maven2/com/azure/azure-messaging-servicebus/7.0.1/

Released 7.0.0 https://repo1.maven.org/maven2/com/azure/azure-messaging-servicebus/7.0.0/
Released 7.0.1 https://repo1.maven.org/maven2/com/azure/azure-messaging-servicebus/7.0.1/


Create model for sql generation

Create model for sql generation.
This model will represent the data for Sql generation in an abstract/generic representation.   Separate tasks will take the model and generate SQL.
This task does include populating the model.

Changes for this are merged into feature branch


Add eslint or any linter.

Use eslint (or other linter) to unified code style for any pull request.

Thank you for the suggestion, but it doesn't seem worthwhile given the low traffic in this project. I prefer to review code style manually.


Loading release id failed: A problem occured while extracting your app.

While publishing the package to AppCenter via Azure pipelines, I see this error.
(Correlation ID: 8ce7fecc-48ea-4595-937b-894b825d40f7)
I have confirmed uploading the same package manually and it works. Can you please check and confirm what might be the issue.

@chandrunmanchur, could you please provide more information? What are you doing exactly and what is your workflow, also it would be useful to describe repro steps for your issue.

Thank you for the response @AnatolyPristensky. I am using Task AppCenterDistribute@3 in Azure pipelines to publish the build to a specific App. This task throws error as mentioned in the title. App created in AppCenter has OS as Mac. If we change the OS to custom, I do not see any error. For now, I have changed the OS and proceeding.


jest doesn't fail test case

Do you want to request a feature or report a bug?
bug
What is the current behavior?
tests are always passing
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
What is the expected behavior?
jest should mark the test as failure
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
import MockAdapter from 'axios-mock-adapter';
import axios from 'axios';
import actions from '../ActivationActions';
import actionTypes from '../ActivationActionTypes';
import Apis from '../Apis';

const mock = new MockAdapter(axios);

const mockDataSuccess = {
    api: Apis.getActivationApi(99),
    data: {activation_code: 12345},
    status: 200,
    response: {data: 'success'},
    header: {'Content-Type': 'application/x-www-form-urlencoded'}
};
const mockDataError = {
    api: Apis.getActivationApi(98),
    data: {activation_code: 54321},
    status: 500,
    response: {data: 'error'},
    header: {'Content-Type': 'application/x-www-form-urlencoded'}
};
mock.onPost(mockDataSuccess.api, mockDataSuccess.data)
        .reply(mockDataSuccess.status, mockDataSuccess.response, mockDataSuccess.header);
mock.onPost(mockDataError.api, mockDataError.data)
        .reply(mockDataError.status, mockDataError.response, mockDataError.header);

const successPromise = actions.activate(99, 12345).payload.promise;
const errorPromise = actions.activate(98, 54321).payload.promise;

describe('Activation actions', () => {

    it('should fail to activate', () => {
        errorPromise.then(() => {
            expect(false).toEqual(true);
        }, (error) => {
            expect(error.response.status).toEqual(500);
            expect(false).toEqual(true);
        });
    });
});

node: v7.8.0 jest: 19.0.2

you should return the promise from the test to make it fail
On Mon, Apr 3, 2017 at 5:42 PM YULONG SONG<EMAIL_ADDRESS>wrote:

Do you want to request a feature or report a bug?
bug
What is the current behavior?
tests are always passing
If the current behavior is a bug, please provide the steps to reproduce
and either a repl.it http://repl.it demo through
https://repl.it/languages/jest https://repl.it/languages/jest or a
minimal repository on GitHub that we can yarn install and yarn test.
What is the expected behavior?
jest should mark the test as failure
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
import MockAdapter from 'axios-mock-adapter';
import axios from 'axios';
import actions from '../ActivationActions';
import actionTypes from '../ActivationActionTypes';
import Apis from '../Apis';
const mock = new MockAdapter(axios);
const mockDataSuccess = {
api: Apis.getActivationApi(99),
data: {activation_code: 12345},
status: 200,
response: {data: 'success'},
header: {'Content-Type': 'application/x-www-form-urlencoded'}
};
const mockDataError = {
api: Apis.getActivationApi(98),
data: {activation_code: 54321},
status: 500,
response: {data: 'error'},
header: {'Content-Type': 'application/x-www-form-urlencoded'}
};
mock.onPost(mockDataSuccess.api, mockDataSuccess.data)
.reply(mockDataSuccess.status, mockDataSuccess.response, mockDataSuccess.header);
mock.onPost(mockDataError.api, mockDataError.data)
.reply(mockDataError.status, mockDataError.response, mockDataError.header);
const successPromise = actions.activate(99, 12345).payload.promise;
const errorPromise = actions.activate(98, 54321).payload.promise;
describe('Activation actions', () => {
it('should fail to activate', () => {
    errorPromise.then(() => {
        expect(false).toEqual(true);
    }, (error) => {
        expect(error.response.status).toEqual(500);
        expect(false).toEqual(true);
    });
});

});
[image: screen shot 2017-04-03 at 8 37 37 pm]
https://cloud.githubusercontent.com/assets/4540917/24637266/cc4764ba-18ad-11e7-9402-3ddc206a71c3.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/facebook/jest/issues/3249, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA5YZatiuFl2hQKfJ1xksMt6oVvSLGZ6ks5rsZIQgaJpZM4MyQsd
.

--
Dmitrii Abramov
www.abramov.io

@dmitriiabramov even with this line  expect(false).toEqual(true) ?

With every promise. expect throws an Error, so you either have to catch it with returned promise, or with done()/done.fail() callback.


Enums as query-params didn't show the options any more

Q
A

Bug or feature request?
Bug

Which Swagger-Core version?
2.0.0 (todays no snapshot via maven install)

Which Java version?
8

Which JAX-RS framework & version?
OSGi/CFX

Enums as Query params (TaskType) produced a ComboBox in SwaggerUi in earlier versions of the core.
This Combobox isnt shown any more because the values aren't in the yaml
Method

@GET
	@Path("/task")
	@Consumes(MediaType.APPLICATION_JSON)
	@Produces(MediaType.APPLICATION_JSON)
	@ApiResponse(responseCode = "200", content = {
			@Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(type = "array", implementation = TaskDTO.class))) })
	@ApiResponse(responseCode = "404", description = "User not found")
	@Operation(parameters = { @Parameter(in = ParameterIn.QUERY, name = "guid", required = true), })
	public Response getTasks(@QueryParam("tasktype") TaskType taskType, @Context SecurityContext securityContext) {
}

generated yaml

   operationId: getTasks
      parameters:
      - name: guid
        in: query
        required: true
        schema:
          type: string
      - name: tasktype
        in: query

Thanks for reporting this, fixed in #2719.


Incorrect logging in console (windows)

Result of execution in windows bash. Please take a look below
Looks like issue like there https://github.com/rs/zerolog/issues/153
Can you check it?
$ lefthook run pre-commit
?[36mRUNNING HOOKS GROUP:?[0m ?[1mpre-commit?[0m
?[36m
  EXECUTE >?[0m ?[1mtests?[0m
?       github.com/sochisic/tg-retard-jokes-bot [no test files]
?[36m
SUMMARY: (done in 2.15 seconds)?[0m
✔  ?[32mtests?[0m

Do you use terminal from Ubuntu sybsytem on Windows? Or some kind of emulators, cygwin for example?

I didn't use go in wsl mode but I think there all will be good

https://cdn1.savepice.ru/uploads/2019/7/30/29ead40b0dcc6f9e0f380bed54902552-full.png
Checked.
As expected, default terminal with enabled wsl mode just have an issue with emoji. But who use default terminal? :D Maybe at winter 2019 they release terminal 2.0
MinTTY(just first unix-like terminal emulator I found for test) works well. Emoji interpreted right.

I used git bash(mintty) not cmd or powershell. Let's wait they start to perform standarts, for me it isn't big problem anyway.


Update KIC docs to reflect webhook configuration changes

Proposed changes
This PR includes docs/tutorial updates that cover the new mutating webhook used to configure the integration between KIC instances and NSM. It's includes:

removal of docs/tutorials that have been replaced with automation
updated docs showing how the newest version of KIC OSS can integrate with NSM

Checklist
Before creating a PR, run through this checklist and mark each as complete.

[x] I have read the CONTRIBUTING doc
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have checked that all unit tests pass after adding my changes
[x] I have updated necessary documentation
[ ] I have rebased my branch onto main
[x] I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

The webhook helm chart needs to be updated with the new mutate path, right?

The webhook helm chart needs to be updated with the new mutate path, right?

It does not. I left the path the same as it was. I only changed the package name inside of control-plane to account for the new functionality.

@brianehlert I've addressed your comments in this PR: https://github.com/nginxinc/nginx-service-mesh/pull/133


Support for init_options in mason LSP setup handler

Describe the bug
I'm not entirely sure it's a "bug" per se. I tried to install Intelephense (LSP for PHP) and Mason provides schema for license key:
intelephense.licenceKey

But it doesn't work. I made a mason-lspconfig.nvim ticket and it seems it doesn't work because it has to be passed as initialization option so I guess something like this might be needed for more LSP servers:
local servers = {
    -- [...]
    intelephense = {
        settings = {     -- settings according to schema
            intelephense = { foo = bar },
        },
        init_options = { -- sever specific init flags
            licenceKey = 'key goes here',
        },
    },
}

-- [...]

mason_lspconfig.setup_handlers {
    function(server_name)
        require('lspconfig')[server_name].setup {
            capabilities = capabilities,
            on_attach = on_attach,
            settings = servers[server_name][settings],
            init_options = servers[server_name][init_options],
        }
    end,
}

To Reproduce
Steps to reproduce the behavior:

install kickstart.nvim's init.lua
setup Intelephense with license key:local servers = {
    -- [...]
    intelephense = {
        intelephense = { licenceKey = 'key goes here' },
    },
}

save, quit NeoVim, open PHP project and see there's no message about Intelephense premium features getting activated

My hope is that whoever at Mason LSP Config project is responsible for Intelephense integration, has a license key to test and confirm it, if needed.
Desktop (please complete the following information):

OS: Manjaro Linux 22.0.0
Terminal: urxvt v9.30

Neovim Version

Output of running :version from inside of neovim:

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3

Hey! I'm not sure there's anything actionable here (especially not in this repo). I described some background in my comment here.

If you want to pass additional arguments, you can override the setup_handlers method with a intelephense key to pass more arguments.


Minor polish items

Improve notification when uploading many models

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.91%. Comparing base (6889f69) to head (3c5ade8).

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk      #98   +/-   ##
=======================================
  Coverage   96.91%   96.91%
=======================================
  Files          34       34
  Lines        1460     1460
=======================================
  Hits         1415     1415
  Misses         45       45

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


Roughly once per day we get a 500 error because _cache_card does not exist

I assume this is because we delete it before we recreate it and it isn't in a transaction. Hopefully wrapping it in a transaction is easy. Although MySQL doesn't do nested transactions so let's not count our chickens.
Failed to execute SELECT * FROM _cache_card AS c WHERE ((1 = 1) AND LOWER(c.name) IN ('corpse cur')) with [] because of (1146, "Table 'cards._cache_card' doesn't exist")

Reported on decksite by logged_out```
--------------------------------------------------------------------------------
Request Method: GET
Path: /seasons/6/cards/Corpse Cur/?
Cookies: {'__cfduid': 'd9b3f9a296fa4a7f0f87c5904ad0423e91532544226', 'session': '.eJwVyrsOwjAMQNF_8YywRKd2AxaGTEit2JCJTZoqLzXuUCH-nbDeez4QsqUgMMBCcIBMm86nZ1XSf6vdXkJHxk_jubcXc727URd53F5sem5eaXWiTc6qpQ6IRVLaeRXi9xYiOW-PNkckjj61mUsQTFmlInx_ZLQrhg.DkBBhg.026ANZyCARN52l8GLibYtijX1d0'}
Endpoint: seasons.card
View Args: {'name': 'Corpse Cur'}
Person: logged_out
Referrer: None
Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: <IP_ADDRESS>, <IP_ADDRESS>
Cf-Ray: 4425c3ee0ca621c8-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
From<EMAIL_ADDRESS>User-Agent: MauiBot<EMAIL_ADDRESS>Cookie: __cfduid=d9b3f9a296fa4a7f0f87c5904ad0423e91532544226; session=.eJwVyrsOwjAMQNF_8YywRKd2AxaGTEit2JCJTZoqLzXuUCH-nbDeez4QsqUgMMBCcIBMm86nZ1XSf6vdXkJHxk_jubcXc727URd53F5sem5eaXWiTc6qpQ6IRVLaeRXi9xYiOW-PNkckjj61mUsQTFmlInx_ZLQrhg.DkBBhg.026ANZyCARN52l8GLibYtijX1d0
Cf-Connecting-Ip: <IP_ADDRESS>
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

--------------------------------------------------------------------------------
DatabaseException
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/cache.py", line 71, in decorated_function
response = make_response(f(*args, **kwargs))
File "./decksite/main.py", line 103, in card
c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id())
File "./decksite/data/card.py", line 43, in load_card
c = guarantee.exactly_one(oracle.load_cards([name]))
File "./magic/oracle.py", line 45, in load_cards
rs = db().execute(sql)
File "./shared/database.py", line 50, in execute
raise DatabaseException('Failed to execute {sql} with {args} because of {e}'.format(sql=sql, args=args, e=e))

Failed to execute SELECT * FROM _cache_card AS c WHERE ((1 = 1) AND LOWER(c.name) IN ('herald of dromoka')) with [] because of (1146, "Table 'cards._cache_card' doesn't exist")

Reported on decksite by logged_out```
--------------------------------------------------------------------------------
Request Method: GET
Path: /cards/Herald of Dromoka/?locale=es
Cookies: {'__cfduid': 'd74fc93a61ee7c4fe5d4716c2e791829b1532888784', 'session': 'eyJsb2NhbGUiOiJlbiJ9.Dj-YvQ.e5AGH_aiqDLNkn_D1diSwnyS8R8'}
Endpoint: card
View Args: {'name': 'Herald of Dromoka'}
Person: logged_out
Referrer: None
Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: DE
X-Forwarded-For: 2a01:4f8:150:2314:0:0:0:2, <IP_ADDRESS>
Cf-Ray: 4421a513dc4c96b2-FRA
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)
Cookie: __cfduid=d74fc93a61ee7c4fe5d4716c2e791829b1532888784; session=eyJsb2NhbGUiOiJlbiJ9.Dj-YvQ.e5AGH_aiqDLNkn_D1diSwnyS8R8
Cf-Connecting-Ip: 2a01:4f8:150:2314:0:0:0:2
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

--------------------------------------------------------------------------------
DatabaseException
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/cache.py", line 71, in decorated_function
response = make_response(f(*args, **kwargs))
File "./decksite/main.py", line 103, in card
c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id())
File "./decksite/data/card.py", line 43, in load_card
c = guarantee.exactly_one(oracle.load_cards([name]))
File "./magic/oracle.py", line 45, in load_cards
rs = db().execute(sql)
File "./shared/database.py", line 50, in execute
raise DatabaseException('Failed to execute {sql} with {args} because of {e}'.format(sql=sql, args=args, e=e))

Failed to execute SELECT * FROM _cache_card AS c WHERE ((1 = 1) AND LOWER(c.name) IN ('celestial kirin')) with [] because of (1146, "Table 'cards._cache_card' doesn't exist")

Reported on decksite by logged_out```
--------------------------------------------------------------------------------
Request Method: GET
Path: /seasons/6/cards/Celestial Kirin/?
Cookies: {}
Endpoint: seasons.card
View Args: {'name': 'Celestial Kirin'}
Person: logged_out
Referrer: None
Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: RU
X-Forwarded-For: <IP_ADDRESS>, <IP_ADDRESS>
Cf-Ray: 440ec3256f0db63b-TLL
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)
From<EMAIL_ADDRESS>Accept: /
Accept-Language: en, *;q=0.01
Cf-Connecting-Ip: <IP_ADDRESS>
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

--------------------------------------------------------------------------------
DatabaseException
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/cache.py", line 71, in decorated_function
response = make_response(f(*args, **kwargs))
File "./decksite/main.py", line 103, in card
c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id())
File "./decksite/data/card.py", line 43, in load_card
c = guarantee.exactly_one(oracle.load_cards([name]))
File "./magic/oracle.py", line 45, in load_cards
rs = db().execute(sql)
File "./shared/database.py", line 50, in execute
raise DatabaseException('Failed to execute {sql} with {args} because of {e}'.format(sql=sql, args=args, e=e))

Failed to execute SELECT * FROM _cache_card AS c WHERE ((1 = 1) AND LOWER(c.name) IN ('avizoa')) with [] because of (1146, "Table 'cards._cache_card' doesn't exist")

Reported on decksite by logged_out```
--------------------------------------------------------------------------------
Request Method: GET
Path: /cards/Avizoa/?locale=es
Cookies: {}
Endpoint: card
View Args: {'name': 'Avizoa'}
Person: logged_out
Referrer: None
Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: <IP_ADDRESS>, <IP_ADDRESS>
Cf-Ray: 44057e0a6c0c7a17-SEA
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: no-cache
Pragma: no-cache
Accept: /
From: bingbot(at)microsoft.com
User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
Cf-Connecting-Ip: <IP_ADDRESS>
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

--------------------------------------------------------------------------------
DatabaseException
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/cache.py", line 71, in decorated_function
response = make_response(f(*args, **kwargs))
File "./decksite/main.py", line 103, in card
c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id())
File "./decksite/data/card.py", line 43, in load_card
c = guarantee.exactly_one(oracle.load_cards([name]))
File "./magic/oracle.py", line 45, in load_cards
rs = db().execute(sql)
File "./shared/database.py", line 50, in execute
raise DatabaseException('Failed to execute {sql} with {args} because of {e}'.format(sql=sql, args=args, e=e))

Theorectically this is already in a transaction:
def update_cache() -> None:
    db().begin()
    db().execute('DROP TABLE IF EXISTS _cache_card')
    db().execute('SET group_concat_max_len=100000')
    db().execute('CREATE TABLE _cache_card AS {base_query}'.format(base_query=base_query()))
    db().execute('CREATE INDEX idx_name_name on _cache_card (name(142))')
    db().commit()

Our transactions do not work which can be seen executing this code and simultaneously querying the monkey table:
@APP.route('/test/')
def test():
    from decksite.database import db
    import time
    db().begin()
    db().execute('DROP TABLE IF EXISTS monkey')
    time.sleep(5)
    db().execute('CREATE TABLE monkey (id INT)')
    db().execute('INSERT INTO monkey (id) VALUES (2)')
    db().commit()
    return 'done'

You'll get "table does not exist" during the sleep :/

ok looks like mysql doesn't support transactions including a DROP TABLE :/

Yeah, our transactions work just fine for two UPDATEs and similar. Grr.

we could create the new table and then RENAME it. this messes up foreign keys though, i think.

Failed to execute SELECT * FROM _cache_card AS c WHERE ((1 = 1) AND LOWER(c.name) IN ('reverent hunter')) with [] because of (1146, "Table 'cards._cache_card' doesn't exist")

Reported on decksite by logged_out```
--------------------------------------------------------------------------------
Request Method: GET
Path: /cards/Reverent Hunter/?locale=en
Cookies: {}
Endpoint: card
View Args: {'name': 'Reverent Hunter'}
Person: logged_out
Referrer: None
Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: <IP_ADDRESS>, <IP_ADDRESS>
Cf-Ray: 4453155fe8125a68-BOS
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html
User-Agent: Mozilla/5.0 (compatible; SemrushBot/2~bl; +http://www.semrush.com/bot.html)
Cf-Connecting-Ip: <IP_ADDRESS>
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

--------------------------------------------------------------------------------
DatabaseException
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/cache.py", line 71, in decorated_function
response = make_response(f(*args, **kwargs))
File "./decksite/main.py", line 103, in card
c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id())
File "./decksite/data/card.py", line 43, in load_card
c = guarantee.exactly_one(oracle.load_cards([name]))
File "./magic/oracle.py", line 45, in load_cards
rs = db().execute(sql)
File "./shared/database.py", line 50, in execute
raise DatabaseException('Failed to execute {sql} with {args} because of {e}'.format(sql=sql, args=args, e=e))

Failed to execute SELECT * FROM _cache_card AS c WHERE ((1 = 1) AND LOWER(c.name) IN ('dimir infiltrator')) with [] because of (1146, "Table 'cards._cache_card' doesn't exist")

Reported on decksite by logged_out```
--------------------------------------------------------------------------------
Request Method: GET
Path: /cards/Dimir Infiltrator/?locale=pl
Cookies: {}
Endpoint: card
View Args: {'name': 'Dimir Infiltrator'}
Person: logged_out
Referrer: None
Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: <IP_ADDRESS>, <IP_ADDRESS>
Cf-Ray: 44b90cdf5ffc0ec1-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html
User-Agent: Mozilla/5.0 (compatible; SemrushBot/2~bl; +http://www.semrush.com/bot.html)
Cf-Connecting-Ip: <IP_ADDRESS>
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

--------------------------------------------------------------------------------
DatabaseException
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/cache.py", line 79, in decorated_function
response = make_response(f(*args, **kwargs))
File "./decksite/main.py", line 103, in card
c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id())
File "./decksite/data/card.py", line 43, in load_card
c = guarantee.exactly_one(oracle.load_cards([name]))
File "./magic/oracle.py", line 45, in load_cards
rs = db().execute(sql)
File "./shared/database.py", line 50, in execute
raise DatabaseException('Failed to execute {sql} with {args} because of {e}'.format(sql=sql, args=args, e=e))

I think what we need to do here is create the table as _cache_card2 or something and then swap it over in a transaction?

We discussed that solution in the great January crisis. But I can't remember if we decided for it, and simply it hasn't happened yet.

Failed to execute SELECT * FROM _cache_card AS c WHERE ((1 = 1) AND LOWER(c.name) IN ('ascendant evincar')) with [] because of (1146, "Table 'cards._cache_card' doesn't exist")

Reported on decksite by logged_out```
--------------------------------------------------------------------------------
Request Method: GET
Path: /cards/Ascendant Evincar/?locale=pt_BR
Cookies: {'__cfduid': 'dc4d35a2b1cfdc8d73b7967b7f18690691535585257', 'session': 'eyJsb2NhbGUiOiJqYSJ9.Dmi9kg.zEdm4c4CPS3uBaBQazGe2jAcQGI'}
Endpoint: card
View Args: {'name': 'Ascendant Evincar'}
Person: logged_out
Referrer: None
Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: DE
X-Forwarded-For: 2a01:4f8:150:2314:0:0:0:2, <IP_ADDRESS>
Cf-Ray: 4522cb6bce0626de-FRA
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)
Cookie: __cfduid=dc4d35a2b1cfdc8d73b7967b7f18690691535585257; session=eyJsb2NhbGUiOiJqYSJ9.Dmi9kg.zEdm4c4CPS3uBaBQazGe2jAcQGI
Cf-Connecting-Ip: 2a01:4f8:150:2314:0:0:0:2
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

--------------------------------------------------------------------------------
DatabaseException
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/compat.py", line 35, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/cache.py", line 79, in decorated_function
response = make_response(f(*args, **kwargs))
File "./decksite/main.py", line 106, in card
c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id())
File "./decksite/data/card.py", line 43, in load_card
c = guarantee.exactly_one(oracle.load_cards([name]))
File "./magic/oracle.py", line 45, in load_cards
rs = db().select(sql)
File "./shared/database.py", line 39, in select
[, rows] = self.execute_anything(sql, args)
File "./shared/database.py", line 58, in execute_anything
raise DatabaseException('Failed to execute {sql} with {args} because of {e}'.format(sql=sql, args=args, e=e))

Whatever we do here we should probably do for #5206 and vice versa.

This isn't quite the same thing as #5206. One is about blowing away the db completely and the other is about dropping and recreating _cache_card only.

Reduced the amount of time that _cache_card is not available considerably in eb2951e1.
Doesn't actually make this impossible but the switchover should be an eyeblink instead of several seconds. Good enough!


Svelte 5 migration examples

Today Kevin suggested it would be good to see some examples of what the Svelte 5 migration tool does, so that we can start getting familiar with the changes between Svelte 4 and 5 and maybe practice migrating a file or two ourselves. I'll put some examples in here, with commentary, one comment per example.

Migrating the root layout component (src/routes/+layout.svelte) produced the following diff:
diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte
index 0d66cad6..9e8d74d4 100644
--- a/frontend/src/routes/+layout.svelte
+++ b/frontend/src/routes/+layout.svelte
@@ -1,4 +1,6 @@

 <ActionBadge {actionIcon} {variant} disabled={!canManage} on:action>

The export let statements turned into props in a very straightforward way, and the $: declarations turned into $derived definitions. In this file we won't need to correct the output of the migration script, except maybe to remove the unnecessary parentheses around the actionIcon definition. (They were unnecessary in the original, but the parentheses inhererent in a $derived(...) definition make them really unnecessary post-migration).
@@ -17,7 +21,7 @@

-
+

   <Badge>
     <FormatUserProjectRole role={member.role} />

Another case of the script fixing a technically-invalid self-closing  tag for us.

A diff showing how slots are converted in Dropdown.svelte:
diff --git a/frontend/src/lib/components/Dropdown.svelte b/frontend/src/lib/components/Dropdown.svelte
index fe8c759f..c2281418 100644
--- a/frontend/src/lib/components/Dropdown.svelte
+++ b/frontend/src/lib/components/Dropdown.svelte
@@ -1,13 +1,19 @@

-  <slot />
+  {@render children?.()}

-    <slot name="content" />
+    {@render content?.()}

The default slot became a snippet prop named children, and the named slot content became a snippet prop of the same name. Both are straightforward; what's interesting is how they are used. Here's what the migration script does when <Dropdown> is used on the org page:
diff --git a/frontend/src/routes/(authenticated)/org/[org_id]/+page.svelte b/frontend/src/routes/(authenticated)/org/[org_id]/+page.svelte
index e20192ec..dcd5fbd2 100644
--- a/frontend/src/routes/(authenticated)/org/[org_id]/+page.svelte
+++ b/frontend/src/routes/(authenticated)/org/[org_id]/+page.svelte
@@ -144,23 +152,27 @@
         columns={['name', 'code', 'users', 'type']}
         projects={org.projects}
       >
-
-          {#if canManage}
-            <Dropdown>
-              <button class="btn btn-ghost btn-square">
-
-              </button>
-

-

-                  <button class="text-error" on:click={() => removeProjectFromOrg(project.id, project.name)}>
-                    <TrashIcon />
-                    {$t('org_page.remove_project_from_org')}
-                  </button>
-

-

-            </Dropdown>
-          {/if}
-
+        {#snippet actions({ project })}
+
+            {#if canManage}
+              <Dropdown>
+                <button class="btn btn-ghost btn-square">
+
+                </button>
+                {#snippet content()}
+

+

+                      <button class="text-error" onclick={() => removeProjectFromOrg(project.id, project.name)}>
+                        <TrashIcon />
+                        {$t('org_page.remove_project_from_org')}
+                      </button>
+

+

+                          {/snippet}
+              </Dropdown>
+            {/if}
+
+              {/snippet}
       </ProjectTable>
       <DeleteModal
         bind:this={removeProjectFromOrgModal}

Ignore the {#snippet actions({ project })} for now, we'll get to that soon. (It's passing a snippet into the ProjectTable component, which we'll look at next). Here, let's just focus on the <Dropdown> component. The HTML directly inside <Dropdown> is passed in as its children snippet (pretend there's an invisible {#snippet children()} around the <button class="btn btn-ghost btn-square">...</button> there). The content snippet is straightforward, though you might notice that the migration script didn't quite get the indentation right. But what's useful to note is that this:
<element slot="slotName" class="foo">
...
</element>

becomes this:
{#snippet slotName()}
<element class="foo">
...
</element>
{/snippet}

You may already see the implications, but if there's a slot you wanted to fill with more than one element, you used to have to use svelte:fragment to do so. With snippets, that's no longer necessary. We'll see that later on when we look at ConfirmDeleteModal.

ProjectTable component diff, or part of it (the props conversion is straightforward as always, so I've trimmed it):
diff --git a/frontend/src/lib/components/Projects/ProjectTable.svelte b/frontend/src/lib/components/Projects/ProjectTable.svelte
index 42819532..3eb0ccb0 100644
--- a/frontend/src/lib/components/Projects/ProjectTable.svelte
+++ b/frontend/src/lib/components/Projects/ProjectTable.svelte
@@ -44,8 +49,8 @@
         {#if isColumnVisible('type')}
           {$t('project.table.type')}
         {/if}
-        {#if $$slots.actions}
-
+        {#if actions}
+
         {/if}

@@ -119,8 +124,8 @@

           {/if}
-          {#if $$slots.actions}
-            <slot name="actions" {project} />
+          {#if actions}
+            {@render actions?.({ project, })}
           {/if}

       {/each}

Here we see how ProjectTable had an actions slot that passed a project value up to its parent component. The parent component then used let:project in the calling site (e.g., ) to bind the name "project" for use inside the HTML code. (See the org page diff in the previous comment). It's always been a little hard to remember how slot="foo" let:variable works, but with snippets it just becomes a function parameter. The actions snippet takes a project parameter (the migration script makes it an object with a project property, but there's no reason it can't just pass the project as a single parameter). The place where the snippet is defined uses project just as it would use any function parameter. (In this case, it's used to pass the correct project ID and name to a button click event handler). Then the place where the snippet gets called (in ProjectTable) hands it the project that it should be using in the render. It's just function parameters, with no magic.
So the takeaway is that snippets are functions that produce HTML code. They can take parameters just like any other function, and they return a block of HTML that Svelte will then render when the {@render} tag is used.


Excluding the MergeParenCloseWithCurlyOpen option does not affect the try/catch/finally

When using the --exclude=MergeParenCloseWithCurlyOpen option, the try/catch/finally still reformatted from
try {
    // something
}
catch (Exception $e) {
    // something
}
finally {
    // something
}

to
try {
    // something
} catch (Exception $e) {
    // something
} finally {
    // something
}

Hi! What would be the expected behaviour? Please consider MergeParenCloseWithCurlyOpen is intended to work with if/else, not try/catch

MergeParenCloseWithCurlyOpen is intended to work with if/else, not try/catch, so I don't know if it'd be something to change. It's been a lot of years it behaves this way.

Hi! I'm understood, thank you!
Is it possible to add a new option for this case?

I've found that the culprit for this problem is the "ResizeSpaces". I'm very sorry I can't touch this very pass to fit this need at this moment. I should add another new pass just for this specific case, and I'm currently just fixing bugs for the this package.


Required Credential details for JWT Key Pair are not generated when user refreshes the credentials

Signing Private Key and Signing Public Certificate details are not displayed in Refresh Credential window, where as same details are displayed for first time API Access request

Actual Result : Signing Private Key and Signing Public Certificate details are not displayed in Refresh Credential window
Expected Result : Signing Private Key and Signing Public Certificate details should be displayed in Refresh Credential window

Hi @ikethecoder  - I can reproduce this issue but I believe that you mentioned regenerate credential would not regenerate the credentials for JWT with Generated Key Pair and JWT with JWKS URL auth flow..Could you please correct me if my understanding in correct?


ci: switch nightly from nightly to RC/test

What does this PR do?
ref: https://dev-discuss.pytorch.org/t/pytorch-2-1-rc1-is-produced-for-pytorch-vision-and-audio/1479

Before submitting

Was this discussed/agreed via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
Did you make sure to update the documentation with your changes? (if necessary)
Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
Did you list all the breaking changes introduced by this pull request?
Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

Fixes #18499
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

:books: Documentation preview :books:: https://pytorch-lightning--18485.org.readthedocs.build/en/18485/

@awaelchli This should avoid the current failure in nightly CI

Awesome!


aks-preview extension breaks --enable-defender parameter for aks command module

Related command
az aks update --resource-group myGroup --name myCluster --enable-defender
Extension name (the extension in question)
aks-preview
Description of issue (in as much detail as possible)
When trying to run the following with the aks-preview extension (0.5.76):
az aks update --resource-group myGroup --name myCluster --enable-defender

The output returns an error: unrecognized arguments: --enable-defender
When I remove the aks-preview extension the command runs successfully.  I am able to reproduce this issue in Cloud Shell.  Here is the output of az version:
{
  "azure-cli": "2.37.0",
  "azure-cli-core": "2.37.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "ai-examples": "0.2.5",
    "aks-preview": "0.5.76",
    "ssh": "1.1.1"
  }
}

Hi @sdolgin, sorry for the inconvenience. The defender related options are not supported in aks-preview yet. We will add support for it as soon as possible, expected within this week.
As for the workaround, please use this feature via the official CLI.

@sdolgin Since you already confirmed that the work around is working for you. I will go ahead and close this issue.


Time remapped objects are not easing properly

Tell us about your environment

Browser and Browser Version: Chrome 59.0.3071.115 (Issue is present in "Preview" as well)
After Effects Version: 2017.2 (<IP_ADDRESS>)

What did you do? Please explain the steps you took before you encountered the problem.
I did not create the AE file- I simply downloaded it and ran it thru bodymovin.
What did you expect to happen?
Timing to match the rendered view.
What actually happened? Please include as much relevant detail as possible.
It appears there is a timing issue with a time remapped composition. You can see the animations are not synced up.
After Effects / Chrome

Please provide a download link to the After Effects file that demonstrates the problem.
The file is available at UI8 and can be downloaded directly here.

What version of bodymovin are you using?
Do you have a link with tha behavior?
It seems to work fine in version 4.9.0

Latest upgrade of Bodymovin fixes this!


Add variable storage information to tooltip

Add variable storage (stack offset/register) as well as type information to the variable tooltip

Added in 2.3.2771-dev


[FEATURE] Define parameter config.

Is your feature request related to a problem? Please describe
Currently i am working on project where eRPC would fit but it is missing parameters configuration like: e.g. number could have @maxValue, @minValue, @regexValidation,.... This way user may benefit to generate code which he would need write manually...
Describe the solution you'd like
Add more annotations to customize parameter possible values
Describe alternatives you've considered
I need write another generator for this
Steps you didn't forgot to do

[x] I checked if there is no related issue opened/closed.
[x] I checked that there doesn't exist opened PR which is solving this issue.

Additional context

In the other hand, it makes the erpcgen more complex for things that the user can implement for himself. But I understand that validation is critical for RPC security.
I think such thing would be better if will be somehow in different code validation layer to not mix with the rpc layer.

Another 'problem' is that when RPC protocol working OK and just validation fai, I would expect some error to return to sender, but erpc not have error return code when something failes (maybe that is somethin we need to add, it is really not convinient)

Well it is something user need to define to propagate this feature into generated code. I would like to keep it simple and do not create any new abstraction layer. For validation fail we can simply return new error status code.

I am not totally against, just want to carify my points.
The cons in not adding new layer is that current layer code development will be harder (I understand that for user it isOK)
The cons with returning erpc error is that it causes server to return error to current error, not returning anything to user (that will probably wait forever or get to timeout)


Feature request: tests without expect should display warning

Is your feature request related to a problem? Please describe.
If there is no expect in the test, then the test is still considered successful and still passes with green color. In all xUnit test frameworks such tests are yellow and display warnings when passing. It is very confusing when an unfinished test is green.
Describe the solution you'd like
I would prefer that all tests without expect pass, but display a warning. This should be the default behavior. If expect is not required in the test, for example, the test checks that there was simply no error during the script, then you need to specifically prescribe prefixes for this test, like ignore skip or todo, for example it.doesNotFails('my testcase', () => { })

expect is not part of @vue/test-utils. This belongs to your test runner (for example jest or vitest) or can be checked with a linter plugin like eslint-plugin-jest


Add handle_zeros_in_scale

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.91%. Comparing base (2d2d5ed) to head (b5bdd79).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   94.23%   94.91%   +0.68%
==========================================
  Files           4        4
  Lines          52       59       +7
  Branches        0        2       +2
==========================================
+ Hits           49       56       +7
  Misses          3        3

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


pretrain_OAG.py hgt

Thanks for your great work. I try to run the pretrain_OAG.py and get this error.
Traceback (most recent call last):
File "/home/tiaoban/chen_qian_yu/gptgnn/GPT-GNN/example_OAG/pretrain_OAG.py", line 228, in
node_emb = gpt_gnn.gnn(node_feature.to(device), node_type.to(device), edge_time.to(device), edge_index.to(device), edge_type.to(device))
File "/home/tiaoban/anaconda3/envs/pyg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/tiaoban/chen_qian_yu/gptgnn/GPT-GNN/example_OAG/GPT_GNN/model.py", line 191, in forward
meta_xs = gc(meta_xs, node_type, edge_index, edge_type, edge_time)
File "/home/tiaoban/anaconda3/envs/pyg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/tiaoban/chen_qian_yu/gptgnn/GPT-GNN/example_OAG/GPT_GNN/conv.py", line 169, in forward
return self.base_conv(meta_xs, node_type, edge_index, edge_type, edge_time)
File "/home/tiaoban/anaconda3/envs/pyg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/tiaoban/chen_qian_yu/gptgnn/GPT-GNN/example_OAG/GPT_GNN/conv.py", line 55, in forward
edge_type=edge_type, edge_time = edge_time)
File "/home/tiaoban/anaconda3/envs/pyg/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 233, in propagate
kwargs)
File "/home/tiaoban/anaconda3/envs/pyg/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 156, in collect
self.set_size(size, dim, data)
File "/home/tiaoban/anaconda3/envs/pyg/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 118, in set_size
size[dim] = src.size(self.node_dim)
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got -2)
There are any problems with the pretrain_OAG.py?Thanks!

Which pyG version are you using? We are using:
pytorch_geometric 1.3.2
torch-cluster==1.4.5
torch-scatter==1.3.2
torch-sparse==0.4.3

torch-geometric 1.6.0
torch-scatter==2.0.5
torch-sparse==0.6.6
torch-cluster==1.5.6

I think it's the problem of pyG version. There're also some other people get the same error due to the version difference. I'll later check how to adapt to the newer version. Right now can you try using the older version that I sent to you?

Yes！Thanks for your hardworking！


Maintain CNI plugin with latest Golang version in Antrea

In order to reduce CVEs, we may consider to maintain our own CNI plugin build with latest Golang version.
@antoninbas proposed this in a comment.
https://github.com/antrea-io/antrea/pull/5747#issuecomment-1828526954
We may also check if there is plan to update the Golang in near future in the cni channel.

There is already a PR to upgrade the golang version in CNI plugin repo https://github.com/containernetworking/plugins/pull/982, but no progress yet. And we are not sure when there will be a new release for the CNI plugin after it's merged.

I post a question on CNI slack channel to see if we can get an answer about the new release and new Golang version.
https://cloud-native.slack.com/archives/C5K6ZQYHJ/p1701398137407249


Fresh install on Digital Ocean, couldn't fetch the workflows from Adobe Sign

Expected Behaviour
Dropdown should fill by the Adobe Sign workflows
Actual Behaviour
Dropdown looks empty. Console throws:
(node:8916) UnhandledPromiseRejectionWarning: FetchError: invalid json response body at http://<IP_ADDRESS>/api/rest/v5/workflows reason: Unexpected token < in JSON at position 0
    at /root/dynamic-workflow/node_modules/node-fetch/lib/index.js:272:32
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

I have 2 sample workflows in my Adobe Sign account. None of them fetched by the Dynamic Workflow.

@umuur, have you been able to run locally?

@nwcell unfortunately no. refer:#25

removing, because it's related to the above issue.


Remove '-Wno-unused-variable' from the default compiler flags

Problem
There is only a few unused variable in our tree. Sounds like we can turn -Wno-unused-variable globally.
Summary of Changes

Remove -Wno-unused-variable from build/config/compiler/BUILD.gn
Fix the 5 remaining cases.

@hawk248 @jelderton @BroderickCarlin @saurabhst ?


Move AWS config

Just moving AWS readme and conf to to contrib/aws folder (since there is a contrib/kubernetes folder too).
Also improve a little the main README file.

I let PR open for few days in case someone disagree on that organization ;).


Camera permission - no pop up to give camera permission anymore

What
I just noticed this while trying to scan ( since updating to 4.17.0 I don't really remember using the camera, so might have been since the update )
I also noticed there seems to be a new camera permission policy for old android device like mine, since I've seen pop ups appearing asking me for permission in other apps ( a lot more regularly than before, it feels ).
Afair I got the pop up in previous version of smoothie but apparently not in this one, I tried closing and reopening the app, powering the phone off and on again until I finally went to Profil > Paramètres de l'application > Paramètres natifs de l'application > had to manage the permission there, kill and relaunch the app to get the scan working.

Smartphone model

Device: Asus Zenphone Z010D
OS: Android 6.0.1
App Version: 4.17.0 from F-Droid

In your device settings, was the permission disabled? Or did you have to toggle it off and on?

Is it because you're not able to reach the button ?

Here's what I mean by pop up

In your device settings, was the permission disabled? Or did you have to toggle it off and on?

The permission was disabled ( which makes sense ) however afair there was a pop up in previous versions which made it a lot more straightforward, in 4.17 the user has to go inside the parameter menu, to locate which sub-menu manages the permissions, after that it's trivial to enable it


Multi-Valued Items in a Field

This is just a basic example but is it possible to handle multi valued items within a given field?
[{"Rec":"1403","Lucky Numbers":"5","Lucky Numbers":"19","Lucky Numbers":"21","Lucky Numbers":"14"},{"Rec":"1402","Lucky Numbers":"5","Lucky Numbers":"7","Lucky Numbers":"19","Lucky Numbers":"21","Lucky Numbers":"33","Lucky Numbers":"17","Lucky Numbers":"14"}]
Trying with arrays for each "Rec" instead created an item in the table like "5,19,7" instead of adding them like I hoped.
Any help is appreciated.

Unfortunately this is not possible, no. I should add that {"Rec":"1403","Lucky Numbers":"5","Lucky Numbers":"19","Lucky Numbers":"21","Lucky Numbers":"14"} isn't actually a valid Javascript object, because Javascript itself doesn't support repeated keys. It will actually evaluate to the same thing as {"Rec":"1403","Lucky Numbers":"14"}
You'll have to "unpivot" this data first and have one row of input per Rec/Lucky Numbers pair.

Got it, thanks. I was able to get it to work by doing as you said and then using the Unique function to total the unique record numbers.


go test ./go/... does not work for me. Does it work for you?

For PRs you ask us to check if go test works. For me the current code does not work.
That is I see:
[user@myhost ~/src/orchestrator/src/github.com/github/orchestrator]$ go test ./go/...
?   	github.com/github/orchestrator/go/agent	[no test files]
ok  	github.com/github/orchestrator/go/app	0.017s
?   	github.com/github/orchestrator/go/attributes	[no test files]
?   	github.com/github/orchestrator/go/cmd/orchestrator	[no test files]
ok  	github.com/github/orchestrator/go/collection	0.017s
ok  	github.com/github/orchestrator/go/config	0.020s
?   	github.com/github/orchestrator/go/db	[no test files]
?   	github.com/github/orchestrator/go/discovery	[no test files]
ok  	github.com/github/orchestrator/go/http	0.029s
ok  	github.com/github/orchestrator/go/inst	0.023s
?   	github.com/github/orchestrator/go/logic	[no test files]
?   	github.com/github/orchestrator/go/metrics	[no test files]
?   	github.com/github/orchestrator/go/metrics/query	[no test files]
?   	github.com/github/orchestrator/go/os	[no test files]
?   	github.com/github/orchestrator/go/process	[no test files]
?   	github.com/github/orchestrator/go/remote	[no test files]
2017-04-30 23:29:54 INFO MutualTLS requested, client certificates will be verified
--- FAIL: TestNewTLSConfig (0.00s)
	ssl_test.go:40: Could not create new TLS config: No certificates parsed
--- FAIL: TestVerify (0.00s)
	ssl_test.go:94: x509: RSA key missing NULL parameters
2017-04-30 23:29:54 INFO Decrypted /var/folders/v5/6pdpvnbn7pg9h41pnbsr1klscmtspv/T/ssl_test488963850 successfully
--- FAIL: TestAppendKeyPair (0.01s)
	ssl_test.go:154: Failed to append certificate and key to tls config: x509: RSA key missing NULL parameters
2017-04-30 23:29:54 INFO Decrypted /var/folders/v5/6pdpvnbn7pg9h41pnbsr1klscmtspv/T/ssl_test572616158 successfully
--- FAIL: TestAppendKeyPairWithPassword (0.01s)
	ssl_test.go:169: Failed to append certificate and key to tls config: x509: RSA key missing NULL parameters
FAIL
FAIL	github.com/github/orchestrator/go/ssl	0.061s
[user@myhost ~/src/orchestrator/src/github.com/github/orchestrator]$

This is true for me as of commit
commit c61104ea3b9a853affe6c4a6d4f7d37f420ae27d
Merge: 5a9547b1 72a59a23
Author: Shlomi Noach<EMAIL_ADDRESS>Date:   Thu Apr 20 17:51:33 2017 +0300

Shlomi, does this build and work for you? If so there's some difference in our environment which is triggering this and I would like to fix mine so the build works cleanly and I can really check that go test ./go/... actually works.  If it makes any difference this is being run on OSX, but also get an issue on Linux.
Note: the build checks via travis do seem to work, so there's some difference here between what you ask us to check if someone creates a PR and what actually gets checked by travis.

@sjmudd works for me. Which branches does this fail for you on? master?

I do believe you were the last to work on TLS. Perhaps some change in your local environment? I'd be happy to know what that change was so as either to eliminate it in the tests or enforce it in the tests. We should all get same test status.

No this does not work for me on your own master branch. This is not a build of a forked copy of orchestrator. If this builds for you then I guess I need to check with you offline to see if I can figure out what's different in our configuration. Some setup or otherwise of certificates perhaps or something else?


byte output in interactive learining

Rasa Core version:
0.14.0a6
Python version:
Python 3.6.8
Issue:
i am getting byte output when using the interactive learning
i attached two screenshots for visuals
byte output:

string output:

changing print(table.encode("utf-8")) to print(table) in rasa_core/training/interactive.py does the trick.

Thanks for raising this issue, @tmbo  will get back to you about it soon.


Simplify configuration

Configuring Hound can be confusing at times. In order to configure Hound for Ruby you need to know how rules are configured by default in Hound. You also need to know how rules are configured by default in RuboCop, since Hound inherits the default RuboCop config and overrides many of its defaults. This isn't ideal and has caused confusion in the past.
It might be simpler for teams to build their own config file based on their preferences, or even better choose a prebuilt one provided by Hound as a starting point that is based on a common style guide. This config would be the single source of truth and determine which rules Hound follows for a specific language. There wouldn't be any inherited defaults requiring extra knowledge to understand.
What do you think? Have you run into any issues configuring Hound?
Any suggestions or feedback would be great!

Here's the branch I started making changes on, https://github.com/thoughtbot/hound/compare/sa-simpler-configuration.
Here's what I've done so far:

Removed dependency on hound.yml. If you want Hound to check Ruby then all you need to do is create .ruby-style.yml in your project root directory.
Removed cascading default RuboCop rules and default Hound rules. With this change you don't need to know which rules are enabled by RuboCop or Hound. The only rules that are enabled are in .ruby-style.yml, simple.

@gylaz, let me know what you think.

Interesting. Is that first file saying that users can and should build a whitelist, so to speak, of the rules they want? So you start with nothing and then build up just the ones you want?

Will we need to keep that config/style_guides/ruby.yml file updated from Rubocop? Is there a different way to "zero-initialize" it?

Is that first file saying that users can and should build a whitelist, so to speak, of the rules they want? So you start with nothing and then build up just the ones you want?

Yea, exactly.

Will we need to keep that config/style_guides/ruby.yml file updated from Rubocop? Is there a different way to "zero-initialize" it?

Yea, we would have to keep that up to date with the the current version of RuboCop but we can cut a lot of it out. It's not there to enable or disable rules, just provide an outline for options and do some basic file exclusion.

What we talked about today was that each organization ends up with a Ruby, JavaScript, CoffeeScript, and SCSS config at the organization level. A little UI with a text box where they can edit their config. It would be "flat", not "how is this merging with the default?" questions. The UI would not have any toggle switches or anything for us to maintain. It'd have validation, though, when saved, so the user knows immediately if they have a syntax error or bad config setting.
We'd migrate the existing data, doing the merge one final time to generate the complete config per org. For each new repo as they come in, we'd copy the config over to their org's record. We'd be able to eliminate the current thoughtbot-specific config.

That sounds like a good plan. The validation seems important since invalid configs are a source of frustration for some users since it's not very clear when the config is invalid.
What about when a team needs a different configuration for a single repo under the org? Are we planning on addressing that or not?

We were thinking we'd start with org config, and then see how often people ask for repo-level config. If it's super-rare, we might not need to support it, or could delay focus on it in exchange for other things. Felt we learn more by going org-only first.

On Jan 24, 2015, at 10:00 AM, Scott Albertson<EMAIL_ADDRESS>wrote:
That sounds like a good plan. The validation seems important since invalid configs are a source of frustration for some users since it's not very clear when the config is invalid.
What about when a team needs a different configuration for a single repo under the org? Are we planning on addressing that or not?
—
Reply to this email directly or view it on GitHub.

@croaky, there's has been feedback for both org level configuration and repo level configuration. It sounds like starting with org level is a deal breaker for some.

Once we have org level config server side, it doesn't seem like a large leap to support repo level config (perhaps using org level as the default but allowing for repo level if the user prefers). Can we start with org level and then move to optional repo level some time later?

Talk about it in-person tomorrow?
On Thu, Feb 5, 2015 at 10:39 AM, Simon Taranto<EMAIL_ADDRESS>wrote:

Once we have org level config server side, it doesn't seem like a large
leap to support repo level config (perhaps using org level as the default
but allowing for repo level if the user prefers). Can we start with org
level and then move to optional repo level some time later?
—
Reply to this email directly or view it on GitHub
https://github.com/thoughtbot/hound/issues/576#issuecomment-73100993.

:+1:

:+1:

@srt32, would you outline what we talked about in person?

Here's what we concluded in the last conversation:
- Store org level config on the server (editable by users via browser)
- If a repo wants changes, merge in repo config files (containing overrides) with the org level config (on server)
- Have a less opinionated default config

Could I clarify further? @salbertson

I came to the repo to post a question/comment but this seems like the relevant thread for it.
We use hound on our application and some of us like having the flexibility of running rubocop before we submit a pull request to reduce the github comment noise when possible. I completely understand and agree with the comment on the FAQ for "Can I have Hound check my entire repository for style?".
That said we have to do some weird things to our rubocop config in order to have rubocop and hound report with the same set of rules. Currently we're copying over the ruby.yml from this repo into ours and referencing it from our rubocop.yml.
With the direction of moving the config to the server as an organization config, would that still be possible? Is there an easier way to sanity check some things locally?

Our team has been confused by the difference between rubocop and hound defaults.  At the moment we are overriding hound defaults using .hound.yml pointing to a local .rubocop.yml on a repo by repo basis; but I'd much prefer to point to a single company "style file".
Could hound.yml be adjusted to take a url rather than a file for the config_file option?
That would allow us to seriously DRY things out across repos ...

:+1: @tansaku

still loving the idea of a hound URL rubocop config.  Also, by the way, is there any way to configure hound so that it will take the -DS flags so that the violation names and links to their explanation would appear in the pull request comments?

I also imported the Hound default config into our project to align my local Rubocop checks with those run by Hound on PRs.
Reading that from a URL would definitely reduce duplication. Still it would require internet access to run checks, right?
My first thought was that it would be great if Rubocop could take the Hound default config from some kind of hound-rubocop-styles gem, which could be a development dependency. It might be possible to extend Rubocop to also inherit config from files in gem directories. That way also an organizations style guide could be packaged up as a gem. Still, even if this mechanism existed, I don't think having Hound install arbitrary gems to read config from would be a secure thing from a deployment viewpoint.

@tf is there any downside of internet access being required to run checks?  CI runs in the cloud with always on internet, so is there any disadvantage?
Although having the style guide in a gem is a nice idea too.

Well, only if I want to run checks locally while i.e. sitting on a train. Maybe Rubocop could cache the file. But using a gem really just seems like a nice fit to handle these "transport" details.

I'm often on the train myself, but there when I run rubocop it hits my local conf file.  I talking about having a URL in the .hound.yml  - I don't run hound on the train myself. Do you?  I guess maybe if you are developing hound itself?  I haven't tried that ...
But I guess gem is a better solution since the styleguide can be published once in gem form and then imported and effectively cached for ease of use wherever ... but that requires adjustments to how both hound and rubocop work ... wouldn't it be more practical in the first instance just to create the option to have a URL in the .hound.yml file ...

I'm not sure I follow. I thought the point was not having to place a complete Rubocop config file in the repo. If there is a local Rubocop config file available, why not let hound also use that? I agree, though, that modifying Rubocop and Hound and solving the security issue around having Hound install gems to obtain config might not be realistic.

On the train rubocop can hit my local conf file in my home dir.
My use case is for lots of projects and a single style guide.  Rather than adding a single rubocop file to each project, the rubocop file is published on a public URL (e.g. a single style repo on github for the organisation perhaps) and then hound can pull it in for running CI on each of the projects.  If I need to run that single rubocop file locally it can be in my home dir (where all projects will pick it up).  The hope is to DRY things out so that when the organization style guide changes, all incoming pull requests on all repos will automatically be using the style guide.

@croaky @salbertson Curious if there has been any discussion on this since February 2015 (I notice the sa-simpler-configuration branch has since been deleted). As far as I can tell, Hound still merges custom configuration into its own defaults, which themselves are overrides of the Rubocop defaults. In my current project, the .rubocop.yml is now 50 lines of meaningful customization, and 70 lines of "counter-overrides" to make Hound behave like stock Rubocop. Keeping up with two overlapping layers of defaults is certainly more difficult than one.

@grantovich We still intend to remove Hound's defaults. We believe that once we support org-level config it will be easier for us to do that.

@gylaz Thanks, we'll watch this space (unless there's a newer/related issue we should be tracking).

@grantovich We'll update this issue as we know more.

Thanks in advance @teoljungberg for keeping us posted. This would be a great step forward for Hound regarding the RuboCop integration ;)

Does hound use its own config even if I set config_file: .rubocop.yml?
Here is PR: https://github.com/printercu/rails_stuff/pull/2
Local rubocop doesn't show any warnings but hound does. I think this not not what most people do expect.
I think it'll also be great if hound could automatically detect if .rubocop.yml is present and use it without config_file: .rubocop.yml.

@printercu The contents of your config_file are merged into Hound's default config, which is different from Rubocop's default config. As I mentioned above, it's currently a bit of work to make Hound and local Rubocop behave the same with the same config file. On one of my projects, instead of using Hound we run rubocop as a CI step (and have CI pass/fail linked to GitHub), which has made things a bit easier.

@grantovich Thank you! Sorry, I've missed your past answer first.

@teoljungberg Do you know if there any plans/intentions to fix this issue by simply relying on the RuboCop configuration file provided by the user?

@dcarral There is a plan to use the defaults - sorry it has taken so long.
But we want to existing users of Hound to have the same behavior even after the change to avoid any confusion in their usage.

Sounds good. Any idea on when will this plan be executed?
Feel free to ping me if you need help with it. We're really looking forward to get rid of all the let's-make-Hound-use-RuboCop-as-it-should-by-default content in our RuboCop configuration files.

@salbertson @gylaz update?

We are still working to simplify the configuration. New customers currently don't inherit from Hound's defaults and get to use the linter defaults. Existing users can reach out to us via the help widget and we can set that up for them. There is also functionality (back-end only for now) for inheriting configuration from another repo, like https://github.com/houndci/legacy-config. We'll be exposing this feature in the UI soon.


Add a link solution for redirect to specific tab

Please add the feature through which I can switch from any page to a specific tab.
Example:
Iam on index.php page and need to go on about.php, second tab content (#secondtab)
click => this not working
Please add JS solution.. Thanx to help

This should be working.
If you go to this http://materializecss.com/tabs.html#test4
The 4th tab should be open


[Exchange] - ADD - Search on top of asset overview

…

Exchange overview already has one, do you mean in Explorer -> Assets ?

yea

How about a very simple filter operation

to save space let's bring it on row ..


Rename to hermit-loader

This would be a clearer name and fit better with our non-existing naming guidelines :wink:

Done in https://github.com/hermit-os/loader/pull/265.


Update how-it-works.md

Reflect Pasting is disabled for almost six years...customer who notice today were on WS16 so far.

Why

Closes CSS SR<PHONE_NUMBER>009948

Changes

Johan writes:
kindly commit the suggested change. Many thanks.
I can close it, not commit. Not sure what to do.


STITCH-2008 - code complete ios changes to support location lookup fo…

…r client API calls - unit tests to follow
This follows the pattern established in the Android API by creating a specialized "app client" class that extends the existing functionality in order to retain the application's client app ID for the purpose of looking up the necessary application metadata from the Stitch server in order to know to which hostname to dispatch client API requests.
Tests will follow in a separate PR

You will add the tests before closing the ticket though, right?

Yep


I bricked my 9FUS camera

Are the unbrick instructions at:
https://github.com/roleoroleo/yi-hack-Allwinner/tree/master/unbrick
still valid and correct for this version (y25ga_0.3.9)  of the hack?
P.S.: My cam is Yi Home 1080p 9FUS.

I'm updating this comment after more closely reading the unbrick instructions:
. You say: "This procedure allows you to unbrick your cam using a backup file (which you did previously)."
Regarding: "which you did previously".  It has been so long I don't recall backing this camera up.  And, as it is currently bricked, I do not have access to any partitions.  Without a "mtdblockX.bin", I can't get past instruction #2. "Copy your partition (mtdblockX.bin)..."
I don't have another 9FUS cam to get a valid partition from.  Would you, or someone else on this forum, have the necessary backup partitions for the 9FUS?  Is firmware available from Yi?
Can I still unbrick?  If so, please advise...
Thanks!

Here it is:
home_y25ga.gz

GREAT!  But I'm confused what home_y25ga.gz is and or what to do with it.  I thought I needed something like mtdblockX.bin file(s).
What am I misunderstanding?
Many thanks for your help and my apologies for my ignorance.  :)

Yes, it's the file created by the unbrick procedure.
Derived from mtdblock3.bin
You need to unzip it in the root folder of the sdard and the bootloader will load it.

I must be doing something wrong.  I am following the unbrick instructions at:
https://github.com/roleoroleo/yi-hack-Allwinner/tree/master/unbrick
I unzip the file you sent into the unbrick/y25ga directory as is.  I do not rename it to mtdblock3.bin.
I am not running "./build.sh factory" as I assume that builds the home_y25ga file which you sent.
Here are the details of what I did:
fdisk -l /dev/sdd
Disk /dev/sdd: 115.84 GiB,<PHONE_NUMBER>96 bytes, 242935808 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device     Boot Start       End   Sectors   Size Id Type
/dev/sdd1        2048 242935807 242933760 115.8G  b W95 FAT32
$ git clone https://github.com/roleoroleo/yi-hack-Allwinner.git
Cloning into 'yi-hack-Allwinner'...
remote: Enumerating objects: 6492, done.
remote: Counting objects: 100% (2187/2187), done.
remote: Compressing objects: 100% (836/836), done.
remote: Total 6492 (delta 1431), reused 1967 (delta 1238), pack-reused 4305 (from 1)
Receiving objects: 100% (6492/6492), 3.39 MiB | 8.73 MiB/s, done.
Resolving deltas: 100% (4252/4252), done.
$ git clone https://github.com/roleoroleo/yi-hack-Allwinner.git
Cloning into 'yi-hack-Allwinner'...
remote: Enumerating objects: 6492, done.
remote: Counting objects: 100% (2187/2187), done.
remote: Compressing objects: 100% (836/836), done.
remote: Total 6492 (delta 1431), reused 1967 (delta 1238), pack-reused 4305 (from 1)
Receiving objects: 100% (6492/6492), 3.39 MiB | 8.73 MiB/s, done.
Resolving deltas: 100% (4252/4252), done.
$ rsync -av  ../unbrick-partition-backup/home_y25ga ./yi-hack-Allwinner/unbrick/y25ga/
sending incremental file list
home_y25ga
$ md5sum ./yi-hack-Allwinner/unbrick/y25ga/home_y25ga
cbd6a1067e9f36f63ba077853e305275  home_y25ga
$ df -h /run/media/rwk/9FUS/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd1       116G   12M  116G   1% /run/media/rwk/9FUS
$ rsync -av ./yi-hack-Allwinner/unbrick/y25ga/ /run/media/rwk/9FUS/
sending incremental file list
./
filename
home_y25ga
mtd.txt
newhome/
newhome/app/
newhome/app/script/
newhome/app/script/wifidhcp.sh
newhome/base/
newhome/base/tools/
newhome/base/tools/extpkg.sh
$ ls -l /run/media/rwk/9FUS/
total 11904
-rw-r--r-- 1 rwk rwk        6 Dec 24 04:25 filename
-rw-r--r-- 1 rwk rwk 12058688 Dec 23 05:38 home_y25ga
-rw-r--r-- 1 rwk rwk      281 Dec 24 04:25 mtd.txt
drwxr-xr-x 4 rwk rwk    32768 Dec 24 04:25 newhome
When I insert the sd card in the camera and turn it on, the yellow led just blinks forever (over 10 minutes).  Checking the sd card after the attempt shows no files added or deleted on the card.  I.e., no log files.
I also tried with "home_y25ga" image as the only file in the root directory of the sd card, but got the same result, continuous yellow blinking.
Where am I going wrong?

The file I sent you is enough to start the camera in factory mode.
After the boot you should see a reboot but no files written to the card.
Are you sure your cam is a y25ga?

Are you sure your cam is a y25ga?

All I know is that it says 9FUS on the beck of the camera under the QR code.
And there seems to be multiple possibilities based on the firmware version  installed.
On the compatibility list at:
https://github.com/roleoroleo/yi-hack-Allwinner
it says that 9FUS is either y20ga or y25ga depending on the firmware version.  And on:
https://github.com/roleoroleo/yi-hack-MStar
it says 9FUS is either y203c or y25 depending on the firmware version.
I can't check the firmware version, because the camera won't boot.
So apparently it could be y25, y20 or y203c.  Do you happen to have y20 and/or y203c I could try?
Thanks again for your help!
P.S.  Originally, I did not see the other possibilities.  I just went with the first one I saw (which was y25ga) and did not look further.

y203c and y25 are MStar based, not Allwinner.
The unbrick procedure is different.
Are you able to open it and check if there is a label on the pcb?

Yes!  It says:
y20ga_mb_v1.3 2019-12-09
on the PCB.
On Mon, Dec 30, 2024 at 10:59 AM roleo @.***> wrote:

y203c and y25 are MStar based, not Allwinner.
The unbrick procedure is different.
Are you able to open it and check if there is a label on the pcb?
—
Reply to this email directly, view it on GitHub
https://github.com/roleoroleo/yi-hack-Allwinner/issues/446#issuecomment-2565769671,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADFMVIVWETM3S6IROAKRTV32IGCZZAVCNFSM6AAAAABUAUCQ2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRVG43DSNRXGE
.
You are receiving this because you authored the thread.Message ID:
@.***>