text:
Push kak-lsp to crates.io

This will make installing and updating it much less fiddly. For instance I have a few other binaries installed through Cargo and I have a single command set up to automatically fetch updates and recompile only changed projects, but it only works if the projects are installed through crates.io; I'd really rather not have to replicate all that logic manually in my update script.

sounds reasonable, will do soon

I have a single command set up to automatically fetch updates and recompile only changed projects

To be clear that command is just cargo install foo bar that gives you caching for free, right?

@krobelus No, as far as I know that doesn't work. I use a tool called cargo-update (from crates.io); that allows to cargo install-update -a. Such functionality really should be included in base Cargo but it isn't. (And the tool really should allow installing from local repo but it doesn't.)

done

authors: EleanorNB krobelus

repo: kak-lsp/kak-lsp

license: Unlicense


text:
Vertical alignment issue for labels using TeX and subscripts

When there are TeX subscripts in the label text, the legend symbol is too low, making it look weird (tested in R2015a and R2014a, so no HG2 issue):
x = 1:100
figure
plot(x,x)
legend({'f_{oobar}'})
title('legend')

figure
plot(x,x)
legendflex({'f_{oobar}'})
title('legendflex')

Unfortunately, the Latex (and occassionally, plain Tex) renderers don't always play nicely with legendflex.  It's something that bugs me in my own work too, but I've never been able to come up with a good workaround that would position things properly.  The legendflex function repositions everything using the 'Extent' property of all the text in the original legend.  However, the extent property of tex-rendered text doesn't always match up with the actual space taken up by the text... not quite sure why this is, and therefore I don't have a reliable way to calculate what that real space is.
Here's an example using plain text objects:
p = {'horiz', 'center', 'fontsize', 16};

axes('xlim', [0 1], 'ylim', [0 1]);

ht(1) = text(0.5, 0.8, 'f_{oobar}', 'interpreter', 'none', p{:});
ht(2) = text(0.5, 0.5, 'f_{oobar}', 'interpreter', 'tex', p{:});
ht(3) = text(0.5, 0.2, '$f_{oobar}$', 'interpreter', 'latex', p{:});

ex = get(ht, 'extent');
cellfun(@(x) rectangle('position', x, 'edgecolor', 'r'), ex);
line([0 1], [0.2 0.5 0.8]'*ones(1,2));

As you can see, with the Tex renderer (the default in legend and therefore also in legendflex), the Extent doesn't wrap tightly to the text but rather leaves some space at the bottom.  In the legendflex legend, this leads to the text being placed a bit too high relative to the corresponding symbol.
I've tried playing around with automated adjustments (for example, shift text down a pixel or two if subscripts are found), but I haven't found any fixes that work robustly for all possible situations.  Because of this, you really need to play around with properties in order to get a legendflex legend that uses latex or tex and looks decent.  Sometimes generating the legend first specifying 'none' for the Interpreter, then setting the latex/tex rendering afterwards will help a bit.  Other times I generate the legend using a larger font size, then shrink the text back down after it's been positioned (this particularly helps when too-high text is running into the legend box).  More often I just resort to manual tweaks specific to a given example.  In your case, I added a little extra padding to the right, and manually shifted the text down:
x = 1:100
plot(x,x)
[hl, ho] = legendflex({'f_{oobar}'}, 'padding', [2 1 3])
drawnow;
ho(1).Position = ho(1).Position - [0 4 0];

Wow... thank you for the comprehensive answer. At least, I will be able to fix it this way,  to make it look fine.
And also thank you for the amazing function in the first place. I will close the issue then.

I might have come up with a solution that gives ok results:
figure
hold on
plot([0 1],[1 1]);
plot([0 1],[2 0]);
plot([0 1],[0 .5]);

[legend_h,object_h] = legendflex({'$f_{1}$','$\omega^{\pi}$','$\sum x$'},...
    'anchor',{'ne' 'ne'},'xscale',.6,'padding',[2 1 3],'interpreter','latex','fontsize',16);
nrow = 3; %number of rows (hard coded)
textobj = findall(object_h,'type','text'); %legend labels
yheight = legend_h.YLim(2); %height of legend axis
ylow    = textobj(nrow).Extent(2); %lowest label text position
yhigh   = sum(textobj(1).Extent([2 4])); %highest label text position
ydiff   = yheight/2 - .5*(ylow + yhigh); %correction
for kk = 1:length(textobj) %correct
    textobj(kk).Position(2) = textobj(kk).Position(2) + ydiff;
end

This is without correction

This is with correction

I don't know how robust the solution is though...

This will work for R2014a and before. Same trick as @sorenenemark:
textobj = findall(hnew.obj,'type','text'); %legend labels
yheight = get(hnew.leg,'YLim');yheight=yheight(2); %height of legend axis
ylow    = get(textobj(end),'Extent');ylow=ylow(2); %lowest label text position
yhigh   = get(textobj(1),'Extent');yhigh=sum(yhigh([2 4])); %highest label text position
ydiff   = yheight/2 - .5*(ylow + yhigh); %correction
for kk = 1:length(textobj) %correct
    post = get(textobj(kk),'Position');
    set(textobj(kk),'Position',[post(1) post(2)+ydiff post(3)]);
end

I had added a similar fix based on @sorenenemark's suggestions, but then realized that it causes problems when a title is included, along with a few other edge cases.  For now, I've removed the adjustments from the code until I can test a more robust solution.

source: gharchive/issue

authors: ChronoJon TobiasDK kakearney sorenenemark

repo: kakearney/legendflex-pkg

license: mit

license_type: permissive

license_source: bigquery


text:
Unable to setup in Docker

I seem to be getting an error when attempting to copy the requirements.txt and app folder into the container upon building the container. I believe this is an issue with my WORKDIR?
COPY failed: file not found in build context or excluded by .dockerignore: stat requirements.txt: file does not exist

Are you using the master branch or the latest release build?

Thank you for the reply.
I just attempted with the v0.8 release and receive the same error at the point of copying requirements.txt into the container.

authors: ghostyjag kalebbroo

license: MIT

license_source: github-api


text:
Speed up Travis build using cache

For the Android stage: https://medium.com/@bod/cache-your-android-sdk-with-travis-c816b9264708

Not so obvious. Prefer to keep our build method for now.

repo: kalisio/kApp


text:
sync: up goreleaser to v1.21.0

Details are here https://github.com/goreleaser/goreleaser/releases/tag/v1.21.0.

fixed https://github.com/kamilsk/godownloader/releases/tag/v0.1.17

repo: kamilsk/godownloader


text:
update t_Co status

Hi!
I update a t_Co status.
Please check this Pull Request.

@kamykn
If you don't need this pull request, feel free to close it. 🙇

Thank you for your PR!

source: gharchive/pull-request

authors: kamykn kazukazuinaina


text:
Errkit migration 2 (pkg/kopia)

Change Overview
In accordance with decision to migrate to our own errors package (look here https://github.com/kanisterio/kanister/issues/1838), this PR contains migration of pkg/kopia to errkit package.
Further migration PRs are expected.
Pull request type
Please check the type of change your PR introduces:

[ ] :construction: Work in Progress
[ ] :rainbow: Refactoring (no functional changes, no api changes)
[ ] :hamster: Trivial/Minor
[ ] :bug: Bugfix
[ ] :sunflower: Feature
[ ] :world_map: Documentation
[ ] :robot: Test

Issues

fixes #issue-number

Test Plan

[ ] :muscle: Manual
[x] :zap: Unit test
[ ] :green_heart: E2E

@PrasadG193
goimports -w -d -local github.com/kanisterio/kanister

has been applied, so now our packages are properly sorted

repo: kanisterio/kanister


text:
Скласти блок контактної інформації

Посилання на соцмережі (Facebook чи Instagram, тощо), номер телефону чи адреса електронної скриньки, тощо. Може не всі лінки в світі, а тільки ті, що дійсно доречні.

Ryu Hoshi (リュウ Ryū)

https://www.facebook.com/profile.php?id=100004808958030
ryuwins@gmail.com
https://twitter.com/denjinryu
https://www.instagram.com/sworn_ryu/


text:
f/KAS-3431 Vrijgave: automanual

kasticketje
hoofd-pull-request: frontend

Closed in favor of #3 with renamed feature-branch

authors: erikap mdv-professional


text:
[UI] -  หน้า Story

[ ]  ปรับขนาดและความหนาของfontให้เหมาะสม

[ ] Section "สตอรี่อืนๆ" ยังใช้งานไม่ได้

[ ] เปลี่ยนสี hashTag ให้เป็นสีเดียวกัน

@p-nattawadee @Americaso งานนี้ขอภายในวันนี้นะ (02/07/2021)

repo: kaogeek/spanboon


text:
监听不到scroll-x

抱歉。。。没看明白。。。
请脱离业务，实现一个最小化页面demo

如果没有可复现代码，暂时先把问题关闭了。

authors: bigmeow elcarim5efil ishareme

repo: kaola-fed/megalo


text:
graal-sdk 22.0.0.2 has 6 vulnerabilities

The develop branch comes with graal-sdk 22.0.0.2:
mvn dependency:tree -Dincludes=org.graalvm.sdk:graal-sdk

[INFO] com.intuit.karate:karate-core:jar:1.3.0-SNAPSHOT
[INFO] \- org.graalvm.js:js-scriptengine:jar:22.0.0.2:compile
[INFO]    \- org.graalvm.sdk:graal-sdk:jar:22.0.0.2:compile

Snyk reports 6 vulnerabilities for graal-sdk 22.0.0.2:
https://security.snyk.io/package/maven/org.graalvm.sdk:graal-sdk/22.0.0.2

https://nvd.nist.gov/vuln/detail/CVE-2022-21434 Unsafe Reflection
https://nvd.nist.gov/vuln/detail/CVE-2022-21426 Denial of Service (DoS)
https://nvd.nist.gov/vuln/detail/CVE-2022-21443 Denial of Service (DoS)
https://nvd.nist.gov/vuln/detail/CVE-2022-21476 Information Exposure
https://nvd.nist.gov/vuln/detail/CVE-2022-21496 Improper Input Validation
https://nvd.nist.gov/vuln/detail/CVE-2022-21449 Access Restriction Bypass

Please upgrade to a fixed version of Graal.

duplicate of https://github.com/karatelabs/karate/issues/2009 - please comment there

@ptrthomas Hey, I don't think this was a duplicate.
The linked issue (that was fixed in 1.3.0 which was just released) is about migrating to 22.x branch. And this is, indeed, done. The thing is, that the version to which karate was migrated is still vulnerable, and those vulns are rather serious. Those listed by the original author are exactly in version 22.0.0.2 which is right now used in karate-junit5. So instead of closing it as duplicate, it should be fixed by upgrading to 22.1.0.

@lukasz-gosiewski if you read the complete thread, my understanding is that 22.1 requires us to move to Java 11. which is planned in this ticket - https://github.com/karatelabs/karate/issues/2083
you are welcome to contribute a PR to speed up the process

Sure thing, it's not like I wanted to put any pressure there. I just wanted to note that solving the linked issue will not solve this one, which is not obvious to anyone coming from outside.

@lukasz-gosiewski no worries, thanks for calling this out and I guess more people would be interested in this - so the details are clear now
since this sounds more serious than I thought, we will consider creating a java11 branch and releasing a 1.4.0.RC1 sooner - so that at least those with very strict security policies can move ahead

@ptrthomas Sounds perfect, as Snyk is reporting those vulns pretty aggressively. I've tired bumping graalvim manually but it won't work with karate-junit5 due to the compatibility issues (most probably the same that requires you to bump to java 11)

@lukasz-gosiewski one more thing, I was able to force-upgrade graal on one of my side-projects (and using junit5) so here's the pom for reference: https://github.com/ptrthomas/karate-oas-demo/blob/ac08c940888c9eca652eed3725320eff0352ad21/pom.xml#L20-L31

@ptrthomas I can't validate a thing built from source against our Snyk setup, but I have validated your way of enforcing graalvm dependencies and it works perfectly fine. Clears all the issues from Snyk and a dependency tree looks fine. Do you need me to validate anything more?

@lukasz-gosiewski great. and I was able to make a release to maven central. it has been a few minutes, so should be ready now.
decided to take this opportunity to test the whole release github action, docker and all. version is 1.4.0.RC1 - do let me know how it goes !

My system runs with Karate 1.3.0, Java 11 and Graal 22.1.0.1 (and Quarkus 2.11.3.Final)
Previously it didn't work if I upgraded Graal to 22.2.0 (which is what Quarkus needs in 2.12-2.14)
However, I just tested with Karate 1.4.0.RC1, Java 11 and Graal 22.2.0.1 (and Quarkus 2.14.0.Final) and it appears to work. I will continue to test with this combination. It is now Quarkus that is behind as I cannot upgrade to Graal 22.3.0 yet, but downgrading Graal doesn't appear to be an issue. This is a great step forwards and also reduces the number of vulnerabilities I have to analyze. The remaining ones brought in by Karate appear to be related to

org.yaml.snakeyaml-1.32
armeria-1.18.0
netty-tcnative-boringssl-static-2.0.54.Final-osx-x86_64.jar
However, I've superseded the first and don't use the vulnerable aspects of the others.

Thanks for releasing 1.4.0.RC1

@ptrthomas I just migrated to 1.4.0.RC1 and it works perfect. That was a really fast reaction, thank you!

thanks @edwardsph and @lukasz-gosiewski for the feedback !

an update for anyone landing here, we don't support the GraalVM which someone attempted here: https://github.com/karatelabs/karate/issues/2243
I guess the only option in this case is to use a separate maven project (or profile) to run your tests. unless anyone has better ideas cc @droger88

1.4.0 released

authors: edwardsph julianladisch lukasz-gosiewski ptrthomas

repo: karatelabs/karate


text:
Govendor fetch doesn't take "tree":true value when updating dependencies.

I have the following dependency:
{
"origin": "enterprisegithub/account/project.git",
"path": "enterprisegithub/account/project",
"tree": true
}
when I want to update it: govendor fetch enterprisegithub/account/project
it doesn't update subfolders, even though I have set "tree":true
I need to add the -tree parameter again in the command to update all subfolders as well:
govendor fetch -tree enterprisegithub/account/project
Thanks.

Can you try govendor fetch enterprisegithub/account/project/^ ?

It worked like that.
Thanks.

authors: antoniomtz kardianos

repo: kardianos/govendor


text:
[MOB-3438] login with credentials

JIRA
MOB-3438
DESCRIPTION
[Create a description of what you have changed in this branch]
Types of changes
What types of changes does your code introduce to the project?
Put an x in the boxes that apply

[ ] Bugfix
[ ] New feature
[ ] Tech Debt
[ ] Breaking change
[ ] Documentation Update
[ ] Other: define what type of change it is

CHECKLIST
Put an x in the boxes that apply. You can also fill these out after creating the PR. This is simply a reminder of what we are going to look for before merging code.
Please review the guidelines for contributing to this repository.

[x] All work relating to the ticket is complete (Code complete/Acceptance Criteria met)
[x] Lint and unit tests pass locally (if appropriate)
[ ] Added tests that prove the fix is effective or that feature works (if appropriate)
[ ] Documentation (if appropriate)

SCREENSHOTS
[Add screenshots if any for changes you have made to the App/UI]

ignore circle CI failing on this. Best to run tests locally if you want to see if it passes.
Seems like CircleCI is having an issue trying to clone the repo even though this repo is open-source. (Failing on public SSH key)

repo: karhoo/karhoo-ios-sdk


text:
Exception: The specified projection name 'Mercator_Auxiliary_Sphere' could not be found

Hello.  I'm very excited about this project.  It's what the World needs now.  I'm just getting started but have hit an error pretty early.  I'm trying to load this projection: http://spatialreference.org/ref/sr-org/6928/
I've tried a few different ways as prescribed by the documentation, but pretty consistently get this exception:
Traceback (most recent call last):   File "/home/pat/.PyCharm2018.3/config/scratches/pycrs_test_1.py", line 58, in <module>     """)   File "/home/pat/sandbox/pycrs-test/venv/lib/python3.6/site-packages/pycrs/parse.py", line 92, in from_ogc_wkt     return _from_wkt(string, "ogc", strict)   File "/home/pat/sandbox/pycrs-test/venv/lib/python3.6/site-packages/pycrs/parse.py", line 406, in _from_wkt     crs = _parse_top(header, content)   File "/home/pat/sandbox/pycrs-test/venv/lib/python3.6/site-packages/pycrs/parse.py", line 294, in _parse_top     raise Exception("The specified projection name %r could not be found" % projname) Exception: The specified projection name 'Mercator_Auxiliary_Sphere' could not be found
I've tried loading it from the a shapefile using pycrs.load.from_file and below I've included attempts using the ESRI WKT and OGC WKT directly:
crs = pycrs.parse.from_esri_wkt(""" PROJCS[     "WGS_1984_Web_Mercator_Auxiliary_Sphere",     GEOGCS[         "GCS_WGS_1984",         DATUM[             "D_WGS_1984",             SPHEROID["WGS_1984",6378137.0,298.257223563]         ],         PRIMEM[             "Greenwich",0.0],             UNIT["Degree",0.017453292519943295]         ],         PROJECTION[             "Mercator_Auxiliary_Sphere"         ],         PARAMETER["False_Easting",0.0],         PARAMETER["False_Northing",0.0],         PARAMETER["Central_Meridian",0.0],         PARAMETER["Standard_Parallel_1",0.0],         PARAMETER["Auxiliary_Sphere_Type",0.0],         UNIT["Meter",1.0] ] """)
crs = pycrs.parse.from_ogc_wkt(""" PROJCS[     "WGS_1984_Web_Mercator_Auxiliary_Sphere",     GEOGCS[     "GCS_WGS_1984",     DATUM[         "D_WGS_1984",         SPHEROID["WGS_1984",6378137.0,298.257223563]     ],     PRIMEM["Greenwich",0.0],     UNIT["Degree",0.0174532925199433]],     PROJECTION["Mercator_Auxiliary_Sphere"],     PARAMETER["False_Easting",0.0],     PARAMETER["False_Northing",0.0],     PARAMETER["Central_Meridian",0.0],     PARAMETER["Standard_Parallel_1",0.0],     PARAMETER["Auxiliary_Sphere_Type",0.0],     UNIT["Meter",1.0],     AUTHORITY["ESRI","102100"] ] """)
It seems to not like GEOCS.PROJECTION ("Mercator_Auxiliary_Sphere"), but I'm not sure how to work around it.  Please let me know if I can provide additional information.
Thank you again.  This is great!

Glad to hear you're finding it useful!
This issue arises because the Mercator_Auxiliary_Sphere projection has not yet been added/supported. Adding it would be as easy as finding the equivalent names for OGC WKT, ESRI WKT, and proj4 and adding a new class to pycrs.elements.projections. The WKT ones are fine, but I cannot seem to find the equivalent proj4 representation. Eg in the link you posted the proj4 link is just empty.
It would be possible adding it withtout the proj4 representation, which simply would mean you would get an error when converting to proj4. However, it seems the use of the projection actually carries with it some implications that change the values of other parameters, plus adding a special "Auxiliar_Sphere_Type" parameter. Here is a relevant link that seems to discuss some of the implications of this projection: https://trac.osgeo.org/gdal/ticket/3962
Because of these additional implications, I don't want to support it until we fully understand the projection and if we need to add code that changes other parameters. I don't have time to explore it right now, but hopefully we'll get this sorted out at some point (help much appreciated).

Just giving this a bump because I ran into this very issue just now:
crs = pycrs.load.from_url('https://spatialreference.org/ref/sr-org/7262/ogcwkt/')
Traceback (most recent call last):
  File "/Users/may/anaconda/envs/eagle-i/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-51-ecddadeec1de>", line 1, in <module>
    crs = pycrs.load.from_url('https://spatialreference.org/ref/sr-org/7262/ogcwkt/')
  File "/Users/may/anaconda/envs/eagle-i/lib/python3.6/site-packages/pycrs/load.py", line 53, in from_url
    crs = func(string)
  File "/Users/may/anaconda/envs/eagle-i/lib/python3.6/site-packages/pycrs/parse.py", line 755, in from_unknown_text
    crs = from_unknown_wkt(text, strict)
  File "/Users/may/anaconda/envs/eagle-i/lib/python3.6/site-packages/pycrs/parse.py", line 132, in from_unknown_wkt
    return _from_wkt(string, None, strict)
  File "/Users/may/anaconda/envs/eagle-i/lib/python3.6/site-packages/pycrs/parse.py", line 415, in _from_wkt
    crs = _parse_top(header, content)
  File "/Users/may/anaconda/envs/eagle-i/lib/python3.6/site-packages/pycrs/parse.py", line 303, in _parse_top
    raise NotImplementedError("Unsupported projection: The specified projection name %r could not be found in the list of supported projections" % projname)
NotImplementedError: Unsupported projection: The specified projection name 'Mercator_Auxiliary_Sphere' could not be found in the list of supported projections

I would need some more insight and feedback on the implication in terms of this projection altering the values of other parameters, and whether it has a proj4 equivalent. See my previous post. Hopefully someone knowledgeable on the topic will be able to help.

If you'd be able to look into the PyProj code for this, a PR would be greatly appreciated :)

I am running into the same NotImplementedError: Unsupported projection: The specified projection name 'Mercator_Auxiliary_Sphere' could not be found in the list of supported projections

Since this issue keeps coming up, I would really like to fix this one. I nevertheless still don't know the right answer here, so would need someone that could do a deep dive into this.
Here's another link that may be relevant: https://gis.stackexchange.com/questions/61823/ogr-projection-transformation-error
Based on my rudimentary reading of web mercator, it is essentially just a mercator projection where in addition the ellipsoid is a perfectly round sphere, ie no flattening factor. So if this is correct, we might be able to parse it by simply setting the projection to mercator, while also somehow forcing the WKT spheroid flattening factor to 0 or setting proj4 +a and +b to the same (which seems to be the case for https://spatialreference.org/ref/sr-org/45/).
Based on the gdal issue tracker referenced earlier, this might not be sufficient, as the projection formula itself might need to be told to use a spherical instead of ellipsoidal forumal. It seems that ESRI WKT does this when using 'Mercator_Auxiliary_Sphere', but that OGC WKT lacks this projection, and might need to be set to 'Mercator_1SP' plus maybe some other parameters...
I'm hoping someone can confirm or refute any of this, but unless I hear anything else, I might consider just implementing that along with raising a warning.

authors: giswqs karimbahgat patdaburu piprrr

repo: karimbahgat/PyCRS


text:
🛑 DIAN is down

In 83567c6, DIAN (https://www.dian.gov.co) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DIAN is back up in 9aa1405 after 20 minutes.


text:
Unmaintained and vulnerable dependency

karma@4.4.1 has a dependency on optimist which is no longer maintained and has a child dependency of minimist@0.0.10. Minimist is has a known vulnerability prior to version 1.2.2 that allows adding and modifying properties of Object.prototype.
https://nvd.nist.gov/vuln/detail/CVE-2020-7598
It appears that some work has been started on this in #2473.

Please fix it as soon as possible or give any alternative so that it doesn't produce security errors.

any update on this??

If this is important for you, please send a pull request.  Since karma is a test engine and not part of a online product the risk of prototype injection is very low.   That said it would be great to see these fixed.

It is quite important as security scans started showing vulnerabilities in projects that use karma. The security team will allow exception here as this is a package required for tests only but It makes the release process very painful.

If this is important for you, please send a pull request.

Would be fixed by #3451

Hey folks! Is there any other workaround to handle this vulnerability whilst the PR is merged?

Very happy to see the fix looks merged now. Is there a rough idea of when it would make it into a release?

I'm really glad to see that this is already completed, I'll keep an eye out for the next release. Good work everyone!

authors: Ionaru andyrooger chillheart codesandtags colbyhill21 jarrodek johnjbarton sozakir tusharcatalyst

repo: karma-runner/karma


text:
cigstation powerpack meme generator

add meme text overlay on cigstation powerpack nft images
bottom text
-shrimp

another big dub by @Cryptocojak

authors: Cryptocojak karpapy

repo: karpapy/cignetsysx


text:
How do I add my own prompt

I found that the result will be output directly after running ./run out/model.bin, I want to know how I can add my own prompt

JANK SOLUTION 1
I added these code blocks, It only inferences one prompt at a time. And after retraining on Alpha-CoT (it is a poo poo dataset) my results are pretty incoherent. What data set would you retrain on?
// 'checkpoint' and 'input_sequence' are necessary args
    if (argc < 3) {
        printf("Usage: %s <checkpoint_file> <input_sequence> [temperature] [seed]\n", argv[0]);
        return 1;
    }
    checkpoint = argv[1];
    char *input_sequence_str = argv[2];
    // temperature is optional
    if (argc >= 4) {
        temperature = atof(argv[3]);
    }
    // seed is optional
    if (argc >= 5) {
        unsigned int seed = atoi(argv[4]);
        srand(seed);
    } else {
        time_t current_time;
        time(&current_time);
        srand((unsigned int)current_time);
    }

    // call Python script to tokenize input sequence
    char command[2048];  // make sure this is large enough
    sprintf(command, "python pretokenize.py \"%s\"", input_sequence_str);
    FILE *pipe = popen(command, "r");
    if (!pipe) {
        printf("Unable to open pipe!");
        return 1;
    }

    // read tokenized input sequence from pipe
    int input_sequence[MAX_INPUT_LENGTH];
    int input_length = 0;
    while (fscanf(pipe, "%d", &input_sequence[input_length]) == 1) {
        input_length++;

    }
    //printf("input_length: %d", input_length);
    pclose(pipe);

Then to init the model state
// initialize the model's state with the input sequence
    int next;
    int pos = 0;

    for (int i = 0; i < input_length; i++) {
        transformer(input_sequence[i], pos, &config, &state, &weights);
        pos++;
        next = input_sequence[i];  // add this line

    }

    // start generating the output sequence after the input sequence
    while (pos < config.seq_len) {

        // forward the transformer to get logits for the next token
        transformer(next, pos, &config, &state, &weights);

Then I changed the run wrap file to work with input sequences. There isn't a run_wrap file anymore Im not sure how they are decoding the tokens. If you make this better please let me know.

卡顿解决方案 1
我添加了这些代码块，它一次只推断一个提示。在 Alpha-CoT（它是便便数据集）上重新训练后，我的结果非常不连贯。您将使用什么数据集进行重新训练？
// 'checkpoint' and 'input_sequence' are necessary args
    if (argc < 3) {
        printf("Usage: %s <checkpoint_file> <input_sequence> [temperature] [seed]\n", argv[0]);
        return 1;
    }
    checkpoint = argv[1];
    char *input_sequence_str = argv[2];
    // temperature is optional
    if (argc >= 4) {
        temperature = atof(argv[3]);
    }
    // seed is optional
    if (argc >= 5) {
        unsigned int seed = atoi(argv[4]);
        srand(seed);
    } else {
        time_t current_time;
        time(&current_time);
        srand((unsigned int)current_time);
    }

    // call Python script to tokenize input sequence
    char command[2048];  // make sure this is large enough
    sprintf(command, "python pretokenize.py \"%s\"", input_sequence_str);
    FILE *pipe = popen(command, "r");
    if (!pipe) {
        printf("Unable to open pipe!");
        return 1;
    }

    // read tokenized input sequence from pipe
    int input_sequence[MAX_INPUT_LENGTH];
    int input_length = 0;
    while (fscanf(pipe, "%d", &input_sequence[input_length]) == 1) {
        input_length++;

    }
    //printf("input_length: %d", input_length);
    pclose(pipe);

然后初始化模型状态
// initialize the model's state with the input sequence
    int next;
    int pos = 0;

    for (int i = 0; i < input_length; i++) {
        transformer(input_sequence[i], pos, &config, &state, &weights);
        pos++;
        next = input_sequence[i];  // add this line

    }

    // start generating the output sequence after the input sequence
    while (pos < config.seq_len) {

        // forward the transformer to get logits for the next token
        transformer(next, pos, &config, &state, &weights);

然后我更改了运行包装文件以处理输入序列。不再有 run_wrap 文件我不确定他们如何解码令牌。如果你能做得更好，请告诉我。
编辑：这可能效果更好 #62（评论）

I don't have custom dataset, I want ti use open model to run directly. Your code is amazing, I will try it if it's merged

Now it supports prompt. Added on this commit
Usage details on the README

authors: StudyingLover kroggen xiscoding


text:
add class method support

Not sure if contributions are welcome but this is something I've found useful. Also not sure on your code style. Have enjoyed using the library but this has been a confusing sticking point that class methods weren't supported.

Also, can probably guarantee it can be improved, this is just POC

@ni3t hey, glad you're liking the gem!
I haven't really considered class methods before, that hasn't been a use case that's come up for me. The conceptual model is quite focused on passing an instance as the first argument to the job. Can you make a sample that demonstrates the kind of class method you're doing, just to see one?

Thanks @kaspth!
Our primary use case is to put class-level jobs onto the model.
For instance, imagine we want to run a cron job nightly to send emails to customers when invoices are overdue, and we also want to record the last time a reminder was sent for tracking purposes. Generally I like to run a "job that creates jobs" pattern for batch actions.
It's not too hard to write a job to handle this:
class SendOverdueInvoicesJob < ApplicationJob
  def perform
    Invoice.overdue.find_each(&:send_reminder_later)
  end
end

class Invoice
  extend ActiveJob::Performs

  scope :overdue, -> { where(due_date: ..Date.today, status: "open") }

  performs :send_reminder
  def send_reminder
    transaction do
      InvoiceMailer.reminder(self).deliver_later
      update(reminded_at: Time.zone.now)
    end
  end
end

SendOverdueInvoicesJob.perform_later

The equivalent example using ActiveJob::Performs would be something like this:
class Invoice
  # brevity, above

  performs :batch_send_reminders #recognizes class method
  def self.batch_send_reminders
    overdue.find_each(&:send_reminder_later)
  end
end

Invoice.batch_send_reminders_later

I've just found it simpler and more domain-driven to call the method directly on the model rather than calling the job. To me, the usage of ActiveJob is just an implementation detail here.
Will look into spec failures and fix as well.

@ni3t I'm really this one keeps getting away from me! I think we could call the method class_performs, but reading your code again I wonder if we should just support batching automatically?
So in your example you've got performs :send_reminder, we could add a class method called send_reminder_later which would automatically run find_each(&:send_reminder_later) when you do Invoice.overdue.send_reminder_later.
And maybe we could somehow have a version that could Active Job's new perform_all_later under the hood? Maybe depending whether the code has already been batched via in_batches or just have a separate perform_all_send_reminder_later?

@ni3t hey! In https://github.com/kaspth/active_job-performs/pull/5 I just shipped an automatic bulk method if ActiveJob.perform_all_later is defined, which is coming in Rails 7.1, to enqueue many jobs at once.
I'm also trying out an idea around automating these kinds of "scheduler" jobs like your SendOverdueInvoicesJob. I'm still not sure what the API is going to be but maybe something like this?
class Invoice
  performs :deliver_reminder, schedule_with: -> { overdue } # One-liner
  schedules_performs_of :deliver_reminder, with: -> { overdue }
end

Invoice.scheduled_performs.deliver_reminder # Maybe this is how you call it?

I'm still not sold on schedule as the language, partly because it sounds like it's related to setting wait/wait_until, maybe something like Enqueuer/Stager is more accurate?
I might not have much time to look into this next week, but I think there's something here to help make automatic!

@kaspth hey back!
We use the Sidekiq Scheduler for scheduling these recurring jobs, which to me, seems much more like a queue-specific responsibility.
The thing I'd love to see (which may not even be active_job-performs relevant) would be something like this:
class Invoice
  performs_regularly :send_overdue_reminder, -> { overdue }, schedule: { every: 1.day, at:  Time.zone.midnight }
end

I like this interface because the second argument being a proc is similar to AR relation.
The challenge is this becomes something that ARP needs to now know scheduling and be timezone aware, which could be pretty domain specific.
I'll think more about this over the holiday.

Yeah, I definitely don't want to get in the business of managing schedules, if we put everything in the model we'd also need to eager load in development to test those jobs.
Here's closer to what I'm thinking, where we place how to generate the job in the schedule file, so it's all grouped there and easier to change.
every 1.day, at: "12:00am" do
  ActiveJob::Stage.fanout Invoice, -> { overdue }, :deliver_reminder_later_bulk # Not sure how to validate uniqueness on class and method name!
end

class ActiveJob::Stage < Data.define(:klass, :method)
  class FanoutJob < ApplicationJob
    def perform(klass, method)
      ActiveJob::Stage.new(klass, method).perform
    end
  end

  singleton_class.attr_reader :scopes
  @scopes = {}

  def self.fanout(klass, scope, method)
    scopes.store [klass.name, method], scope # Procs can't be serialized so we need to stash it in memory.
    FanoutJob.perform_later klass, method
  end

  def perform
    klass.class_exec(&scope).in_batches.each(&method)
  end

  private def scope = self.class.scopes.fetch [klass.name, method] # Using klass.name to guard against constant reloads in development, but may not be needed!
end

I haven't tested this and there's potential issues between versions of your app. E.g. you enqueue a stage job, you deploy and something changed, will this somehow break? I'm not sure, and I can't think of reason for it right now.

@ni3t forgot to update you on here, but with #5 you can now write your code like this when you're on Rails 7.1:
class Invoice
  scope :overdue, -> { where(due_date: ..Date.today, status: "open") }

  def self.schedule_reminders = overdue.in_batches(of: 100).each(&:send_reminder_later_bulk)

  performs :send_reminder # Also adds a send_reminder_later_bulk class method that uses Rails 7.1's ActiveJob.perform_all_later
  def send_reminder
    transaction do
      InvoiceMailer.reminder(self).deliver_later
      update(reminded_at: Time.zone.now)
    end
  end
end

I'm releasing a new version with this feature soon.

This is out in v0.3.0 now https://github.com/kaspth/active_job-performs/releases/tag/v0.3.0


text:
agent: allow multiple waitProcess()

There will be multiple waitProcess() requests
issued before process exits, and all those requests
should be fulfilled.
Fixes: #129
Fixes: #333
Signed-off-by: fupan lifupan@gmail.com

Hi @lifupan - the changes make sense but it would be great if you could add some unit tests to assert the correct behaviour for:

a single call to waitProcess().
multiple calls to waitProcess().

Hi  @jodh-intel  - NP, I'll add the unit tests and resend this PR.
Thanks
Fupan

Hi @jodh-intel
After discussed with @bergwolf , I decided to drop this complex fix which involved so many locks and syncs between goroutines and use a simple way to fix it. I'll resend this PR later.

Hi @lifupan - ok - thanks for the update! Do you want to close this PR then?

Hi @jodh-intel
I can close this PR now and resend another one.
Fupan

authors: jodh-intel lifupan

repo: kata-containers/agent


text:
Backport: device: Ease device access for rootfs device to allow node creation

For docker in docker scenario, the nested container created
has entry "b : m" in the list of devices it is allowed to access
under /sys/fs/cgroup/devices/docker/{ctrid}/devices.list.
This entry was causing issues while starting a nested container
as we were denying "m" access to the rootfs block devices.
With this change we add back "m" access, the container would be
allowed to create a device node for the rootfs device but will
not have read-write access to the created device node.
This fixes the docker in docker use case while still making sure
the container is not allowed read/write access to the rootfs.
Note, this could also be fixed by simply skipping {"Type : "b"}
while creating the device cgroup with libcontainer.
But this seems to be undocumented behaviour at this point,
hence refrained from taking this approach.
Fixes #806
Signed-off-by: Archana Shinde archana.m.shinde@intel.com
(cherry picked from commit 5dc7ae4bebe5413e957bb52387a13fcaa0c6a6e5)

/test-ubuntu


text:
kata with cri-o and flannel: pod stuck in container create state

Description of problem
I am testing kata-containers using cri-o where I see pods are getting stuck in container create state. My setup is as follows:

Ubuntu 18.04 nodes on GCP with nested virtualization enabled
k8s 1.15.3
Flannel for networking using IP forwarding on nodes

Expected result
As a comparison I ran the same pods using gVisor/runsc and runc and both these cases worked fine on the same setup. kata-runtime kata-check and a simple podman --runtime=/usr/bin/kata-runtime run --net=host ... check are also working fine.
I expected kata-runtime based pod deployment to work similar to runc and runsc.
Actual result
kubectl describe has following information:
Events:
  Type     Reason                  Age                  From                  Message
  ----     ------                  ----                 ----                  -------
  Normal   Scheduled               17m                  default-scheduler     Successfully assigned default/ping-pong-kata-server-deployment-65d878cd44-qcw8m to ubuntu-xpzc
  Warning  FailedCreatePodSandBox  16m                  kubelet, ubuntu-xpzc  Failed create pod sandbox: rpc error: code = Unknown desc = container create failed:
  Warning  FailedCreatePodSandBox  12m                  kubelet, ubuntu-xpzc  Failed create pod sandbox: rpc error: code = Unknown desc = container create failed: mkdir /var/lib/vc/sbs/f1a974521c23bbdb241e606500a545b15f7cc307d86b0fe18750b800f66694f9: cannot allocate memory
  Warning  FailedCreatePodSandBox  11m                  kubelet, ubuntu-xpzc  Failed create pod sandbox: rpc error: code = Unknown desc = container create failed: failed to create namespace: too many open files in system
  Warning  FailedCreatePodSandBox  10m (x2 over 12m)    kubelet, ubuntu-xpzc  Failed create pod sandbox: rpc error: code = Unknown desc = container create failed: Failed to check if grpc server is working: rpc error: code = Unavailable desc = transport is closing
  Warning  FailedCreatePodSandBox  2m4s (x40 over 17m)  kubelet, ubuntu-xpzc  Failed create pod sandbox: rpc error: code = Unknown desc = error reading container (probably exited) json message: EOF

Also attaching output of kata-collect-data.sh from the node where this pod was being scheduled.
kata-collect-data.log

/cc @amshinde @ganeshmaharaj @devimc

@sdeoras The kubectl describe output shows that you ran out of memory.
Is this a stress test that you are running with large number of pods.
Also, the line failed to create namespace: too many open files in system indicates that you ran out of number of allowed open files on the system. You should increase this limit with something like sysctl -w fs.file-max=100000

@amshinde Nope, this is not a stress test at all. It is a simple server-client communication check over gRPC. All it does is send ping-pong messages between client and server. For reference I have been evaluating the same with gVisor (and of course with runc) and both are fine.
I ran into a different issue with gVisor, but eventually things are working fine: https://github.com/google/gvisor/issues/807
I had also tried working with larger nodes (4 cores and more memory) but that did not help.

authors: amshinde grahamwhaley sdeoras

repo: kata-containers/runtime


text:
rootfs propagation kata qemu-kvm will stuck

Description of problem
On Fedora 32,
# podman --runtime /usr/bin/kata-runtime run -v /opt:/opt:rshared fedora ls
<hang>

Should be reproducible with docker too.
# ps aux | grep qemu
root       60653  5.1  1.0 2596160 332912 ?      Sl   09:24   0:03 /usr/libexec/qemu-kvm -name sandbox-401a96116c94d2b4df2832ce23893e306e0809d8d915592afd5f4ffb505ac611 -uuid 5b06595a-0854-4041-9b3b-70b057c92a98 -machine q35,accel=kvm,kernel_irqchip -cpu host -qmp unix:/run/vc/vm/401a96116c94d2b4df2832ce23893e306e0809d8d915592afd5f4ffb505ac611/qmp.sock,server,nowait -m 2048M,slots=10,maxmem=32978M -device pci-bridge,bus=pcie.0,id=pci-bridge-0,chassis_nr=1,shpc=on,addr=2,romfile= -device virtio-serial-pci,disable-modern=false,id=serial0,romfile= -device virtconsole,chardev=charconsole0,id=console0 -chardev socket,id=charconsole0,path=/run/vc/vm/401a96116c94d2b4df2832ce23893e306e0809d8d915592afd5f4ffb505ac611/console.sock,server,nowait -device virtio-scsi-pci,id=scsi0,disable-modern=false,romfile= -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0,romfile= -device vhost-vsock-pci,disable-modern=false,vhostfd=3,id=vsock-3023241061,guest-cid=3023241061,romfile= -chardev socket,id=char-903a7a66470e8356,path=/run/vc/vm/401a96116c94d2b4df2832ce23893e306e0809d8d915592afd5f4ffb505ac611/vhost-fs.sock -device vhost-user-fs-pci,chardev=char-903a7a66470e8356,tag=kataShared,romfile= -netdev tap,id=network-0,vhost=on,vhostfds=4,fds=5 -device driver=virtio-net-pci,netdev=network-0,mac=d6:28:19:1f:96:87,disable-modern=false,mq=on,vectors=4,romfile= -global kvm-pit.lost_tick_policy=discard -vga none -no-user-config -nodefaults -nographic -daemonize -object memory-backend-file,id=dimm1,size=2048M,mem-path=/dev/shm,share=on -numa node,memdev=dimm1 -kernel /usr/lib/modules/4.18.0-193.el8.x86_64/vmlinuz -initrd /var/cache/kata-containers/osbuilder-images/4.18.0-193.el8.x86_64/fedora-kata-4.18.0-193.el8.x86_64.initrd -append tsc=reliable no_timer_check rcupdate.rcu_expedited=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1 noreplace-smp reboot=k console=hvc0 console=hvc1 iommu=off cryptomgr.notests net.ifnames=0 pci=lastbus=0 quiet panic=1 nr_cpus=24 agent.use_vsock=true scsi_mod.scan=none -pidfile /run/vc/vm/401a96116c94d2b4df2832ce23893e306e0809d8d915592afd5f4ffb505ac611/pid -smp 1,cores=1,threads=1,sockets=24,maxcpus=24

This can also be reproduced without podman by only using kata-runtime,
# curl -O https://raw.githubusercontent.com/cailca/linux-mm/master/runc.sh
# yum -y install jq tar
# ./runc.sh kata-runtime

Everything will pass using "runc" instead of "kata-runtime". It is basically by adding rootfsPropagation = "shared" to the config.json will trigger it.
Expected result
No hang.

Thanks for reporting. Please enable full debug and paste in the information requested in the issue template so we can understand a little better what's going on here.

Where is the issue template? It is not there when opening a new issue. Anyway, here is the full debug,
kata-hung.txt

uhmmm looks like you are using a custom kernel ... ? :thinking:
/sys/fs/cgroup/cpuset/cpuset.cpus: no such file or directory

F32 is on cgroup v2, so might not have that file. However, I also tried cgroup v1, and the same issue -- hang.

Another point is when this hang happens, I can see that kata-runtime has already mounted the bind mounts from config.json.
# mount
...
/dev/mapper/fedora_hpe--dl380pgen8--01-root on /run/kata-containers/shared/sandboxes/root/root/rootfs type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=256k,sunit=512,swidth=512,noquota)
/dev/mapper/fedora_hpe--dl380pgen8--01-root on /run/kata-containers/shared/sandboxes/root/root-34b7f18502c970cd-rshared type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=256k,sunit=512,swidth=512,noquota)
/dev/mapper/fedora_hpe--dl380pgen8--01-root on /run/kata-containers/shared/sandboxes/root/root-f85cf35a2cbc472a-rslave type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=256k,sunit=512,swidth=512,noquota)
/dev/mapper/fedora_hpe--dl380pgen8--01-root on /run/kata-containers/shared/sandboxes/root/root-afaf5450064d6e06-rprivate type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=256k,sunit=512,swidth=512,noquota)

I meant, are you using a custom kernel for the kata container? If you install kata from here https://github.com/kata-containers/runtime/releases/ it should work

I don't think so until Fedora did some magic behind my back. It is just a fresh-installed F32. All I do is,
# yum install kata-runtime
and then get the ubuntu image for rootfs to test.

BTW, I saw this in "ps aux" output when it hangs, so it looks like it just use the stock F32 kernel.
-kernel /usr/lib/modules/5.6.14-300.fc32.x86_64/vmlinuz -initrd /var/cache/kata-containers/osbuilder-images/5.6.14-300.fc32.x86_64/fedora-kata-5.6.14-300.fc32.x86_64.initrd
Full output,
# ps aux | grep kata
root       18932  0.1  0.9 2435320 322252 ?      Sl   08:43   0:03 /usr/bin/qemu-system-x86_64 -machine accel=kvm -name sandbox-root -uuid 2cb2a39e-b991-41bb-84a4-0d35fbf59a7a -machine q35,accel=kvm,kernel_irqchip -cpu host -qmp unix:/run/vc/vm/root/qmp.sock,server,nowait -m 2048M,slots=10,maxmem=33133M -device pci-bridge,bus=pcie.0,id=pci-bridge-0,chassis_nr=1,shpc=on,addr=2,romfile= -device virtio-serial-pci,disable-modern=false,id=serial0,romfile= -device virtconsole,chardev=charconsole0,id=console0 -chardev socket,id=charconsole0,path=/run/vc/vm/root/console.sock,server,nowait -device virtio-scsi-pci,id=scsi0,disable-modern=false,romfile= -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0,romfile= -device vhost-vsock-pci,disable-modern=false,vhostfd=3,id=vsock-89569667,guest-cid=89569667,romfile= -chardev socket,id=char-7b724abaf4e0dd54,path=/run/vc/vm/root/vhost-fs.sock -device vhost-user-fs-pci,chardev=char-7b724abaf4e0dd54,tag=kataShared,romfile= -global kvm-pit.lost_tick_policy=discard -vga none -no-user-config -nodefaults -nographic -daemonize -object memory-backend-file,id=dimm1,size=2048M,mem-path=/dev/shm,share=on -numa node,memdev=dimm1 -kernel /usr/lib/modules/5.6.14-300.fc32.x86_64/vmlinuz -initrd /var/cache/kata-containers/osbuilder-images/5.6.14-300.fc32.x86_64/fedora-kata-5.6.14-300.fc32.x86_64.initrd -append tsc=reliable no_timer_check rcupdate.rcu_expedited=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1 noreplace-smp reboot=k console=hvc0 console=hvc1 iommu=off cryptomgr.notests net.ifnames=0 pci=lastbus=0 debug panic=1 nr_cpus=16 agent.use_vsock=true scsi_mod.scan=none agent.log=debug agent.log=debug initcall_debug -pidfile /run/vc/vm/root/pid -D /run/vc/vm/root/qemu.log -smp 1,cores=1,threads=1,sockets=16,maxcpus=16
root       19077  0.0  0.0 1312152 16944 pts/0   Sl   08:43   0:00 /usr/libexec/kata-containers/kata-shim -agent vsock://89569667:1024 -container root -exec-id root -log debug -agent-logs-socket /run/vc/vm/root/console.sock

cc @crobinso @c3d  @fidencio  who may know what's going on

@cailca - good question! I've just checked and it seems you clicked "new issue" from https://github.com/kata-containers/runtime/issues. However, that gives a slightly different template from the one shown if you'd jumped straight to https://github.com/kata-containers/runtime/issues/new.
Anyhow, we've just merge https://github.com/kata-containers/.github/pull/8 so that problem should now have disappeared :smile: (and thanks @devimc ;)

Ah, I probably missed that, but here is kata-collect-data.sh output.
kata-data.txt
Another data point is since qemu run with "-D /run/vc/vm/root/qemu.log", but in this case,
# cat /run/vc/vm/root/qemu.log
qemu-system-x86_64: Failed to read from slave.

@devimc, thanks for pointing this one to our direction.
@cailca, I'll dig into this Tomorrow and try to reproduce the issue.
I'll start playing with this using Fedora 32 + virtio-fs. I'd say while 9p is still alive, we're hoping we can just forget about its existence in a short period of time.

Here is the config.json that should make it even easier to reproduce.
config.json.txt

I can reproduce here, though I did not activate full logs yet. I tried moving to some other directory than /opt (used /tmp/test which I had just created), same. So the recursive aspect of rshared does not matter IMO.
I see this:
time="2020-05-27T17:01:03+02:00" level=debug msg="Starting container 03352feaac11f2839d894c8fc5471e67b2cb0782e220245a3a41779ea112788d with command [ls]"

That's in conmon. This never returns, i.e. kata-runtime start does not terminate. This seems consistent with the observation that this can be reproduced with kata-runtime.
In your logs, I see this:
time="2020-05-27T08:43:37.293039369-04:00" level=error msg="Failed to start container" arch=amd64 command=run container=root error="rpc error: code = FailedPrecondition desc = Container root status stopped, should be created" name=kata-runtime pid=18911 sandbox=root source=virtcontainers subsystem=container

Moving back we have
May 27 08:43:33 hpe-dl380pgen8-01 kata-runtime[18727]: time="2020-05-27T08:43:33.273725806-04:00" level=debug msg="Setting container state from running to stopped" arch=amd64 command=run container=root name=kata-runtime pid=18727 sandbox=root source=virtcontainers subsystem=container

and an earlier one
May 27 08:42:57 hpe-dl380pgen8-01 kata-runtime[17073]: time="2020-05-27T08:42:57.858025685-04:00" level=debug msg="reading guest console" arch=amd64 command=run container=root name=kata-runtime pid=17073 sandbox=root source=virtcontainers subsystem=kata_agent vmconsole="time=\"2020-05-27T12:42:57.37815829Z\" level=info msg=\"discarding signal as container stopped\" containerID=root debug_console=false name=kata-agent pid=242 sandbox=root signal=killed source=agent"

which seems to come from
May 27 08:42:57 hpe-dl380pgen8-01 kata-shim[17246]: time="2020-05-27T08:42:57.85293115-04:00" level=info msg="using shim to proxy exit code" container=root exec-id=root exitcode=0 name=kata-shim pid=1 source=shim

A little before that
May 27 08:42:57 hpe-dl380pgen8-01 kata-shim[17246]: time="2020-05-27T08:42:57.851924107-04:00" level=info msg="copy stdout failed" container=root error="rpc error: code = Unknown desc = read /dev/ptmx: input/output error" exec-id=root name=kata-shim pid=1 source=shim

as well as
May 27 08:43:02 hpe-dl380pgen8-01 kata-shim[17539]: time="2020-05-27T08:43:02.668582771-04:00" level=info msg="copy stderr failed" container=root error="rpc error: code = Unknown desc = EOF" exec-id=60cead6f-2223-4dca-a0f5-f9f9fccf836e name=kata-shim pid=10 source=shim

So it looks like the container may have completed the command but we somehow fail to get the output and conmon fails to notice that the container terminated?
I find it odd that I can't find /opt in the logs.

I find it odd that I can't find /opt in the logs.

The logs were captured from exclusive kata-runtime where it used different mount points in the above config.json.

The logs were captured from exclusive kata-runtime where it used different mount points in the above config.json.

Ah, that makes more sense. Thanks.

Debug of the day:
It hangs at this line in sendReq() of virtcontainers/kata_agent.go
return handler(ctx, request)

i.e.,
start (cli/start.go)
vci.StartSandbox (virtcontainers/api.go)
s.Start (virtcontainers/sandbox.go)
c.start (virtcontainers/container.go)
startContainer (virtcontainers/kata_agent.go)
sendReq

There seems multiple bugs,
1.) virtio-fs seems silently corrupt filesystems,
Basically, The bind mount source is totally destroyed (all files are gone in /etc) after a few iterations of "kata-runtime run/delete".
This on F32, kernel 5.6.14-300.fc32.x86_64
"rootfsPropagation": "shared"
libcontainer will mount this as MS_SHARED
/run/kata-containers/shared/sandboxes/root/root/rootfs
and then (or before) virtio-fs will make it KataShared to be used in guest.
Later, we created those bind mounts,
{
  "destination": "/rshared",
  "options": [
    "rbind"
  ],
  "source": "/etc",
  "type": "bind"
},
{
  "destination": "/rslave",
  "options": [
    "rbind",
    "rslave"
  ],
  "source": "/etc",
  "type": "bind"
},
{
  "destination": "/rprivate",
  "options": [
    "rbind",
    "rprivate"
  ],
  "source": "/etc",
  "type": "bind"
}

Then, there are a few kata/libcontainer bugs as well,
2.) "rootfsPropagation": "shared" could cause systemd to die inside the guest, i.e.,
In agent,
vendor/github.com/opencontainers/runc/libcontainer/container_linux.go
in start(),
                if c.config.Hooks != nil {
                        s, err := c.currentOCIState()
                        if err != nil {
                                return err
                        }

c.currentOCIState()->refreshState()->runType() found systemd is dead inside the guest,
	pid := c.initProcess.pid()
	stat, err := system.Stat(pid)
	if err != nil {
		return Stopped
	}

3.) but there is no error check in c.start() to check c.state is actually in Created after leaving the function. Thus, all future sendReq() would hang as the results.
4.) running the latest upstream agent will trigger an error with the default config.json.
# kata-runtime spec
# kata-runtime run root
path "memory" missing

"git reset --hard 2aa833f685a68f48aa7e20377c0c253de41831ca^" fixed the issue.

This issue is being automatically closed as Kata Containers 1.x has now reached EOL (End of Life). This means it is no longer being maintained.

Important:
All users should switch to the latest Kata Containers 2.x release to ensure they are using a maintained release that contains the latest security fixes, performance improvements and new features.

This decision was discussed by the @kata-containers/architecture-committee and has been announced via the Kata Containers mailing list:

http://lists.katacontainers.io/pipermail/kata-dev/2020-November/001601.html
http://lists.katacontainers.io/pipermail/kata-dev/2021-April/001843.html
http://lists.katacontainers.io/pipermail/kata-dev/2021-May/001896.html

If you believe this issue still applies to Kata Containers 2.x, please open an issue against the Kata Containers 2.x repository, pointing to this one, providing details to allow us to migrate it.

authors: c3d cailca devimc fidencio ghost jodh-intel


text:
cli: the default hostname should not be "runc"

When use "kata-runtime spec" to generate config.json,
we see that the default hostname is "runc", which is not correct.
I understand that it's caused by the call chain spec.go -> specconv.Example(),
which is from runc package, but anyway the default hostname of kata container
should not be "runc".
I think "kata" is more proper for the default hostname.
Use the commands below can expose this issue:
mkdir rootfs docker export $(docker create busybox) | tar -xf - -C rootfs kata-runtime spec kata-runtime run busybox / # hostname runc

I'm going to work on it.


text:
Add sponsors option

Github provides support for sponsoring projects: https://github.com/sponsors
cc @katspaugh

I know, I had registered us there before and some random medical company even sponsored us. But to actually get the money you need to provide US tax details and stuff like that, which I'm not eager to do, so I canceled it.

Interesting. When was this? I'm also using opencollective for some other projects and that seems to work fine. Have you used that before?

Open collective sounds interesting, does it also entail some sort of tax liability?

Not sure. it's also important that the people sponsoring the project can get a positive tax outcome (because it's non-profit etc) vs the liability. But I'm not a lawyer.

You guys should definitely suck it up, deal with the tax setup, and accept funding. This is such a massive project and could easily garner some cash because of how useful it is. I'd sponsor it.

OK, I've filled out the form again. They made it slightly easier with Stripe Connect. It will take a few days to approve.

@katspaugh @thijstriemstra let me know if you need help with this.

authors: entonbiba katspaugh nrthbound thijstriemstra


text:
Back Button

The back button is not working after implementing the plugin. The app is running background only when Home Button is pressed.

The next version does allow to override the button if wanted. See 5bd6b1f0d84e30802466f5f71f6439aa83126a78
To move the app to background instead of closing the app when hitting the back button:
cordova.plugins.backgroundMode.overrideBackButton();

authors: NsAveek katzer

repo: katzer/cordova-plugin-background-mode


text:
Search, book mark and font customization are not vissible

A few days back I integrated this package into my app that time the search, bookmark and font customization were visible but now I run the same app but it is not showing this feature please check. But I tried the example app from this package it shows correctly. I am also using the latest version also tried to add this source code in dependency in project also but still not working

Please help me to fix this error

Finally found a solution flutter_inappwebview. I used this package in my project after the epub viewer package functionalities like search book mark etc were not visible

I don't get it. How did you use flutter_inappwebview with this package to get those features to show up?

Actually, flutter_inappwebview was causing the issue. I used this package in my project, which led to some EPUB functionalities not working properly. I replaced flutter_inappwebview with another webview package, and now there are more options available for EPUB.

Actually, flutter_inappwebview was causing the issue. I used this package in my project, which led to some EPUB functionalities not working properly. I replaced flutter_inappwebview with another webview package, and now there are more options available for EPUB.

I'm currently having an issue on iOS where search and bookmark functionality don't show up like on android. Your comment seems like a potential solution but I'm unable to understand the webview aspect, this is how I load the file in code as per the docs:
VocsyEpub.open(
'bookPath',
lastLocation: EpubLocator.fromJson({
"bookId": "2239",
"href": "/OEBPS/ch06.xhtml",
"created": 1539934158390,
"locations": {
"cfi": "epubcfi(/0!/4/4[simple_book]/2/2/6)"
}
}), // first page will open up if the value is null
);
At which point did you implement your webview and how did you do it? I would be really grateful if you could help me out on this.

This package not working properly on iOS. I have faced issue on android when i use flutter_inappwebview package on same project. Many features in this package worked on android after removing flutter_inappwebview package from project.
If you need epub reader for IOS then you need to integrate folio reader on iOS module using the Method Channel.

This package not working properly on iOS. I have faced issue on android when i use flutter_inappwebview package on same project. Many features in this package worked on android after removing flutter_inappwebview package from project.
If you need epub reader for IOS then you need to integrate folio reader on iOS module using the Method Channel. https://github.com/FolioReader/FolioReaderKit

Oh wow, thanks for the information, I will try that approach! 👍🏾

authors: chitraarasu chitraarasu-kirshi djoks


text:
🛑 Developer Site is down

In 276ed7d, Developer Site (https://dev.myapms.com) was down:

HTTP code: 403
Response time: 693 ms

Resolved: Developer Site is back up in 65377c2 after 16 minutes.


text:
Demonstration Garden - Map

Create an overhead view of a garden so that we can mark the zones/habitats.
Here is the Satellite view of the Garden to base the shape off of:
https://goo.gl/maps/8gC5KFboUjifa8qg6
These are sketches of the garden by the designer:

I like the simplicity of this overhead garden map but obviously no pressure.
https://www.canr.msu.edu/hrt/our_gardens/Visit/Master-Gardener-Idea-Bed/index
Current garden page for some shape reference unless you have a photographic memory!
It has the shape of the Redwood and Bog section laid out in cinderblocks. And a glimpse of the stacked Coastal center, and center middle circle (with the poppies).
https://northcoastcnps.org/index.php/nursery/demonstration-garden
This diagram will go on this page:
http://www.humboldtnativeplants.org/garden/cnps-demo

I talked to the Garden Designer, Christine Kelly. She said the zones have gotten revised now and its just these:

Woodland (combining Redwood and Mixed Evergreen)
Meadow (combining Chaparral and Grassland)
Bog/Riparian
That middle circle is going to be Annuals/Container.

They were putting up signs in the Garden yesterday/Wednesday so I'll check Sunday to see what the final names for the Zones are, if they were included in the Signage.

I added your map to this page:
http://www.humboldtnativeplants.org/garden/cnps-demo
It looks so much better than anything I would have made.
I'm also shamelessly styling our page after this one: https://www.butchartgardens.com/garden/sunken-garden/
If you want to update the map on the live site (if that sounds fun, and like a small thrill), you can update it directly on the GitHub site here by overwriting the current map image.
https://github.com/kaycix/humboldtnativeplants/tree/main/assets/images/cnps/garden
Don't stress if you mess anything up. It really wouldn't affect that many people and I could revert/fix anything. So feel free to poke around and try stuff!

Ok I'm hoping to make map revisions soon :)

This looks so good! I love the detail and the logs! I missed the Coastal Bluffs area, my mistake - that should be in the top/middle area if it's not too much trouble to add.

authors: kathryn-rowe kaycix

repo: kaycix/humboldtnativeplants


text:
Why min SDK not 8?

Is there any specific reason for not supporting API 8?
It's a really nice library but this is not good, especially because there's no need to up the min SDK as far as I can see.

@SufianBabri I agree, I'm lowering it to 8 in next release

authors: SufianBabri kayvannj

repo: kayvannj/PermissionUtil


text:
change content

How can we update the information we added to the qr code without changing the qr code.

How can we update the information we added to the qr code without changing the qr code.

We can't do that actually, whenever the as the pattern is made from the information itself.

I know this is late reply, but maybe it will help someone.
It is possible only through special services where generated QR code resolves to a URL serving your custom content. This is usually referred as dynamic QR code. Main benefit of this kind of codes is the QR code size, since it only needs to encode string of 15-25 characters. Alse, since your content is stored on server, you can track scan statistics and, of course, change the content served.

authors: MisterMickey Researcher33 stain-win

repo: kazuhikoarase/qrcode-generator


text:
warning: [removal] Integer(int) in Integer has been deprecated and marked for removal

compiled the v3.2.0 and got the following warning
~/github/MockFtpServer git:[develop]
gradle -Duser.language=en -Duser.country=US clean compileJava
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Task :compileJava
/Users/kazuakiurayama/github/MockFtpServer/src/main/java/org/mockftpserver/stub/command/PortCommandHandler.java:63: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
        invocationRecord.set(PORT_KEY, new Integer(client.port));
                                       ^
/Users/kazuakiurayama/github/MockFtpServer/src/main/java/org/mockftpserver/stub/command/EprtCommandHandler.java:66: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
        invocationRecord.set(PORT_KEY, new Integer(client.port));
                                       ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 warnings

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 13s
2 actionable tasks: 2 executed

See the javadoc of Java9
https://docs.oracle.com/javase/9/docs/api/java/lang/Integer.html#Integer-int-
@Deprecated(since="9")
public Integer(int value)
Deprecated. It is rarely appropriate to use this constructor. The static factory valueOf(int) is generally a better choice, as it is likely to yield significantly better space and time performance.
Constructs a newly allocated Integer object that represents the specified int value.
Parameters:
value - the value to be represented by the Integer object.

repo: kazurayam/MockFtpServer


text:
Update readme for v1 api

[X] I updated the README.md docs to reflect this change.
[X] This is either not a breaking API change, or I incremented the API version.

:+1: :+1:

authors: JamesJeffryes jayrbolton


text:
Improve docfx_project/examples/Page.EvaluateFunctionAsync.ComplexJSObjects.md

Explain how would you like this document to be impoved

@trieuthang1991 how would you like this document to be improved?

Closed due to inactivity. Feel free to reopen it if needed.

repo: kblok/puppeteer-sharp


text:
Load .moon or .html files from html/js

Load .moon or .html files directly from html/js. No node.js environment, no loader webpack, no build step.
Sample as templateURL or ng-include allows the user to dynamically load a remote template file at runtime. This seems pretty convenient as a built-in feature:
Support

.moon files were specifically created to be able to precompile components so that they don't have to be compiled at runtime. This sort of defeats the purpose and will make an application really slow.
It would also require loading a ton of dependencies for certain tasks. For example, if you have a component that uses Pug, Stylus, and ES6 with Babel, then Moon would have to:

Fetch the component
Compile the component to get its' parts
Apply the preprocessors (Pug, Stylus, Babel)
Scope styles
Compile the component template
Generate code for the component
Execute the code to export the component

This would add a couple thousand lines of code to Moon and would barely work.

Yes, how it works? Can require loading dependences in http loader

http request the moon file
load the moon file in a document fragment
process each section (template, script and style)
return a promise to moon.js (async components)
then moon.js compiles and cache the component

this example,
const Moon = require("moonjs");
require("./mycomponent.moon")(Moon);
new Moon({
el: "#app"
});
or using httpLoader().....
new Moon({
el: '#app',
components: {
'mycomponent': httpLoader('mycomponent.moon')
}
});
or, using httpLoader.register()...
httpLoader.register(Moon, 'mycomponent.moon');
new Moon({
components: [
'mycomponent'
},
or, using httpLoader as a plugin
Moon.use(httpLoader);
new moon({
    components: {
        'mycomponent': 'url:mycomponent.moon'
    },

in html

The aim of moon file loader is to quickly test .moon components without any compilation step.
However, for production, I recommend to use webpack module bundler (with moon loader), webpack-simple is a good minimalist webpack config i should look at.

That won't work. Moon will need to be bundled with huge packages, including Babel, Stylus, Jade, Haml, SCSS, and Less. That's a lot of code being added to Moon for a use case that will help in development. It will still have to compile the template as well. If you'd like to do this on your own, just use moon-component-compiler yourself.
I'm still confused though, is running moon init app too hard?

My use-case for this is the user will be able to create a component on-the-fly using our app's  IDE.
Each time user save a component, our IDE will compile it and the resulting file will be injected on user's app.

I think that instead of being built-in to Moon, you can use moon-component-compiler to compile the component. It compiles .moon files into code that you can inject however you'd like.

Closing, as this is definitely not going to be added to the Moon core.

authors: eucariop kbrsh rizkyramadhan

repo: kbrsh/moon


text:
how to make the layout fab appears on multiple screens

I want to use the fab in multiple screens with same fab content how do I use the fab without placing the fab code on all my view controller code

Closing too old issue.

authors: dhanasekarkannan kciter

repo: kciter/Floaty


text:
Having the menu button active with notification appearing causes plus layer issue.

If you tap the button to show the items then a notification appears, the plus layer moves to the corner instead of sticking to the center.

Hello, @Brown-amazingness
I'm too late. 😢
I fixed bugs, and update podspec 1.4.0.

authors: Brown-amazingness kciter

repo: kciter/KCFloatingActionButton


text:
🌱  Include kind and docker in build image

This PR includes kind and docker in the build image and provides a script to start up docker.

/retest

/cc @nikhita

repo: kcp-dev/infra


text:
Part 3: Make APIResource controller client calls scoped

Summary
Related issue(s)
Fixes #

/retest
/lgtm
/approve

repo: kcp-dev/kcp


text:
Add APIExport controller

Summary

Add APIExport controller that generates and/or verifies an APIExport's
identity secret.
Update APIBindings to record the hash of the APIExport's identity when
binding.
CRDs are now stored in etcd in /registry/$group/$version/$apiExportIdentity/...

If a CRD isn't part of an APIExport, the $apiExportIdentity value is customresources

Related issue(s)
Requires https://github.com/kcp-dev/kubernetes/pull/62

@sttts ready for review (don't merge until we merge the kube PR)

FYI @kylape @csams this changes where CRs are stored in etcd.


text:
Update nscplugin, sbt-scala-native to 0.5.0

About this PR
📦 Updates

org.scala-native:nscplugin
org.scala-native:sbt-scala-native

from 0.4.17 to 0.5.0
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-native" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scala-native" }
}]

labels: library-update, early-semver-major, semver-spec-minor, commit-count:1

Superseded by #129.

repo: kcrypt/scala-biginteger


text:
🛑 Personal II is down

In 371bd00, Personal II (https://www.k-fish.de/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Personal II is back up in 7ce6b3c.

repo: kdambekalns/uptime-monitoring


text:
After the OAuth token expiry, the applications stops receiving notifications from Salesforce Event Bus

This is not an issue. I am seeking support.
I am using this application to understand how the Salesforce Event Bus works. In our Salesforce connected app, the grant type is set to password and we use username and password to get the access token. Accordingly, I added a new extension method to register the ResilientStreamingClient. The only change in this method is how I get the access token. I use the password grant type to get the access token as below:
services.AddSingleton<Func<AsyncExpiringLazy>>(sp => () =>
{
var salesforceConfig = sp.GetRequiredService<IOptions<SalesforceConfiguration>>().Value;
TimeSpan.TryParse(salesforceConfig.TokenExpiration, out var tokenExperation);
return new AsyncExpiringLazy<AccessTokenResponse>(async data =>
{
    if (data.Result == null
        || DateTime.UtcNow > data.ValidUntil.Subtract(TimeSpan.FromSeconds(30)))
    {
        var nvc = new List<KeyValuePair<string, string>>();
        nvc.Add(new KeyValuePair<string, string>("grant_type", "password"));
        nvc.Add(new KeyValuePair<string, string>("client_id", salesforceConfig.ClientId));
        nvc.Add(new KeyValuePair<string, string>("client_secret", salesforceConfig.ClientSecret));
        nvc.Add(new KeyValuePair<string, string>("username", "myusername"));
        nvc.Add(new KeyValuePair<string, string>("password", "mypassword"));

        var req = new HttpRequestMessage(HttpMethod.Post, salesforceConfig.LoginUrl + salesforceConfig.OAuthUri)
        {
            Content = new FormUrlEncodedContent(nvc)
        };

        Console.WriteLine($"------------------------------------> Getting token at {DateTime.Now}");
        var response = await new HttpClient().SendAsync(req);
        var content = await response.Content.ReadAsStringAsync();
        var tokenResponse = JsonConvert.DeserializeObject<AccessTokenResponse>(content);

        Console.WriteLine($"------------------------------------> Got a new token at {DateTime.Now}");
        return new AsyncExpirationValue<AccessTokenResponse>
        {
            Result = tokenResponse,
            ValidUntil = DateTimeOffset.UtcNow.Add(tokenExperation)
        };
    }

    return data;
});

});
This app runs fine and receives all events from the Event Bus until the OAuth access token expires. Once it expires, it doesn't throw any auth error and reconnect. Instead it stops receiving the events. After browsing through the code my understanding is when the token expires it throws an auth error and the BayeuxClient is recreated with a new token (from the AsyncExpiringLazy delegate). But it doesn't seem to be happening.
Just wanted to know if my understanding is correct and if I am missing anything in this case that it stops working after the token expires.

@vnmnm the reason the original code works is that Polly library is used to retry the call on failure of the token. Please refer to https://github.com/kdcllc/CometD.NetCore.Salesforce/blob/a5379597b056a9f74655cb3870eebcb38319ebab/src/CometD.NetCore.Salesforce/StreamingClientExtensions.cs#L62
kdcllc

@kdcllc Thank you for your response. Apologies for not being specific earlier. I am not having any issues with getting the access token from Salesforce. The access token get works fine and the first subscribe call starts receiving events from the Event Bus without any issue.
But once this token expires, the subscription should fail with auth error and that triggers the ErrorExtension_ConnectionError() method which invalidates the current token and creates a new bayeuxClient with new access token and re-subscribes again. This might or might not return a new token depending on the ValidUntil property. I am referring below code snippet in CometD.netCore.Salesforce.
https://github.com/kdcllc/CometD.NetCore.Salesforce/blob/master/src/CometD.NetCore.Salesforce/ResilientStreamingClient.cs#L243
In my case, this extension never gets called and consequently the token never gets refreshed and the subscription never gets reconnected. It just stops receiving events from the Event Bus.
I tried adding Polly retry as suggested but the behavior is same. The access token is refreshed only in the CreateBayeuxClient() method and this method is called either during first time subscription to Event Bus or during any error (including auth error) in the ErrorExtension_ConnectionError() method.

@kdcllc I downloaded the latest version of this code and ran it by hard-coding the AccessToken value to "RandomTokenString" and the behavior is as below:

It says successfully subscribed to the topic even with an invalid access token
It does not throw any auth errors.
It does not receive any change notifications from the Event Bus which is expected.
If it does not throw any auth errors, then how does it re-subscribe when the token expires? Because reconnect is triggered from ErrorExtension_ConnectionError() method which is triggered on auth errors.

return new AsyncExpiringLazy<AccessTokenResponse>(async data =>
            {
                return new AsyncExpirationValue<AccessTokenResponse>
                {
                    Result = new AccessTokenResponse
                    {
                        AccessToken = "RamdomTokenString",
                        InstanceUrl = "https://testapp.my.salesforce.com",
                    },
                    ValidUntil = DateTimeOffset.UtcNow.Add(tokenExperation)
                };
            });`

The output of the application is as below:

dbug: CometD.NetCore.Salesforce.ResilientStreamingClient[0]
Creating BayeuxClient ...
dbug: CometD.NetCore.Salesforce.ResilientStreamingClient[0]
BayeuxClient was created...
dbug: CometD.NetCore.Salesforce.ResilientStreamingClient[0]
Handshaking...
dbug: CometD.NetCore.Salesforce.ResilientStreamingClient[0]
Connected
info: Bet.Salesforce.TestApp.Services.SalesforceEventBusHostedService[0]
StartAsync has been called.
dbug: CometD.NetCore.Salesforce.ResilientStreamingClient[0]
Handshaking...
dbug: CometD.NetCore.Salesforce.ResilientStreamingClient[0]
Connected
info: Bet.BuildingBlocks.SalesforceEventBus.EventBus[0]
Found match
dbug: Bet.BuildingBlocks.SalesforceEventBus.EventBus[0]
/topic/mycustomtopic is subscribed with ReplayId: -1
Application started. Press Ctrl+C to shut down.
Hosting environment: Development
info: Bet.Salesforce.TestApp.Services.SalesforceEventBusHostedService[0]
OnStarted has been called.

Hi,
I am seeing the same error. @vnmnm or @kdcllc, did you get the solution related to this?

@tgobena Nope I haven't found any solution for this. It works as long as the token is valid. After that it does not automatically refresh the token. I have to stop and re-run the application as a work-around. I am wondering if there is any configuration that needs to be done on Salesforce side so that it returns the "authentication" error on the "meta/connect" channel.

@vnmnm  and @tgobena  we released the latest libraries and what our testing it solved the issue with reconnect. please let us know.

@kdcllc Thank you for your support. The reconnect works fine for me now.

authors: kdcllc tgobena vnmnm


text:
Fix tests

In order,

Updates the test to pass on main (4ac459a)
Reverts #49 and the format mangling resulting from it (f820145)
Adds a new test showing the case in #49 working without #49 (b7fd360)

It might be worthwhile to change how indenting is handled (see e.g. the empty line in the new test), but this is a minimal patch to quickly fix test errors.
cc @cbiffle

FWIW, the all-closing-braces-at-the-left-margin behavior I was seeing (which I'm still seeing on the released package, btw) is from programmatically created documents, not parsed documents. So your test case may be testing something else.

Reproduced in cec5858; something odd is certainly going on.

This fails:
#[test]
fn parse_vs_build() -> miette::Result<()> {
    let mut built = build_abc();
    let mut parsed: KdlDocument = built.to_string().parse()?;

    built.fmt();
    parsed.fmt();

    assert_eq!(built, parsed);

    Ok(())
}

repo: kdl-org/kdl-rs


text:
Add functionality to add desired PS weights at Nano

Select specific PS weights and store in the desired order

Functionality is implemented in 8ca625f

repo: kdlong/cmssw


text:
Fix arguments propagation to commands

Hi, thanks for this utility, looks promising! I've found a bug that stucks me sometimes, so I've decided to submit a patch.
If you create a command like:
[tool.poetry-exec-plugin.commands]
printf = "printf"

You can't pass it strings with spaces because the words after the space are not properly passed to the command:
$ poetry exec printf -- 'Hello world\n'
Exec: printf Hello world\n

Hello<my-user>@<myenv>

This turns many commands unusable. For example is not possible to execute a pytest test that have spaces in their id:
[tool.poetry-exec-plugin.commands]
test = "pytest"

[tool.poetry-exec-plugin.commands]
$ poetry exec test -- -svv 'tests/path/to/test.py::test_name[my id]'
Exec: poetry exec test -- -svv 'tests/path/to/test.py::test_name[my id]'
===== test session starts =====
platform linux -- Python 3.7.13, pytest-7.1.2, pluggy-1.0.0 -- /my/python
cachedir: .pytest_cache
rootdir: ..., configfile: pyproject.toml
plugins: cov-3.0.0
collected 0 items

===== no tests ran in 0.01s =====
ERROR: file or directory not found: id]

So this fixes it using shlex.join, with a backport for Python3.7 that should be removed when that version reaches their EOL.
I've rewritten the test suite to remove mocks and because cleo.testers.command_tester.CommandTester does not allow to pass arguments to commands.

These changes have now been published in 0.3.3

authors: keattang mondeja

repo: keattang/poetry-exec-plugin


text:
unsuported array::outbound_clicks

ex fb ads
failed: (2) unsuported array::outbound_clicks[{:action_type "outbound_click", :value "9"}]

failed: (2) {"error":{"code":1,"message":"An unknown error occurred","error_subcode":99}}\nRETYRING request with limit  50\n{"error":{"code":1,"message":"An unknown error occurred","error_subcode":99}}\nRETYRING request with limit  25\n{"error":{"code":1,"message":"Please reduce the amount of data you're asking for, then retry your request"}}\nRETYRING request with limit  13\n{"error":{"code":1,"message":"Please reduce the amount of data you're asking for, then retry your request"}}\nRETYRING request with limit  7\n{"error":{"code":1,"message":"An unknown error occurred","error_subcode":99}}\nRETYRING request with limit  50\nunsuported array::outbound_clicks[{:action_type "outbound_click", :value "1"}]",

https://keboola.slack.com/archives/C09U3R1J4/p1557795053123100

https://keboola.slack.com/archives/C09U3R1J4/p1557881031130500

https://keboola.slack.com/archives/C09U3R1J4/p1557967592137300 porad stejnej projekt 5555

porad projekt 5555 https://keboola.slack.com/archives/C09U3R1J4/p1558140492010300

authors: kacurez odinuv

repo: keboola/ex-facebook-graph-api


text:
Remove unused library - fixed-data-table

Nenašel jsem v ./src ani jinde využití.

Jo, to je pozostatok z pokusu vo v1. Podobne by sme mohli vyhodit aj moment a moment-timezone.

Ok vyhodím.

authors: natocTo ujovlado

repo: keboola/indigo-ui


text:
PS-2110 support tableFiles

Doing it this way (parsing the $tableFiles as a manifest) allows the parsing and validation to be covered automatically.
So it just needs the two tests, valid/invalid imho

ok @odinuv I added there a new config class for this

repo: keboola/output-mapping


text:
validate getTable arguments

arguments of getTable call https://github.com/keboola/storage-api-php-client/blob/6322f0397b642c50fc21dcc716a06ef1d145a577/src/Keboola/StorageApi/Client.php#L811 are not validated, which means that empty string is accepted.
This causes the list all tables API call be used instead of the table detail api call.
That means the response of the function changes from
array (
  'uri' => 'https://connection.keboola.com/v2/storage/tables/in.c-main.pokus',

to
array (
  0 =>
  array (
    'uri' => 'https://connection.keboola.com/v2/storage/tables/in.c-main.pokus',

which causes very strange errors, such as https://github.com/keboola/input-mapping/issues/34

Moved to Jira https://keboola.atlassian.net/browse/KBC-1790

authors: ErikZigo odinuv

repo: keboola/storage-api-php-client


text:
Release and split monorepo

https://keboola.atlassian.net/browse/CT-897
Pridavam finalnu fazu kde je mozne po merge v GH spustit rucny release a repo si vytvori svoje tagy pre kazdy repozitar a split script by sa mal postarat o ostatne.
Navod na review:

lokalne si spustim release, mam schvalne zakomentovane pushovanie tagov aby sa nestal omyl v dasom PR to odkomentujem a malo byt o byt potom konecne riesenie.

takze spustim command docker-compose run dev bash potom bude potreba setupnut globalney git email a meno a pustit ./vendor/bin/monorepo-builder release major  (na CI je to vo workflow, mal som to pridane v docker file ale vlastne to nieje potreba)

Lokalne mi to updatne composer vzajomne naviazanych libiek na novu release verziu podla toho ci je to major, minor alebo patch

Commitne to zmeny

vytvori to nasledujuci tag napr 7.0.0

vytvori to pre kazdu lib v monorepe prefixovany tag repozitarom napr php-datatypes/7.0.0 podla verzie aka sa vydava

a thats it.
Nasledne odkomenutjem pushovanie tagov takze ked v GH prejdem do noveho releasu a vyberem si verziu tak sa zavola GH ktore zavoal  docker-compose run dev vendor/bin/monorepo-builder release <verzia>  vytvoria sa v repozitare vsetky potrebne tagu a tie sa pushnu kde sa nasledne split-repo.sh postara o to aby sa jednotlive libky splitli spravne.

Doplnim este to readme

repo: keboola/storage-backend