strange behavior of consumer stream

I've faced with strange behavior of consumer.
I've got web app with single event loop (running with tokio_core::reactor::Core). I am spawning consumer with core.handle().spawn(consumer) and it is running all the way, application lives.
My consumer looks like this:
let futures = consumer_and_chans.into_iter().map(move |(stream, channel)| {
        stream
            .for_each(move |message| {
                let delivery_tag = message.delivery_tag;
                let fetcher_future = fetcher.handle_message(message.data);
                let timeout = Duration::from_secs(timeout);
                Timeout::new(fetcher_future, timeout)
                    .then(move |res| match res {
                        Ok(_) => Either::A(channel.basic_ack(delivery_tag, false),
                        Err(e) => Either::B(basic_nack(0, true, true)
                    })
                    .then(move |res| {
                        Ok(())
                    })
            })

When i am handling web request, i use basic publish to send message to other (not the one being consumed) queue.
In that moment of time something strange happens with consumer, it stops to poll its stream.
It happens not everytime, but, i think, it happens when i am publishing message in the period of time after message was received from stream but before basic ack was sent to rabbit.
Log can be found here.
I have marked where to pay attention with comments.

Having analyzed code and reading tokio docs, i have a couple of remarks.

Consumer poll fn is returning Ok(Async::NotReady), if delivery is not ready.  Due to tokio documentation of BadTask from AsyncNotReady section: ..During this transition, no resource has returned NotReady. When the task itself returns NotReady, it has violated the contract as the task will not be notified in the future. - i don't clearly understand if this is our case, but it looks like.
Another thing in the docs - If multiple tasks have expressed interest in a resource, only the last task to have done so will be notified. Resources are intended to be used from a single task only. Maybe both calling basic_consume and basic_publish use one resource and only last one is being notified?

Maybe we can call task::current().notify(); before Ok(Async::NotReady)? It is dumm suggestion and can cause high CPU utilization, but think it's better than stop polling consumer stream.

I have examined logs a little bit more and have one more question. As i understand the code, we are saving consumer task on first poll call and when transport handles AMQP Body frame we call this task notify. But according to logs consumer poll function calling repeats without any message received from transport (it receives transport poll_recv; status=NotReady), and it returns Async::NotReady, so due to the docs, polling by event loop must be stopped until this task will by notified. @Keruspe can you, please, clarify where am i wrong?

Tried to fix this issue, by moving all tasks notification to transport poll. At least on each heartbeat all consumers will be notified and will try to poll the stream. Sent Pr. Any remarks are welcome!

I spent some more time exploring this issue. And this is what i found:

In my case i have 3 consumers and one publisher, plus heartbeat stream. They all use one RabbitMQ connection (TCPStream).
As written in (docs)[https://tokio.rs/docs/internals/net/]: Network resources are types, such as TcpListener and TcpStream, that are composed of the network handle and a reference to the driver that is powering the resource. and Calls to [Reactor::turn] uses [mio::Poll::poll] to get operating system events for registered network resources. It then notifies the registered tasks for each network resource using the [task system]. So i have reactor that use registered network resource to get operating system events.
Continue reading the docs - Note that there is only a single task field per resource. The implications are that a resource can only be used from a single task at a time. ... Notifying the task results in the task getting scheduled on its executor.
I think this is what happening - One resource (TCP Stream) is being used by 5 different tasks, but, by the docs, can be used only from a single task, so only one gets notified. Other tasks are simply not scheduled on executor.
My workaround: to save consumers tasks somewhere near the resource and when it's get updated by operating system events to notify all tasks manually. In pull-request i propose to save it in transport and, as by-design, heartbeat must be always called, manually notify all consumers, when it's happening.
Think this issue may be related to #133.

Are you still using tokio-core or are you using tokio?
I have some rework that will land by the end of the month that might or might not fix this.
Wrt the NotReady usages, we always notify before doing that for tasks that will need to be polled again so we should be safe wrt that

Can you try with 0.19.0-alpha1?

Care to try with 0.19.0 beta1?

Should be fixed by now.
Please reopen with some code sample if you manage to still reproduce this


Reference sidebar scrollbar is hidden on hover

https://www.loom.com/share/44435dac5f064ea0a013d1b231ca86c7
That's Chrome 111.0.5563.110 on Windows 11.
Also tried with Firefox 111 - there, the scrollbar isn't hidden but can't be moved.
(I would like to use this opportunity to advocate for the use of native scrollbars. This is the third pretty major project within the last couple of months where I've seen people talk about accessibility regularly but then make this essential thing inaccessible because they feel that they have to use their own way of handling scrolling.)

Seems fixed. It's now a lovely standard-width native scrollbar.
Thanks!


Ahlyab.PasswordChecker version 1

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

This looks like it may be a 64bit application but the architecture specified is x86.


Not able to send more than 4 POST requests

Is this a bug report?
yes

Have you read the Contributing Guidelines?
yes
Environment
Environment:
OS:  macOS Sierra 10.12.6
Node:  8.6.0
Yarn:  Not Found
npm:  4.6.1
Watchman:  4.7.0
Xcode:  Xcode 9.0.1 Build version 9A1004
Android Studio:  2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: ^0.48.4 => 0.48.4
Target Platform: iOS (10.3)
Steps to Reproduce

I'm not able to send more than 4 post request to a nodejs server instantly.
To reproduce:

git clone https://github.com/James2516/react-native-post
cd server && npm i && npm start
cd client && npm i && npm start

Server is created with express-generator and client with create-react-native-app.
Client code modified: (App.js)
const axios = require('axios');

const API_BASE_URL = 'http://localhost:3010/';

for (let i = 0; i < 20; i++) {
  console.log('posting', i)
  axios.post(API_BASE_URL, { i });
}

Server code modified: (routes/index.js)
router.post('/', function(req, res, next) {
  console.log('backend received', req.body);
});

Output:
backend received { i: 0 }
backend received { i: 1 }
backend received { i: 2 }
backend received { i: 3 }

The rest of the requests were received several minutes later (sometimes never).

resolved. problem does not lie with react-native


Bug 1927122: change cam to mtc for controller pod label filter

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

@ibolton336 feel free to merge whenever!


#2371 fix to display utc date at Datetime picker

#2371

datetime picker display changed from local time to utc.
reference : bootstrap-datetimepicker::options::timeZone

Please run make assets and add the changed bindata file here.

Awesome! Works great. I'd suggest to mention the timezone in the hover box here: https://github.com/prometheus/prometheus/blob/8ebeed0b44280705d4eb4a2431e8546fd2978b76/web/ui/static/js/graph_template.handlebar#L80
For example End time of graph (UTC)

Can we merge this into release-1.7 instead of master first?
This is a fairly important fix.

@yamatoya With the right Github incantation, it should be easily possible to rebase this on top of the release-1.7 branch. Could you do that, please? We can then integrate it into the imminent 1.7.2 release, and I will also forward-merge into master so that 1.8 has it, too.

@grobie
add the changed bindata file
change title
add comma
@beorn7
changed merge into release-1.7

Thanks @yamatoya but you pulled in all the commits from master, too.
You have to rebase your own commits on top of the release-1.7 branch and then force-push them to make this PR work.

I took mistake git operation and automatically PR closed.
I recreate PR #3182


Check favorite sessions in Schedule View

Add check favorite session feature as below.

Only in ShceduleView, show star icons on the right inside of session row, toggle when the icons are tapped, and persist favorited states.

Ref: #40
Note

persist [String: [Session]] Conference including favorited state in Document using UserDefaults as Json files, in save methods of FileClient DataClient
when app launch, try to load [String: [Session]] Conference from Document UserDefaults, and if failed then load from files in Resources

FYI: Now Map is move to tab so may conflict your PR.

@d-date

@ewa1989 Also please add unit tests to ensure that the favorite functions are working properly.

Added in 35b4d146156cb0a2c1a568afb87dc2672a9773a4.
Code fixing completed!

Please prioritize what I said to you in-person. Thank you!

I remember your advice at the conference, that was so thankful!
I will do my best to contribute.

@d-date
Thank you for your kind review.
I updated the code to mainly focus on conversation with you at the conference, as you said.
As I told, I want to contribute this feature through to the end!


Animation? Does $t work in OpenJSCAD ?

Haven't found any description in the doc about the animation. Is it possible? How is the $t variable in jcad interpreted in jscad ?

I don't see this being fixed ever, so closing.

Hi, was just looking into animation in OpenJSCAD, and found this gist: OpenJSCAD clock animation - profOnno/clock.jscad · GitHub.
It's from 2016, but works for me as of today on https://openjscad.org/, in Firefox 79, Ubuntu 18.04 - though note that there is a delay of a second, before the animation starts rendering (that is, the very first frame is not drawn upon load, but upon first timeout; there are also comments in the code about workers)

I am playing with a different animation solution.
You can write the code like this:


Fix File::parse() result

Unless I am wrong, 9c25ccf113269d4def05801b17feb370de944ecb unvolontarly alters the File::parse() result structure.
I just see this reading the code diff and do not know the impact.

isDir, is shorthand for isDir: isDir, in javascript.

My bad. Sorry for the noise.

No worries!


Implement auto switch of color theme based on browser API prefers-color-scheme (WIP)

This PR implements the functionality to auto switch the Code color theme based on the users preferred OS appearance setting. It makes use of the browser matchMedia API, which makes it compatible with the VS Code Browser version as well.
What has changed?
The colorTheme prop is as before the place where the current theme is set, but now there are three new props:

colorThemeAutoSwitch: this enables/disables the auto switch functionality
colorThemeDark: holds the theme for "dark mode"
colorThemeLight: holds the theme for "light mode"

VS Code will now listen on the match media event to respond to OS appearance changes. I have tested it in the browser and it works good and very smooth.
To make the code more readable and to not repeat myself, I have created some extra functions inside WorkbenchThemeService, I hope this is okay. The changes also include listening on VS Code settings changes to disable the feature if someone changes the theme manually to prevent loops or flickering. Also, I don't think someone wants this feature if he's doing it manually.
It is enabled by default, I think this is good, to force developers to take more care about their eyes in dark environments.
How to test?

Download my branch
yarn install
yarn watch-client
Open another terminal window
yarn web
Wait for compilation
Open browser at http://localhost:8080/
Open your OS appearance settings (macOS: System → General)
Change the appearance

Next?
Here are the things that are still needed to finish up before a merge can be done. I also would need some help on some points. Would appreciate anyone that can comment to some of them.

[ ] Remove console.logs (haven't removed them for debugging ATM)
[ ] Remove comments
[ ] Make colorThemeDark and colorThemeLight selectable dropdown of theme options (Status: NEEDS HELP)
[ ] Update to use both options as replacement if "High contrast" is enabled
[ ] Add tests if possible and if needed (Status: NEEDS HELP)
[ ] Translation (https://github.com/Microsoft/Localization/wiki/Visual-Studio-Code-Community-Localization-Project)
[ ] Expose an API so extension author can make use of something like: (Status: in discussion)

onThemeSwitch/Change which would return the new theme or 'dark', 'light' or 'no-preference' based on the browser API
getPreferredScheme which would return 'dark', 'light' or 'no-preference' based on the browser API

This PR fixes #61519

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: muuvmuuv sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Oh, very sorry for that much line changes... Seems like prettier does something different in my VS Code instance than in the one from the authors I guess. Would love to get some help to fix this, so it won't happen again or more strict rules in .vscode/settings.json.


Update 11-language-understanding-speech.md

This one line rendered improperly, Think that was my fault. I corrected it. All other commits display as intended.
https://github.com/MicrosoftLearning/AI-102-AIEngineer/blob/master/Instructions/11-language-understanding-speech.md#prepare-to-use-the-speech-sdk-with-language-understanding

The reformatting you made previously seems to have broken some labs. I've reverted it.


Test if forms submit on enter & makeQueryArg: key: method

added tests for the query string method and submitting forms on enter

Pull Request Test Coverage Report for Build 734

32 of 32 (100.0%)  changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+4.5%) to 41.174%

Totals

Change from base Build 731:
4.5%

Covered Lines:
6783

Relevant Lines:
16474

💛  - Coveralls


BUG: Prompt user to fill in key fields on Book Add screen not working

Hi! The current version of the site does not appear to have any error catching text when a key field is not filled out (Title, Author). I want to add a prompt to let the user know that the fields are required instead of the item being failed to add and the book list not being updated.
EDIT: Upon further inspection, there is a feature like this, but it's just not working. Thus, this would actually be a bug fix.

@SauravMukherjee44 let me work on this? Assign it to me.

@Sin-Sumit Go for it!


Support quickfix mode

Hi, thanks for this plugin! It works perfect.
There is one thing I would appreciate. Currently, open files in quickfix mode from terminal buffers will create a nested session.
It would be wonderful if a quickfix or location list is created in this usage.

Hi, I don't use the quickfix list so I'm not entirely sure what the request is, but I'm happy to look into implementing this if you provide some more info.
How would I open a file in quickfix mode, and what is quickfix mode? I've heard of the quickfix list/window but that's it.

nvim -q qf.txt will place nvim in quickfix mode.
The content of the qf.txt is usually generated by gcc or grep, and each line contains information such as file path, line number and column number:
fileA.cc:530:13: some info xxx
fileB.hh:106:23: some info xxx

Ah alright, I see! Thanks for explaining. This should be pretty simple to implement, I'll look into it tomorrow :)

Thanks in advance :)
I found that the value of nfile is 0 in this usage.

Thanks again.
I recently wrote a simple bash function.
vi() {
	local sp=~/.cache/nvim/server.pipe
	[[ ! -S $sp ]] && nvim --listen $sp $@ && return
	[[ $# -eq 0 ]] && return
	local rs="--remote-send '<C-\><C-N>:tabe|lcd $PWD|"
	case "$1" in
		-b)
			[[ $# -lt 2 ]] && { echo 'Wrong arguments'; return; }
			rs+="set binary|drop ${@:2}<CR>'"
			;;
		-d)
			[[ $# -lt 3 ]] && { echo 'Wrong arguments'; return; }
			rs+="e $2|diffthis"
			for f in "${@:3}"; do rs+="|vs $f|diffthis"; done;
			rs+="<CR>'"
			;;
		-q)
			[[ $# -ne 2 ]] && { echo 'Wrong arguments'; return; }
			rs+="lfile $2<CR>'"
			;;
		*)
			rs+="drop $@<CR>'"
			;;
	esac
	eval nvim --server $sp $rs
}

I'd like to keep this open since I'd still like to look into supporting it. Sorry for not getting to this though, I've been very busy recently. Bash implementation looks great tho!


Add support for T3

Adding T3 Instances failed
Please see the following pull request:
Adds T3 Instance Types

There are several things that need to happen to support this:

[ ] aws/amazon-vpc-cni-k8s#145 needs to be merged
[ ] files/eni-max-pods.txt needs to be updated with these instance types
[ ] The CloudFormation template amazon-eks-nodegroup.yaml needs to add the new instance types

also related - https://github.com/kubernetes/autoscaler/pull/1234

https://github.com/aws/amazon-vpc-cni-k8s/pull/145 has been merged and 1.2.0 is now available.

Released in v25


Facebook login no longer works

Facebook login no longer works (tested in ios).  I tested it.


Update aws-actions/configure-aws-credentials version

Use v2 instead of v1

Why:
The action suggests to use the latests version v2: https://github.com/aws-actions/configure-aws-credentials#recent-updates
Closes: #24520

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

[x] I have reviewed my changes in staging (look for the "Automatically generated comment" and click the links in the "Preview" column to view your latest changes).
[x] For content changes, I have completed the self-review checklist.

Hi @cmwilson21
I had to create a new PR because I deleted my branch and fork and, therefore couldn't reopen it.

@matthiasgubler thanks for submitting another PR! I'll get this triaged for review ⚡

@matthiasgubler 👋🏻 - thanks for improving our docs ✨
Unfortunately, it appears that you are modifying a file for which we don't accept external contributions (see the bottom item in the list of the message from the bot: content/actions/deployment/security-hardening-your-deployments/**).
I will discuss this with the GitHub Actions team and we may have to make these updates manually as there is at least another article impacted by this change.
I'll keep you updated. Thanks for your patience.

Thanks for the lookout @matthiasgubler! ✨
We have made the changes internally and the article is up to date in production.

@jc-clark the article is outdated again and the action version should be changed to v3. v2 currently produces a deprecation warning of the underlying AWS SDK. Thanks!

Well, since Node.js 16 is now EOL, the action should be now upgraded to v4.


Android Runtime (IncompatibleClassChangeError ) for FusedLocationProviderClient

Runtime when Call login function
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/~~aLsQyx34djnpZQZY8NmTrg==/com.app-SBEeHAYr9zP0HYjw4NI1MA==/base.apk!classes20.dex)
On my Project, We use Google Navigation, geocoding and geolocator Plugins
project run smoothly but when call your login function throw this error

Hi, see #45


Fine-tuning Bert

I want to fine-tune Bert's LM for a specific corpora. I converted the test into the format specified in the documentation and ran the fine-tuning codes given. I'm getting the following error:
File "simple_lm_finetuning.py", line 156, in random_sent
assert len(t2) > 0
AssertionError
I'm getting similar error in pregenerate_.... script. What could be the reason for the same? Is it due to some possible OOV words? My corpus does contain some emoticons.
Thanks in advance

I was facing the same issue when finetuning using finetune_on_pregenerated.py. The problem was in the fact that I have some empty sentences in my dataset. Also there are some special characters, like \t (tabulation) which can make a mess and should be cleared.
I preprocess the text like this:
for_train = for_train.dropna(subset=['text'])

import re
with open('for_pretraining_full.txt', "w", encoding='utf-8') as writer:
    for doc in for_train['text'].tolist():
        doc = doc.replace(u'\xa0', u' ').replace(u'\u200b', u' ').replace(u'\u206f', u' ').replace(u'\u206e', u' ').replace(u'\u206b', u' ').replace(u'\u206c', u' ').replace(u'\u2063', u' ').replace(u'\u200d', u' ').strip() # replace some special unicode chars
        doc = re.sub('\t+', '', doc) # replace tabs
        doc = doc.replace('. ', '\n')
        doc = re.sub('\n+( )*(\n+)*', '\n', doc) # replace several consecutive new lines by a single one
        doc = doc.strip()
        if (doc != ''):
            writer.write(doc)
            writer.write('\n\n')

Also you can try to find problem sentances, debuging your script.

I ran into an issue on this where some sneaky \n were still sneaking through even with the above code. I remedied this by just doing
if "\n" in doc:     doc = re.sub('\n', ' ', doc)


Add apache license

Description
Licences the codebase under an Apache2.0 license
Checklist
Please confirm that this pull request has done the following:

[ ] Tests added
[x] Documentation added (where applicable)
[x] Changelog item added to changelog/

It might be worth setting up a CLA process as well. If this does end up being a community-developed tool, then it would be great to start with 100% coverage of authors.

It might be worth setting up a CLA process as well.

I'd suggest something lightweight like what the linux kernel does, i.e. make people acknowledge https://developercertificate.org with their contribution and record that in the AUTHORS list (e.g. make sure they acknowledge this in their first PR where they also add themselves to the AUTHORS.md file or so).

Good idea. That has a much lower barrier compared to drafting a CLA, running past legal etc?

Thanks @lee1043 great idea

Approved in our dev team meeting


Finish 1.19 Port

Description
Finishes left over 1.19 things and deals with more forge breaking changes.
Fixes #67
Todo

[x] Agnor's decor fixes
[x] Fix merge
[ ] Finish tidying decor
[ ] Stop using our homebrewn composite model impl
[ ] https://github.com/MinecraftForge/MinecraftForge/pull/8860
[ ] https://github.com/MinecraftForge/MinecraftForge/pull/8794

Checklist:

[x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you)
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation

Considering this ready for review, the remaining todos are blocked by forge, and I'm not patient enough to hold this PR any longer.


PIN support

Let user choose a numeric PIN.

Fixed in the entropia fork. Will be merged back for version 2.


background video needs downloaded and hosted locally

tags updated and video added to _src directory in a logical place

this might be ok since it is hosted out on the wix site with a unique url - original will be downloaded here as a backup.

https://github.com/user-attachments/assets/fe108288-4467-47c4-9761-fd99e35968b1


Debugger shows wrong value of a C# property when hovered

VSCode Version: 1.4.0
OS Version: OS X 10.11.5

It seems that the debugger is showing the wrong value of a C# property when hovered.
As shown in the screenshot, the value of SomeProperty is false, but VSCode shows true while hovering.
Screenshot:

I'm wondering if this is connected to this issue: https://github.com/Microsoft/vscode/issues/9290, and if this bug has to do with the C# extension of VSCode or with VSCode itself.
Steps to Reproduce:

Create an empty .NET Core App
Use the code in the screenshot
Put a breakpoint after the line that says in a comment // Put breakpoint here
Hover on SomeProperty in the line if (someNumber > 1 || !someValue.SomeProperty)

Thanks.

@isidorn Maybe some caching issue?

This is the issue with the C# extension, can you please file an issue here: https://github.com/OmniSharp/omnisharp-vscode
The problem is that the C# extension evalutes the hovered expression on hover, thus the negation is also evaluted and you get the wrong result. There is also a PR in progress that might take care of this issue https://github.com/Microsoft/vscode/pull/9821

@isidorn Thanks. I filed an issue in the C# extension's repository: https://github.com/OmniSharp/omnisharp-vscode/issues/697

@isidorn this is an issue with VS Code. But I believe you are correct that #9821 will resolve this.


OpenStreetMap results missing

It would be helpful to have OpenStreetMap's display_name in the formatted results.  It's comparable to the to formattedAddress that appears in the results from Google.

👍 do you have time to do a PR for that ?

PR


[Feature Request]: Add use Blade directive

Feature Description
Add Blade use directive in v10.35.0
laravel/framework#49179

Added in 1.25.0


multiple escaped backslashes

Is this expected behavior?
>>> markdown.markdown("\\")
'
\\
'
>>> markdown.markdown("\\\\")
'
\\
'

I would have expected
>>> markdown.markdown("\\")
'
\\
'
>>> markdown.markdown("\\\\")
'
\\\\
'

markdown 3.1.1
As far as I understand from here: https://daringfireball.net/projects/markdown/syntax#backslash escaping backslashes should be possible.
Thanks in advance for any help.

The problem is that the Python interpreter is eating some of your backslashes and they never get passed to Markdown. For example try this:
>>> print('\\\\')
\\

Notice that the Python interpreter sees the first and third backslashes as escape characters and so the entire string is only two backslashes. Instead, you can use a raw string:
>>> print(r'\\\\')
\\\\
>>> markdown.markdown(r'\\\\')
u'
\\\\
'

Another way to test this is to read in the contents of a file and pass that to Markdown. Again, you will find that the behavior is correct.

Hey @waylan , thanks a lot for replying so quickly.
I think I agree on all your points, and I also think that my expected examples reflect the correct usage of normal/raw strings.
I use normal strings (i.e. backslash initiates an escape sequence, double backslash denotes a single escaped backslash character) as inputs and I expect the same number of backslashes in the return since the python console returns the __repr__ of the resulting html string, which also escapes the backslashes.
I think my confusion really boils down to the following:
>>> "\\" == "\\\\"
False
>>> markdown.markdown("\\") == markdown.markdown("\\\\")
True

The strings are different (the first is a single backslash if you would write it to a text file, the second is a double backslash if you would write it to a text file). But markdown processes both to the exact same output.

Again the problem is with the Python console. Remove the console from the equation and everything works as it should. You can try the online test tool or read in from files to see what I mean.
Sent with GitHawk

@mleue I think Python-Markdown behaves according to the syntax rules:

'\\' or r'\' is a single backslash. It is not followed by anything, so it is treated as a literal backslash, not as an escape character.

'\\\\' or r'\\' is two backslashes. Here, the first backslash is followed by a character from the list (see the docs), so it is treated as escape character and it escapes the second backslash. If the second backslash were followed by another character, it would lose its escaping meaning.
For example:
>>> markdown.markdown(r'\*foo*')  # the backslash is an escape character, it escapes the asterisk
'
*foo*
'
>>> markdown.markdown(r'\\*foo*')  # the second backslash is no longer an escape character
'
\\foo
'

If you want to get n literal backslashes in the output, then you need 2n in the input (when not before characters from list, 2n−1 are enough). If that is a Python non-raw string, this becomes 4n or 4n−2.
I should also add that most other Markdown implementations produce the same result.

@mitya57 thanks a lot for this additional explanation, it did the trick for me.
I was only looking at how python itself handles escaping in strings, but I forgot that markdown also is a language that allows escaping. Basically there are 2 levels of escaping that can happen, first in the python string itself and then in markdown.
Maybe as a bit of background: I stumbled upon this issue while using some mathjax-style latex in my markdown. The viewer, that I use to display the final html, contains mathjax ... i.e. I don't need to convert the latex parts of my markdown documents, I really just need to pass them through unaltered.
Now latex math can contain double backslashes as linebreaks, e.g. I could have the following input markdown:
Here is some *cool* matrix: $\begin{bmatrix}1 & 2 \\ 3 & 4 \end{bmatrix}$.
What I want as the html output is:
Here is some cool matrix: $\begin{bmatrix}1 & 2 \\ 3 & 4 \end{bmatrix}$.
But what I currently get is:
Here is some cool matrix: $\begin{bmatrix}1 & 2 \ 3 & 4 \end{bmatrix}$. (which messes up the matrix)
I guess I should be using some kind of extension that passes the entire $...$ sequence through the markdown processor unaltered?
Anyways, thanks a lot for the help and your work on this project in general.

I guess I should be using some kind of extension that passes the entire $...$ sequence through the markdown processor unaltered?

Yes you should. In fact there are a few extensions which do this very thing listed on the wiki

For MathJax, I would recommend @facelessuser's arithmatex or my own python-markdown-math.


Linux Binary tracked bin/x64/Release_Console

An executable binary for linux has been tracked in the bin/x64/Release_Console directory. This should be removed and ideally purged from history.
https://github.com/FLAMEGPU/FLAMEGPU/blob/master/bin/x64/Release_Console/CirclesBruteForce_float_console

It may be worth modifying .gitignore to ignore the bin directories, requiring explicit forcing of file additions to this directory.
i.e replace
**/bin/**/*.exe
**/bin/**/cudart*.dll

with
**/bin/**

or even
**/bin

Furthermore I'm not sure why the existing rules are using ** not just *.

bin/x64/CirclesBruteForce_float_console.sh has also snuck into the repository.

bin/x64/MC_MSMPR_console.bat is also in the repo, without the related example MonteCarlo_MSMPR
@mondus  is this example supposed to be in master? It has it's own branch but some files seem to have made it into master?

This involves rewriting history, will do this last, just before release.

Several iterations/*.XML files have also snuck into the repository.
See https://github.com/FLAMEGPU/FLAMEGPU/tree/release-1.5/examples/CirclesBruteForce_float/iterations


Frontend-homework-8

Metric
Value

alert_status
b:white_check_mark: OK/b

bugs
0

code_smells
0

reliability_rating
A (0 Bugs)br/Note: A being best, E being worst

security_rating
A (0 Vulnerabilities)br/Note: A being best, E being worst

vulnerabilities
0


Added an accessibility question to the quiz

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)

Closes #XXXXX

We already have a similar question for the alt attribute so we are going to close this PR.

We already have a similar question for the alt attribute so we are going to close this PR.

My bad, should have checked the other questions first.


Only load pg_duckdb extension if set in shared_preload_variables

We want to enforce that pg_duckdb extension is loaded only if it is set in shared_preload_variables.

This is bad for users who cant modify that setting. Is it possible that this can this be avoided, or it this simply inevitably necessary given the direction of the design?

I agree that if we can avoid requiring this then that would be really nice. And I think it's possible at least for now. I thought introducing background workers would require it, but even that seems not true because RegisterDynamicBackgroundWorker can be used to spawn background workers without needing shared_preload_libraries.

So i'm closing this at this point, and if needed in future we can return to this restriction.


[BUG] IN query statement currently does not work with Long values

Spring Data Azure Cosmos DB (v5.3.0 & Java17)
The result of the following query did not match the expectations.
Define method at DataClassRepository:
@Query("select * from c where c.val in ( @val )")
List<DataEntity> queryNg(@Param("val") List<Long> val);

call mathod at ApplicationClass#run:
List<DataEntity> ngList = dataRepository.queryNg(Arrays.asList(Long.valueOf(1)));
Expected to receive one result, but instead received zero results. If the query is executed to match only one id instead of specifying multiple ids with the in clause it's returned the expected result.
The main question is whether there is a way to use numeric values such as Long in the filter condition of a query that includes the "in" clause.
Main suspects that the issue occurred because the filter is internally treated as a string.

https://github.com/Azure/azure-sdk-for-java/blob/115e7963bf0cbd77dca932c26db8d5017f59b790/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQuery.java#L73

Thank you for bringing this issue to our attention. We plan to have a fix in our next release at the end of August.


Using DELETE to remove to-many relationship

The section http://jsonapi.org/format/#crud-updating-to-many-relationships states that to-many relationships may be removed using DELETE. While I like this idea, isn't it going against HTTP if client sends DELETE /articles/1/links/comments but after that GET /articles/1/links/comments would still return 200 with the representation of the relationship (regardless of the content in the original DELETE request)?
I have been under the impression that if client receives successful response to a DELETE request, that resource shouldn't exist anymore.
I think using DELETE is still possible if we add the ids in the URL. For example DELETE /articles/1/links/comments/12,13. After that if client would send GET to the same URL, it wouldn't exist and 404 would be returned.
If we did add the ids into the URL, then replacing the relationships could probably use PUT instead of PATCH which i suppose could be even more intuitive since PUT is meant for replacing the representation entirely.

In the current version of the spec, a resource is referred to both ID and type.  I don't see anywhere in the spec that defines how to best format this pair in URLs.  The issue is that a relationship does not have to be a single type, as is the case of generic relationships.
Let's assume for a moment that we have a platform (such as Tumblr) on which people can post likes, replies, and reblogs in a chronological manner to an object.  This can be implemented as a single generic relationship in the back-end, thus returning a relationship made up of three different types.  Now what if we wanted to delete a Like that has the ID 385019 from that relationship?  It can be a problem just referring by ID if there is also a Reply that has an ID 385019.  Thus the need for explicit type declaration with each object.
Now how do you format types in a way in URLs that is back-end agnostic?  Those of us on Python prefer underscored names, and thus you would see things like email_addresses appear.  Yet those coding with Node.js prefer camelCase and would rather write emailAddresses.  Would we use hyphens, commas, underscores, colons, periods, pipes, etc?

Now how do you format types in a way in URLs that is back-end agnostic?

@ColtonProvias Whether it appears in the URL or not, the client still needs to specify an exact type in order to issue a DELETE — or any relationship operation for that matter. There's no hard rule about how to format it. The client just needs to know.
@wuher From RFC 7231:

The DELETE method requests that the origin server remove the association between the target resource and its current functionality.

A lenient reading of this would seem to accommodate what JSON API does. The current functionality is no longer there. In particular, the RFC does not even suggest that a subsequent request to the same HTTP resource would be expected to return a 404.

[...] replacing the relationships could probably use PUT instead of PATCH

This makes sense, but in effect the two are equal in this case. PUT does seem more intuitive, I agree.

Thank you for your quick responses.
@bintoro If you continue reading that paragraph it also says that

In effect, this method is similar to the rm command
in UNIX: it expresses a deletion operation on the URI mapping of the
origin server rather than an expectation that the previously
associated information be deleted.

To me, that says that the URL is indeed the association that should be removed. So the deleted URL should not be there anymore even if the current functionality would be. Furthermore, RFC 2616 says following about DELETE:

the server SHOULD NOT
indicate success unless, at the time the response is given, it
intends to delete the resource or move it to an inaccessible
location.

@wuher Exactly. The association between the URI and its current functionality is to be removed. I don't see any rule that the same URI cannot continue to provide a different functionality, in this case a partial set of the previously existing relationship targets.

With a document storage back-end, DELETE in that sense works well.  However, for a relational database solution, DELETE as per RFC 7231 will not work as you essentially need to kill off the relationship completely.  It can be faked by claiming a request to an empty relationship as a 404, but otherwise it conflicts with the nature of serializing records.

There is a note in JSON API:

Note: RFC 7231 specifies that a DELETE request may include a body, but that a server may reject the request. This spec defines the semantics of a server, and we are defining its semantics for JSON API.

The relevant section in RFC 7231 states:

A payload within a DELETE request message has no defined semantics;
sending a payload body on a DELETE request might cause some existing
implementations to reject the request.

Fwiw, if this is a problem (and I'm not sure it is), then it also affects bulk DELETE's in the bulk extension.


[dv, xcelium] code coverage for DUT Only

@rasmus-madsen
Do you know how we can only enable code coverage for DUT?
I added below in #12219, but seems not working. It even shows code coverage for uvm_pkg in the report.
deselect_coverage -betfs -module tb...
select_coverage -befs -module ${DUT_TOP}...

https://reports.opentitan.org/hw/ip/aes_masking/dv/latest/cov_report/index.html
cc: @cindychip @jdonjdon

@weicaiyang hmm let me look into it should be easy to fix

@weicaiyang hmm let me look into it should be easy to fix

Thanks @rasmus-madsen

@weicaiyang there was some cleaning up needed. but even after the clean up the problem seem to stay.
I have asked the Cadence  FAE for some support.
will get back once I have an update from him

@weicaiyang there was some cleaning up needed. but even after the clean up the problem seem to stay. I have asked the Cadence FAE for some support.
will get back once I have an update from him

Sounds good. Thanks

fixed via https://github.com/lowRISC/opentitan/pull/12400


Duplicated symbols when compiling in release

When compiling and archiving an app for a TestFlight release, I get duplicated symbols error:
❌  duplicate symbol _RCTReactTagAttributeName in
> libReact.a(RCTShadowText.o)
> libRCTText.a(RCTShadowText.o)
[14:22:23]: Exit status: 65

I have to manually remove *.a from Link Binary With Libraries in order to make it work. However, when running into the simulator, I have to re-add those libraries because I get this error:
2016-01-25 14:32:01.342 [info][tid:com.facebook.React.JavaScript] Unable to load source map: RCTNetworking module is not available

@alvaromb yeah that's due to having duplicate copies for React Native.  I removed all libraries except libPods.a under Link Binary With Libraries and it works fine in simulator..


Base mcode functionality

WORK IN PROGRESS
This Pull Request adds the base functionality of mCODE. It starts the inferno-mcode project from scratch. It adds:

Read and Validate tests for every mCODE profile
Auto-generation of mCODE Read and Validate tests from Capability Statements

Need feedback on whether this should be from scratch as it stands or should be incorporated with existing work in this repo.
Reviewer 1:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure
where appropriate, and accomplishes the task's purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Reviewer 2:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure
where appropriate, and accomplishes the task's purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

I think you meant for this to be in another repo 🙂


Test for recursive exclusion of directories

#32

@yegor256/z please, pay attention to this pull request

@vl3/z this pull request is too small, just 7 lines changed (less than 10), there will be no formal code review, see §53 and §28; in the future, try to make sure your pull requests are not too small; @yegor256/z please review this and merge or reject

Codecov Report

Merging #100 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #100   +/-   ##
=======================================
  Coverage   97.93%   97.93%
=======================================
  Files           9        9
  Lines         242      242
=======================================
  Hits          237      237
  Misses          5        5

Continue to review full report at Codecov.

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

@rultor merge

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 4min)

The job is not in WBS, won't close the order

Job gh:yegor256/pdd#100 is not assigned, can't get performer


Turn recursive io future polling into a loop

The compiler is not clever enough to turn this into a tail call and i've an almost guaranteed stack overflow when running select requests in a loop.

Thanks!


PODCAST RSS

  Strezless Musick  After being underestimated by his would be considered kinfolk had they not switched up on him, Sin Estres launched himself into a career of a lifetime. With nothing but a drive to fulfill a childhood dream Sin Estres began to approach his songwriting hobby professionally after an email received by Anuse.io with a balance owed after a self produced remix he did with the instrumental Big Pun used in his hit "Still not a player" feat Joe. New knowledge set him on a new direction as far as a musical career goes for all he needed was a glimpse into the industry and he will stop at nothing til all h https://therealsinestres.wixsite.com/sinestres 		 https://d3t3ozftmdmh3i.cloudfront.net/production/podcast_uploaded/369458/369458-1607085233102-fadb2cfc238b4.jpg Strezless Musick  https://therealsinestres.wixsite.com/sinestres 		 		Anchor Podcasts Thu, 30 Sep 2021 09:53:46 GMT  Sin Estres Orrantia Sin Estres Orrantia en  Sin Estres Orrantia After being underestimated by his would be considered kinfolk had they not switched up on him, Sin Estres launched himself into a career of a lifetime. With nothing but a drive to fulfill a childhood dream Sin Estres began to approach his songwriting hobby professionally after an email received by Anuse.io with a balance owed after a self produced remix he did with the instrumental Big Pun used in his hit "Still not a player" feat Joe. New knowledge set him on a new direction as far as a musical career goes for all he needed was a glimpse into the industry and he will stop at nothing til all h episodic  Sin Estres Orrantia<EMAIL_ADDRESS>No      Sin Estres Orrantia addressing what the meaning of success is. It has been said that success is what each one individual makes of it. Though success is quite frankly to achieve greatness in that which is set out for man to pursue right? Well from living a time when Sin Estres felt hopeless when he thought about the future he faced during the time he was held with a blue warrant in Webb County for about a year and seven months. "Surely I ruined my life this time and now I'll never get a shot at becoming an artist like I once dreamed as a kid." he would think to himself so despondently from his cell as he faced numerous charges with one being homicide he thought he had no chance of rectifying his mistakes anymore and his future was doomed to a sure failure. Well fate played it's roll and he was finally set free from the unpromising outcome of said ordeal and well that wouldn't be the last of his errors but it was sure one of those pivotal events that molded him into this indie artist he is today and couldn't possibly have this mentality without those times of trial to bring us his sophisticated response as to the meaning of success is. According to him he is already successful because he grew up to be better than he thought he could be I mean get real, rap? A hip hop icon or someone who maybe receives a moon man or Grammy award someday? Skeptics would only mock his hearts desire so for a long time he kept his dream to himself. Well he's ready now more than ever to bring a world of entertainment to said industry based on his real live events as he is currently working on a book and albums plus singles with not the highest quality in production yet quite fascinating for the low budget recording it doesn't sound so bad at all and the lyrics are intense so parental discretion is definitely advised on his artistry recordings. In the meantime enjoy this podcast and if you haven't done so yet define what success means for you and if you aren't making moves towards the direction of accomplishing that which brings success than you need to reevaluate your route and steer the direction that does lead there as you have but a short life to accomplish anything worthy of your time. Thank you for tuning in folks be safe and God bless you and your loved ones in these pandemic trials we currently face. --- This episode is sponsored by · Anchor: The easiest way to make a podcast. https://anchor.fm/app  https://anchor.fm/sinestres/episodes/Sin-Estres-Orrantia-addressing-what-the-meaning-of-success-is-epehn4 			76f7d1a0-beef-4fd7-b985-0858e3411c24 Sin Estres Orrantia Mon, 25 Jan 2021 14:25:18 GMT  It has been said that success is what each one individual makes of it. Though success is quite frankly to achieve greatness in that which is set out for man to pursue right? Well from living a time when Sin Estres felt hopeless when he thought about the future he faced during the time he was held with a blue warrant in Webb County for about a year and seven months. "Surely I ruined my life this time and now I'll never get a shot at becoming an artist like I once dreamed as a kid." he would think to himself so despondently from his cell as he faced numerous charges with one being homicide he thought he had no chance of rectifying his mistakes anymore and his future was doomed to a sure failure. Well fate played it's roll and he was finally set free from the unpromising outcome of said ordeal and well that wouldn't be the last of his errors but it was sure one of those pivotal events that molded him into this indie artist he is today and couldn't possibly have this mentality without those times of trial to bring us his sophisticated response as to the meaning of success is. According to him he is already successful because he grew up to be better than he thought he could be I mean get real, rap? A hip hop icon or someone who maybe receives a moon man or Grammy award someday? Skeptics would only mock his hearts desire so for a long time he kept his dream to himself. Well he's ready now more than ever to bring a world of entertainment to said industry based on his real live events as he is currently working on a book and albums plus singles with not the highest quality in production yet quite fascinating for the low budget recording it doesn't sound so bad at all and the lyrics are intense so parental discretion is definitely advised on his artistry recordings. In the meantime enjoy this podcast and if you haven't done so yet define what success means for you and if you aren't making moves towards the direction of accomplishing that which brings success than you need to reevaluate your route and steer the direction that does lead there as you have but a short life to accomplish anything worthy of your time. Thank you for tuning in folks be safe and God bless you and your loved ones in these pandemic trials we currently face. --- This episode is sponsored by · Anchor: The easiest way to make a podcast. https://anchor.fm/app  No 357  full   Sin Estres Has a dream like Martin Luther King Jr My main reason for wanting to monetize my music is because of a sister who has schizophrenia. Been suffering after she was 7 being left without parents. Growing up as her aunts Cinderella who kicked me out of her home when I was 14 for defending her against her strict abusive set of rules. It's about time she has a good life she already had it rough. I love you Celene. I'll be giving reviews of current singles now live on all your favorite streaming applications ladies and gentleman. Hit that follow and subscribe to my YouTube channel. I really appreciate the support. Much love everyone, be safe. Strezless Musick baby!  https://anchor.fm/sinestres/episodes/Sin-Estres-Has-a-dream-like-Martin-Luther-King-Jr-enbncs 			0da004d5-b85a-4d8b-bf12-afa344c8be05 Sin Estres Orrantia Fri, 04 Dec 2020 12:48:29 GMT  My main reason for wanting to monetize my music is because of a sister who has schizophrenia. Been suffering after she was 7 being left without parents. Growing up as her aunts Cinderella who kicked me out of her home when I was 14 for defending her against her strict abusive set of rules. It's about time she has a good life she already had it rough. I love you Celene. I'll be giving reviews of current singles now live on all your favorite streaming applications ladies and gentleman. Hit that follow and subscribe to my YouTube channel. I really appreciate the support. Much love everyone, be safe. Strezless Musick baby!  No 59  trailer

"If  you believe you can achieve"


[BUG]Failed to upgrade Longhorn in air-gapped network environment

Describe the bug
we were trying to upgrade longhorn from 0.8.0 to 0.8.1 then we were going to upgrade 0.8.1 to version 1 then we faced certain issue saying " Error starting manager: create not allowed while custom resource definition is terminating" please note that our environment is closed network which we don't have any access to the internet what so ever. However we can provide images to our system in another way.
To Reproduce
Steps to reproduce the behavior:

We added the .yaml file for 0.8.1 to the manager and we added the images to our Docker repository and we changed the images to pull from our Docker Repo. then we applied the yaml.
the manager pods keep on CrashLoopBackOff status and longhorn-driver-deployer is on init:0/1.
then we checked the pods using describe it started saying the following "readiness probe failed dial tcp connect connection refused"
when u enter the logs you will see the following " Error starting manager: create not allowed while custom resource definition is terminating"

Expected behavior
the manager pods will keep on CrashLoopBackOff and produce the following error in the log " Error starting manager: create not allowed while custom resource definition is terminating"
Log
kubectl logs -n longhorn longhorn-manager-ctf5l
time="2020-06-28T04:21:19Z" level=info msg="Start overwriting built-in settings with customized values"
time="2020-06-28T04:21:19Z" level=info msg="cannot list the content of the src directory /var/lib/rancher/longhorn/engine-binaries for the copy, will do nothing: Failed to execute: nsenter [--mount=/host/proc/194797/ns/mnt --net=/host/proc/194797/ns/net bash -c ls /var/lib/rancher/longhorn/engine-binaries/], output , stderr, ls: cannot access '/var/lib/rancher/longhorn/engine-binaries/': No such file or directory\n, error exit status 2"
time="2020-06-28T04:21:19Z" level=info msg="New upgrade leader elected: ssdworker08"
time="2020-06-28T04:21:26Z" level=info msg="New upgrade leader elected: ssdworker03"
time="2020-06-28T04:21:47Z" level=info msg="Start upgrading"
time="2020-06-28T04:21:47Z" level=info msg="No API version upgrade is needed"
time="2020-06-28T04:21:47Z" level=info msg="Finish upgrading"
E0628 04:21:47.965636       1 leaderelection.go:282] Failed to release lock: Lease.coordination.k8s.io "longhorn-manager-upgrade-lock" is invalid: spec.leaseDurationSeconds: Invalid value: 0: must be greater than 0
time="2020-06-28T04:21:47Z" level=info msg="Upgrade leader lost: ssdworker01"
E0628 04:21:47.982995       1 kubernetes_node_controller.go:244] Couldn't get nodes ssdworker01: node "ssdworker01" not found
E0628 04:21:47.984506       1 node_controller.go:526] Couldn't get node ssdworker01 for replica db-data-r-ee1d990d: node.longhorn.io "ssdworker01" not found
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn Engine Image controller"
time="2020-06-28T04:21:48Z" level=info msg="Start kubernetes controller"
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn volume controller"
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn Kubernetes node controller"
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn node controller"
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn websocket controller"
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn replica controller"
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn engine controller"
time="2020-06-28T04:21:48Z" level=info msg="Starting Longhorn instance manager controller"
time="2020-06-28T04:21:48Z" level=info msg="Start Longhorn Setting controller"
time="2020-06-28T04:21:48Z" level=fatal msg="Error starting manager: create not allowed while custom resource definition is terminating"
kubectl -n longhorn describe po  longhorn-manager-ctf5l
Name:         longhorn-manager-ctf5l
Namespace:    longhorn
Priority:     0
Node:         ssdworker01/<IP_ADDRESS>
Start Time:   Sun, 28 Jun 2020 08:12:28 +0400
Labels:       app=longhorn-manager
controller-revision-hash=765d55c979
pod-template-generation=1
Annotations:  cni.projectcalico.org/podIP: <IP_ADDRESS>/32
Status:       Running
IP:           <IP_ADDRESS>
IPs:
IP:           <IP_ADDRESS>
Controlled By:  DaemonSet/longhorn-manager
Containers:
longhorn-manager:
Container ID:  docker://8ce0a11ead53711bcf5a17386d65d4ea3613d9c4f80f21fb7c2b0401bc00e9be
Image:         <IP_ADDRESS>:5000/longhornio/longhorn-manager:v1.0.0
Image ID:      docker-pullable://<IP_ADDRESS>:5000/longhornio/longhorn-manager@sha256:7e8dcfb5120828ef4379822ce13d751bf8575ea4f5df1b1404ba1c98994e723c
Port:          9500/TCP
Host Port:     0/TCP
Command:
longhorn-manager
-d
daemon
--engine-image
longhornio/longhorn-engine:v1.0.0
--instance-manager-image
longhornio/longhorn-instance-manager:v1_20200514
--manager-image
longhornio/longhorn-manager:v1.0.0
--service-account
longhorn-service-account
State:          Waiting
Reason:       CrashLoopBackOff
Last State:     Terminated
Reason:       Error
Exit Code:    1
Started:      Sun, 28 Jun 2020 08:38:09 +0400
Finished:     Sun, 28 Jun 2020 08:38:38 +0400
Ready:          False
Restart Count:  7
Readiness:      tcp-socket :9500 delay=0s timeout=1s period=10s #success=1 #failure=3
Environment:
POD_NAMESPACE:         longhorn (v1:metadata.namespace)
POD_IP:                 (v1:status.podIP)
NODE_NAME:              (v1:spec.nodeName)
DEFAULT_SETTING_PATH:  /var/lib/longhorn-setting/default-setting.yaml
Mounts:
/host/dev/ from dev (rw)
/host/proc/ from proc (rw)
/var/lib/longhorn-setting/ from longhorn-default-setting (rw)
/var/lib/longhorn/ from longhorn (rw)
/var/run/ from varrun (rw)
/var/run/secrets/kubernetes.io/serviceaccount from longhorn-service-account-token-v7bb6 (ro)
Conditions:
Type              Status
Initialized       True
Ready             False
ContainersReady   False
PodScheduled      True
Volumes:
dev:
Type:          HostPath (bare host directory volume)
Path:          /dev/
HostPathType:
proc:
Type:          HostPath (bare host directory volume)
Path:          /proc/
HostPathType:
varrun:
Type:          HostPath (bare host directory volume)
Path:          /var/run/
HostPathType:
longhorn:
Type:          HostPath (bare host directory volume)
Path:          /var/lib/longhorn/
HostPathType:
longhorn-default-setting:
Type:      ConfigMap (a volume populated by a ConfigMap)
Name:      longhorn-default-setting
Optional:  false
longhorn-service-account-token-v7bb6:
Type:        Secret (a volume populated by a Secret)
SecretName:  longhorn-service-account-token-v7bb6
Optional:    false
QoS Class:       BestEffort
Node-Selectors:
Tolerations:     node.kubernetes.io/disk-pressure:NoSchedule
node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/not-ready:NoExecute
node.kubernetes.io/pid-pressure:NoSchedule
node.kubernetes.io/unreachable:NoExecute
node.kubernetes.io/unschedulable:NoSchedule
Events:
Type     Reason     Age                   From                  Message

Normal   Scheduled               default-scheduler     Successfully assigned longhorn/longhorn-manager-ctf5l to ssdworker01
Normal   Pulling    26m (x3 over 28m)     kubelet, ssdworker01  Pulling image "<IP_ADDRESS>:5000/longhornio/longhorn-manager:v1.0.0"
Normal   Pulled     26m (x3 over 28m)     kubelet, ssdworker01  Successfully pulled image "<IP_ADDRESS>:5000/longhornio/longhorn-manager:v1.0.0"
Normal   Started    26m (x3 over 28m)     kubelet, ssdworker01  Started container longhorn-manager
Normal   Created    23m (x4 over 28m)     kubelet, ssdworker01  Created container longhorn-manager
Warning  Unhealthy  8m58s (x67 over 28m)  kubelet, ssdworker01  Readiness probe failed: dial tcp <IP_ADDRESS>:9500: connect: connection refused
Warning  BackOff    3m58s (x50 over 26m)  kubelet, ssdworker01  Back-off restarting failed container
Environment:

Longhorn version: 0.8.1
Kubernetes version: 1.16.2
Node OS type and version: Ubuntu 16.0.4

Additional context
Please note we have closed networked which doesn't have access to the internet. Can you provide the best practice to deploy Longhorn on our Environment. if there proper to upgrade the system in an air-gapped  network.

The manager pod crashing is caused by the lacking of engine image:
time="2020-06-28T04:21:19Z" level=info msg="cannot list the content of the src directory /var/lib/rancher/longhorn/engine-binaries for the copy, will do nothing: Failed to execute: nsenter [--mount=/host/proc/194797/ns/mnt --net=/host/proc/194797/ns/net bash -c ls /var/lib/rancher/longhorn/engine-binaries/], output , stderr, ls: cannot access '/var/lib/rancher/longhorn/engine-binaries/': No such file or directory\n, error exit status 2"

Actually all the following images will be used in Longhorn v0.8.1. Since some of the Longhorn workloads are provisioned dynamically,  you won't see the related images in the YAML files:

longhornio/longhorn-manager:v0.8.1
longhornio/longhorn-engine:v0.8.1
longhornio/longhorn-ui:v0.8.1
longhornio/longhorn-instance-manager:v1_20200301
quay.io/k8scsi/csi-attacher:v2.0.0
quay.io/k8scsi/csi-provisioner:v1.4.0
quay.io/k8scsi/csi-resizer:v0.3.0
quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
You can follow this doc to do air gap installation: https://longhorn.io/docs/0.8.1/advanced-resources/deploy/airgap/

Do not upgrade to the newer version if the v0.8.1 upgrade is not done.

Hello Shuo
we are facing the same problem can provide us a way to remove longhorn so we can start installing it fresh from the start
Thanks
Regards
Majid

You can follow the uninstallation guide to remove Longhorn:
https://longhorn.io/docs/1.0.0/deploy/uninstall/#uninstalling-longhorn-using-kubectl
If the namespace longhorn-system gets stuck in Terminating state but there is nothing in that namespace after the uninstallation, you can try following commands  to clean up the leftovers:
curl -s https://raw.githubusercontent.com/longhorn/longhorn/v0.8.1/scripts/cleanup.sh |bash -s v062
curl -s https://raw.githubusercontent.com/longhorn/longhorn/v0.8.1/scripts/cleanup.sh |bash -s v070

we finished cleaning up the system using Cleanup.sh
however when running kubectl apply -f uninstall.yaml it is stuck on 0/1
Thanks
Regards
Majid

If the namespace longhorn-system is gone, it means you have successfully cleaned up Longhorn then it's fine to directly remove the uninstall job.

hello Shuo
the longhorn-system is stuck on terminating and saying the following:
"Error from server (Conflict): Operation cannot be fulfilled on namespaces "longhorn-system": The system is ensuring all content is removed from this namespace.  Upon completion, this namespace will automatically be purged by the system."
thanks
regards

It seems that something still retains in the namespace. You can use kubectl -n longhorn-system get pods to check the possible Longhorn workloads first.
And I don't know why the uninstaller doesn't work for you. Is there any error info when the uninstaller gets stuck there?

Hello shuo
this is what the job uninstaller is showing
root@ssdmanager02:~/longhorn-master/uninstall# kubectl logs  job/longhorn-uninstall
Error from server (BadRequest): container "longhorn-uninstall" in pod "longhorn-uninstall-5k5xm" is waiting to start: image can't be pulled
root@ssdmanager02:~/longhorn-master/uninstall# kubectl get job/longhorn-uninstall -w
NAME                 COMPLETIONS   DURATION   AGE
longhorn-uninstall   0/1           102s       102s
^Croot@ssdmanager02:~/longhorn-master/uninstall# kubectl describe job longhorn-uninstall
Name:                     longhorn-uninstall
Namespace:                default
Selector:                 controller-uid=966f4a28-5e8f-476e-8299-ebf1eb7c2aba
Labels:                   controller-uid=966f4a28-5e8f-476e-8299-ebf1eb7c2aba
job-name=longhorn-uninstall
Annotations:              kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"batch/v1","kind":"Job","metadata":{"annotations":{},"name":"longhorn-uninstall","namespace":"default"},"spec":{"activeDeadl...
Parallelism:              1
Completions:              1
Start Time:               Thu, 02 Jul 2020 07:24:22 +0400
Active Deadline Seconds:  900s
Pods Statuses:            1 Running / 0 Succeeded / 0 Failed
Pod Template:
Labels:           controller-uid=966f4a28-5e8f-476e-8299-ebf1eb7c2aba
job-name=longhorn-uninstall
Service Account:  longhorn-uninstall-service-account
Containers:
longhorn-uninstall:
Image:      longhornio/longhorn-manager:v1.0.0
Port:
Host Port:
Command:
longhorn-manager
uninstall
--force
Environment:
LONGHORN_NAMESPACE:  longhorn-system
Mounts:
Volumes:
Events:
Type    Reason            Age   From            Message

Normal  SuccessfulCreate  105s  job-controller  Created pod: longhorn-uninstall-5k5xm
Thanks hope we fix this issue
regards
Majid

It seems that the job has created one pod to clean up the Longhorn system. How about the pod status?

it is still 0/1 @shuo-wu and not making any progress

All right... Since the longhorn workloads are almost gone, it's impossible to generate the support bundle for this uninstallation issue. Then I am not sure what's the root cause right now. The only thing I can do is helping you find a way to force removing Longhorn:

Run the command to see if there are still some CRDs containing the suffix longhorn.io:

kubectl get crd

e.g.,
# kubectl get crd
NAME                                          CREATED AT
......
engineimages.longhorn.io                      2020-07-08T08:52:25Z
engines.longhorn.io                           2020-07-08T08:52:23Z
......

If YES, please try/retry the following commands to clean up those CRDs:
curl -s https://raw.githubusercontent.com/longhorn/longhorn/v0.8.1/scripts/cleanup.sh |bash -s v062
curl -s https://raw.githubusercontent.com/longhorn/longhorn/v0.8.1/scripts/cleanup.sh |bash -s v070

Run the commands to delete the longhorn workloads directly:

kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/longhorn.yaml
kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/master/uninstall/uninstall.yaml

Wait and check if the namespace longhorn-system is removed.

kubectl get ns

when running the cleanup.sh saying line 1 to 12 error command not found and yes CRD is there
Thanks

Can you try to remove it manually?

For each CRD with suffix longhorn.io, list its objects:

kubectl -n longhorn-system get <CRD>

For each listed objects, remove the finalizer and directly delete it:

kubectl -n longhorn-system delete <CRD> <CRD object name>
kubectl -n longhorn-system patch -p '{"metadata":{"finalizers": []}}' --type=merge <CRD> <CRD object name>

@shuo-wu thanks that was the answer and that was way to remove the stuck terminating namespace

Can you try to remove it manually?

For each CRD with suffix longhorn.io, list its objects:

kubectl -n longhorn-system get <CRD>

For each listed objects, remove the finalizer and directly delete it:

kubectl -n longhorn-system delete <CRD> <CRD object name>
kubectl -n longhorn-system patch -p '{"metadata":{"finalizers": []}}' --type=merge <CRD> <CRD object name>

Hi I am trying this same deletion technique for a volume that won't delete but I get this respone every time:
kubectl -n longhorn-system patch -p '{"metadata":{"finalizers": []}}' --type=merge volumes pvc-86b1884b-2a6f-443d-9930-ede9b6587a9e
Error from server (InternalError): Internal error occurred: failed calling webhook "validator.longhorn.io": failed to call webhook: Post "https://longhorn-admission-webhook.longhorn-system.svc:9443/v1/webhook/validaton?timeout=10s": service "longhorn-admission-webhook" not found

any suggestions would be greatly appreciated?


Pass item parameter into the renderCollapseIcon function

Pass item parameter into the renderCollapseIcon function
This pull request includes the item parameter for each renderCollapseIcon function.
Why?
In order to create different types of icons, I want to include information from the Item itself. If I have two types FolderA and FolderB, I want to be able to render different types of Icons in the renderCollapseIcon function.
Hiya @primetwig, thanks for this repo, it's great! I wanted a small piece of functionality I included here. Please let me know if there's some requirements for contributions I'm missing. Thanks! 🙌

Hey @primetwig , commenting here but I don't know if this is working as expected. In my renderItem function, I pass in an element like the example:
renderItem: NestableProps['renderItem'] = ({ item, collapseIcon, handler }) => {
    const { isDraggingAllowed } = this.state;

    return (

        {handler}
        {collapseIcon}
        {item.text}

    );
  };

and my renderCollapseIcon is with the new pattern:
renderCollapseItem: NestableProps['renderCollapseItem'] = ({ item, isCollapsed }) => {
    return (
      { isCollapsed && item.type == "foo" ?  :
    );
  };

I don't see the renderCollapseItem function even being called for my item.
              <Nestable
                  items={userItems}
                  renderItem={({ item, collapseIcon, handler }) => (
                    <RenderedItem
                      item={item}
                      collapseIcon={collapseIcon}
                      handler={handler}
                    />
                  )}
                  renderCollapseIcon={({ isCollapsed, item }) => (
                      <RenderedItemIcon
                        isCollapsed={isCollapsed}
                        item={item}
                      />
                  )}
                  threshold={25}
                />

I think I realize the issue - the icon is only displayed when the Item has children.length > 0, when I was hoping to run this function for all items.


Composable Lora issue (maybe not your issue)

Hello, I just wanted to bring this to your attention... or maybe I'm doing something wrong?
I believe I'm using the correct syntax.

Prompt:
A massive and intricate sculpture of a mushroom cloud, <lora:mushroom_cloud:1.0<EMAIL_ADDRESS>but instead of smoke or fire it's made out of honey, made of dvr-honey, <lora:HoneyStyle:0.5<EMAIL_ADDRESS>The colors are warm golden hues and the sculpture is surrounded by bees buzzing around, creating a surreal yet beautiful scene

I'm up to date with the current stable version of Stable Diffusion, and sd-webui-loractl.
I get the following error in my SD cmd window:
*** Error running process: C:\0_SD\sd.webui\webui\extensions\stable-diffusion-webui-composable-lora\scripts\composable_lora_script.py
    Traceback (most recent call last):
      File "C:\0_SD\sd.webui\webui\modules\scripts.py", line 718, in process
        script.process(p, *script_args)
      File "C:\0_SD\sd.webui\webui\extensions\stable-diffusion-webui-composable-lora\scripts\composable_lora_script.py", line 54, in process
        composable_lora.load_prompt_loras(prompt)
      File "C:\0_SD\sd.webui\webui\extensions\stable-diffusion-webui-composable-lora\composable_lora.py", line 19, in load_prompt_loras
        multiplier = float(params.items[1]) if len(params.items) > 1 else 1.0
    ValueError: could not convert string to float: '1.0<EMAIL_ADDRESS>

I'm following up to say - I noticed I was on an older fork of Composable Lora (I saw that you replied to someone else linking to a newer one)
However, even after switching over I still have the same error

I'm guessing the correct thing to do, is just don't use composable LORA in conjunction with loractl :)

In this case, composable_lora is trying to parse a positional parameter as an int, but can't because it has the loractl syntax.
You could try specifying the lora as lora:name:te=... to move it to a named parameter. This may not fix it if composable_lora is also trying to read named parameters, though.


Server closes connection (C++)

What version of gRPC and what language are you using?
gRPC 1.22.0 C++
What operating system (Linux, Windows,...) and version?
Linux Mint 19.1 (Ubuntu 18.04)
What runtime / compiler are you using (e.g. python version or version of gcc)
Clang 6.0.0, GCC 7.4.0
What did you do?
Trying to run my test application to work with Google Assistant Service (based on this example).

Start network capture with Wireshark (based on hostname embeddedassistant.googleapis.com).
Run application:

GRPC_VERBOSITY=DEBUG GRPC_TRACE=tcp,tsi ./run_assistant_text --credentials ../credentials.json

Enter some text as request.

What did you expect to see?
Connection established, and response to request shown on console.
What did you see instead?
error: Broken pipe
TCP connection established, but server decided to close it during TLS negotiation. Wireshark shows TLS alert message "Protocol version".

It seems like library selected old version of TLS (1.0).
Logs and Wireshark session
Anything else we should know about your project / environment?
Building all with CMake, gRPC included as subdirectory. Switching from BoringSSL to system OpenSSL doesn't change anything.

At first look, this issue might be better tracked at https://github.com/googlesamples/assistant-sdk-cpp/issues

I agree that this might be better tracked at assistant repo.


Mutating webhook is called but does not install cloud-sql-proxy container

Expected Behavior
After the creation of a AuthProxyWorkload,  the workload is recognized and the mutating admission webhook adds to the pod the missing container, cloud-sql-proxy, to connect to the sql instance.
Actual Behavior
The side-car container is never added.
Steps to Reproduce the Problem

Deploy cloud-sql-proxy-operator 0.3.0
Create the following AuthProxyWorkload

apiVersion: cloudsql.cloud.google.com/v1alpha1
kind: AuthProxyWorkload
metadata:
  name: authproxyworkload-myworkload
  namespace: my-workload-namespace
spec:
  workloadSelector:
    kind: "Deployment"
    name: "my-workload"
  instances:
    - connectionString: "<connection string>"
      unixSocketPath: "/var/run/cloud-sql-proxy/path/to/socket"

Check operator logs

2023-03-20T09:41:25Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-pods", "UID": "917f9cba-4591-44fb-ba80-18875ee4d00c", "kind": "/v1, Kind=Pod", "resource": {"group":"","version":"v1","resource":"pods"}}
2023-03-20T09:41:25Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-pods", "code": 200, "reason": "", "UID": "917f9cba-4591-44fb-ba80-18875ee4d00c", "allowed": true}

Check AuhtProxyWorkload status

  status:
    WorkloadStatus:
    - conditions:
      - lastTransitionTime: "2023-03-20T09:40:21Z"
        message: No update needed for this workload
        observedGeneration: 1
        reason: UpToDate
        status: "True"
        type: WorkloadUpToDate
      kind: Deployment
      name: my-workload
      namespace: my-workload-namespace
      version: apps/v1
    conditions:
    - lastTransitionTime: "2023-03-20T09:40:21Z"
      message: Reconciled 1 matching workloads complete
      observedGeneration: 1
      reason: FinishedReconcile
      status: "True"
      type: UpToDate

Check the pod for cloud-sql-proxy

Specifications

Version: 0.3.0
Platform: GKE (version 1.21.14-gke.15800)

I'm also facing the same issue. I can see the /mutate-pods endpoint being called yet, the container isn't being added to the pod.
2023-03-27T16:12:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-pods", "UID": "2faff181-f81e-4038-b5ee-cbcc3bb25aa5", "kind": "/v1, Kind=Pod", "resource": {"group":"","version":"v1","resource":"pods"}}
2023-03-27T16:12:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-pods", "code": 200, "reason": "", "UID": "2faff181-f81e-4038-b5ee-cbcc3bb25aa5", "allowed": true}

Logs from the kube-rbac-proxy
I0327 16:11:09.295588       1 main.go:186] Valid token audiences:
I0327 16:11:09.295671       1 main.go:316] Generating self signed cert as no cert is provided
I0327 16:11:09.892069       1 main.go:366] Starting TCP socket on <IP_ADDRESS>:8443
I0327 16:11:09.892553       1 main.go:373] Listening securely on <IP_ADDRESS>:8443

Were the workload pods created by another operator? It may be a duplicate of #244. We are going to release this fix in the next week.

Hello @iazunna, We have released preview version v0.4.0. Please give this another try and let me know how it goes. Note this version has some breaking changes. Be sure to check the Release Notes.

Were the workload pods created by another operator? It may be a duplicate of #244. We are going to release this fix in the next week.

Yes, I'm using argocd to manage the resources.

Some log from v0.4.0 Startup. It also doesn't create the authproxyworkload resource
2023-03-31T21:48:19Z	INFO	Starting Cloud SQL Proxy Operator
2023-03-31T21:48:19Z	INFO	Version: 0.4.0 Build: 70a70125dd39e3383d775487252ac53b8b84a1cf
2023-03-31T21:48:19Z	INFO	Runtime: go1.20.2 linux/amd64
I0331 21:48:21.027267       1 request.go:690] Waited for 1.008130565s due to client-side throttling, not priority and fairness, request: GET:https://<IP_ADDRESS>:443/apis/configsync.gke.io/v1beta1?timeout=32s
2023-03-31T21:48:25Z	INFO	controller-runtime.metrics	Metrics server is starting to listen	{"addr": "<IP_ADDRESS>:8080"}
2023-03-31T21:48:25Z	INFO	setup	Configuring reconcilers...
2023-03-31T21:48:25Z	INFO	controller-runtime.builder	Registering a mutating webhook	{"GVK": "cloudsql.cloud.google.com/v1, Kind=AuthProxyWorkload", "path": "/mutate-cloudsql-cloud-google-com-v1-authproxyworkload"}
2023-03-31T21:48:25Z	INFO	controller-runtime.webhook	Registering webhook	{"path": "/mutate-cloudsql-cloud-google-com-v1-authproxyworkload"}
2023-03-31T21:48:25Z	INFO	controller-runtime.builder	Registering a validating webhook	{"GVK": "cloudsql.cloud.google.com/v1, Kind=AuthProxyWorkload", "path": "/validate-cloudsql-cloud-google-com-v1-authproxyworkload"}
2023-03-31T21:48:25Z	INFO	controller-runtime.webhook	Registering webhook	{"path": "/validate-cloudsql-cloud-google-com-v1-authproxyworkload"}
2023-03-31T21:48:25Z	INFO	controller-runtime.webhook	Registering webhook	{"path": "/mutate-pods"}
2023-03-31T21:48:25Z	INFO	setup	Configuring reconcilers complete.
2023-03-31T21:48:25Z	INFO	setup	starting manager
2023-03-31T21:48:25Z	INFO	controller-runtime.webhook.webhooks	Starting webhook server
2023-03-31T21:48:25Z	INFO	Starting server	{"path": "/metrics", "kind": "metrics", "addr": "<IP_ADDRESS>:8080"}
I0331 21:48:25.536180       1 leaderelection.go:248] attempting to acquire leader lease cloud-sql-proxy-operator-system/76941ffa.cloud.google.com...
2023-03-31T21:48:25Z	INFO	Starting server	{"kind": "health probe", "addr": "[::]:8081"}
2023-03-31T21:48:25Z	INFO	controller-runtime.certwatcher	Updated current TLS certificate
2023-03-31T21:48:25Z	INFO	controller-runtime.webhook	Serving webhook server	{"host": "", "port": 9443}
2023-03-31T21:48:25Z	INFO	controller-runtime.certwatcher	Starting certificate watcher
I0331 21:48:25.547455       1 leaderelection.go:258] successfully acquired lease cloud-sql-proxy-operator-system/76941ffa.cloud.google.com
2023-03-31T21:48:25Z	DEBUG	events	cloud-sql-proxy-operator-controller-manager-5698455b9f-99llf_90027245-df19-4719-95c4-ef4ecf7c7b74 became leader	{"type": "Normal", "object": {"kind":"Lease","namespace":"cloud-sql-proxy-operator-system","name":"76941ffa.cloud.google.com","uid":"841778fb-48ce-45ad-808b-28b16021373b","apiVersion":"coordination.k8s.io/v1","resourceVersion":"179483521"}, "reason": "LeaderElection"}
2023-03-31T21:48:25Z	INFO	Starting EventSource	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "source": "kind source: *v1.AuthProxyWorkload"}
2023-03-31T21:48:25Z	INFO	Starting Controller	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload"}
W0331 21:48:25.552481       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
E0331 21:48:25.552518       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: Failed to watch *v1.AuthProxyWorkload: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
W0331 21:48:26.468715       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
E0331 21:48:26.468760       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: Failed to watch *v1.AuthProxyWorkload: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
W0331 21:48:28.862688       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
E0331 21:48:28.862729       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: Failed to watch *v1.AuthProxyWorkload: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
W0331 21:48:34.316952       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
E0331 21:48:34.317009       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: Failed to watch *v1.AuthProxyWorkload: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
W0331 21:48:46.563484       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1
E0331 21:48:46.563521       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.26.3/tools/cache/reflector.go:169: Failed to watch *v1.AuthProxyWorkload: failed to list *v1.AuthProxyWorkload: request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1

Attempt to create the resource:
Error from server: error when retrieving current configuration of:
Resource: "cloudsql.cloud.google.com/v1, Resource=authproxyworkloads", GroupVersionKind: "cloudsql.cloud.google.com/v1, Kind=AuthProxyWorkload"
Name: "authproxy-dtrack", Namespace: "dependency-track"
from server for: "sql-proxy.yaml": request to convert CR from an invalid group/version: cloudsql.cloud.google.com/v1alpha1

Hi @hessjcg, thanks for releasing a new version of the operator, which I am yet to test. In the meantime, as a workaround, I am using a standalone Pod to run the cloud-sql-proxy upstream container image. For each instance connection, a ClusterIP Service was created, which the mysql client is using to connect to the DBs (sample YAML definition below).
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    labels:
      app: cloud-sql-proxy
    name: cloud-sql-proxy
    namespace: cloud-sql-proxy
  spec:
    progressDeadlineSeconds: 600
    replicas: 1
    revisionHistoryLimit: 10
    selector:
      matchLabels:
        app: cloud-sql-proxy
    strategy:
      rollingUpdate:
        maxSurge: 25%
        maxUnavailable: 25%
      type: RollingUpdate
    template:
      metadata:
        creationTimestamp: null
        labels:
          app: cloud-sql-proxy
      spec:
        containers:
        - args:
          - my-project-id:somewhere:mysql-db1?address=<IP_ADDRESS>&port=30016
          - my-project-id:somewhere:mysql-db2?address=<IP_ADDRESS>&port=30017
          - --credentials-file=/secrets/cloudsql/credentials.json
          command:
          - /cloud-sql-proxy
          image: eu.gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2
          imagePullPolicy: IfNotPresent
          name: cloud-sql-proxy
          ports:
          - containerPort: 30016
            name: db1-port
            protocol: TCP
          - containerPort: 30017
            name: db2-port
            protocol: TCP
          resources:
            limits:
              cpu: 150m
              memory: 150Mi
            requests:
              cpu: 100m
              memory: 100Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
          - mountPath: /secrets/cloudsql
            name: cloudsql-instance-credentials
            readOnly: true
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        schedulerName: default-scheduler
        securityContext: {}
        terminationGracePeriodSeconds: 30
        volumes:
        - name: cloudsql-instance-credentials
          secret:
            defaultMode: 420
            secretName: cloudsql-instance-credentials
 ---
 apiVersion: v1
  kind: Service
  metadata:
    name: mysql-db1
    namespace: cloud-sql-proxy
  spec:
    clusterIP: <svc-ip>
    clusterIPs:
    - <svc-ip>
    ipFamilies:
    - IPv4
    ipFamilyPolicy: SingleStack
    ports:
    - port: 30016
      protocol: TCP
      targetPort: 30016
    selector:
      app: cloud-sql-proxy
    sessionAffinity: None
    type: ClusterIP
 ---
 apiVersion: v1
  kind: Service
  metadata:
    name: mysql-db2
    namespace: cloud-sql-proxy
  spec:
    clusterIP: <svc-ip>
    clusterIPs:
    - <svc-ip>
    ipFamilies:
    - IPv4
    ipFamilyPolicy: SingleStack
    ports:
    - port: 30017
      protocol: TCP
      targetPort: 30017
    selector:
      app: cloud-sql-proxy
    sessionAffinity: None
    type: ClusterIP

Hello @iazunna, We have released preview version v0.4.0. Please give this another try and let me know how it goes. Note this version has some breaking changes. Be sure to check the Release Notes.

I tried the new version but still getting the same results. I'm testing on a GKE cluster.

Logs to help
2023-04-03T16:22:56Z	INFO	authproxyworkload-resource	default	{"name": "authproxyworkload-sample"}
2023-04-03T16:22:56Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-cloudsql-cloud-google-com-v1-authproxyworkload", "code": 200, "reason": "", "UID": "bc3d167d-9186-4336-8f02-2442ceb8bcaa", "allowed": true}
2023-04-03T16:22:56Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-cloudsql-cloud-google-com-v1-authproxyworkload", "UID": "d34daa4f-4544-4446-a74a-2e4cf0be31a9", "kind": "cloudsql.cloud.google.com/v1, Kind=AuthProxyWorkload", "resource": {"group":"cloudsql.cloud.google.com","version":"v1","resource":"authproxyworkloads"}}
2023-04-03T16:22:56Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-cloudsql-cloud-google-com-v1-authproxyworkload", "code": 200, "reason": "", "UID": "d34daa4f-4544-4446-a74a-2e4cf0be31a9", "allowed": true}
2023-04-03T16:22:56Z	INFO	Added finalizer. Will requeue quickly for reconcile	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "AuthProxyWorkload": {"name":"authproxyworkload-sample","namespace":"default"}, "namespace": "default", "name": "authproxyworkload-sample", "reconcileID": "d24ded5f-d8a3-451d-9375-577c8d28f50f", "err": null}
2023-04-03T16:22:56Z	INFO	Reconcile loop started AuthProxyWorkload	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "AuthProxyWorkload": {"name":"authproxyworkload-sample","namespace":"default"}, "namespace": "default", "name": "authproxyworkload-sample", "reconcileID": "ba5e105e-39be-4b8b-8f89-8ea09c738c5e", "name": {"namespace": "default", "name": "authproxyworkload-sample"}}
2023-04-03T16:22:56Z	INFO	Reconcile add/update for AuthProxyWorkload	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "AuthProxyWorkload": {"name":"authproxyworkload-sample","namespace":"default"}, "namespace": "default", "name": "authproxyworkload-sample", "reconcileID": "ba5e105e-39be-4b8b-8f89-8ea09c738c5e", "name": "authproxyworkload-sample", "namespace": "default", "gen": 1}
2023-04-03T16:22:56Z	INFO	Reconcile loop started AuthProxyWorkload	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "AuthProxyWorkload": {"name":"authproxyworkload-sample","namespace":"default"}, "namespace": "default", "name": "authproxyworkload-sample", "reconcileID": "e23b0396-38a9-48f3-9dd7-d6253792d2e6", "name": {"namespace": "default", "name": "authproxyworkload-sample"}}
2023-04-03T16:22:56Z	INFO	Reconcile add/update for AuthProxyWorkload	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "AuthProxyWorkload": {"name":"authproxyworkload-sample","namespace":"default"}, "namespace": "default", "name": "authproxyworkload-sample", "reconcileID": "e23b0396-38a9-48f3-9dd7-d6253792d2e6", "name": "authproxyworkload-sample", "namespace": "default", "gen": 1}
2023-04-03T16:22:56Z	INFO	Reconcile loop started AuthProxyWorkload	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "AuthProxyWorkload": {"name":"authproxyworkload-sample","namespace":"default"}, "namespace": "default", "name": "authproxyworkload-sample", "reconcileID": "4bc79d0c-bc95-49f1-9f92-1b4fc35de772", "name": {"namespace": "default", "name": "authproxyworkload-sample"}}
2023-04-03T16:22:56Z	INFO	Reconcile add/update for AuthProxyWorkload	{"controller": "authproxyworkload", "controllerGroup": "cloudsql.cloud.google.com", "controllerKind": "AuthProxyWorkload", "AuthProxyWorkload": {"name":"authproxyworkload-sample","namespace":"default"}, "namespace": "default", "name": "authproxyworkload-sample", "reconcileID": "4bc79d0c-bc95-49f1-9f92-1b4fc35de772", "name": "authproxyworkload-sample", "namespace": "default", "gen": 1}
2023-04-03T16:23:06Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-pods", "UID": "5cabadd7-ae95-433f-8900-612f5f4b1c8a", "kind": "/v1, Kind=Pod", "resource": {"group":"","version":"v1","resource":"pods"}}
2023-04-03T16:23:06Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-pods", "code": 200, "reason": "no changes to pod", "UID": "5cabadd7-ae95-433f-8900-612f5f4b1c8a", "allowed": true}
2023-04-03T16:24:03Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-pods", "UID": "2a77e64c-6b98-43f0-881a-14c696aef510", "kind": "/v1, Kind=Pod", "resource": {"group":"","version":"v1","resource":"pods"}}
2023-04-03T16:24:03Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-pods", "code": 200, "reason": "no changes to pod", "UID": "2a77e64c-6b98-43f0-881a-14c696aef510", "allowed": true}
2023-04-03T16:24:07Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-pods", "UID": "54cd9b52-f332-4127-80e6-5a70501ddd10", "kind": "/v1, Kind=Pod", "resource": {"group":"","version":"v1","resource":"pods"}}
2023-04-03T16:24:07Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-pods", "code": 200, "reason": "no changes to pod", "UID": "54cd9b52-f332-4127-80e6-5a70501ddd10", "allowed": true}

I believe this "reason": "no changes to pod" is the reason the container isn't being created. Could it be from here?

 I am using ArgoCD as well, and I decided for now to just manually create the cloud-sql-proxy sidecar container.

Hi, I'm going to look into this further over the next week. Are all of you experiencing this issue using ArgoCD?

I'm downgrading this to a P2 because it seems to be a problem with just the ArgoCD operator.

@hessjcg I am closing the issue because the workaround with a standalone pod for the cloud-sql-proxy adapts better to our use case. Thanks!

Glad to hear you have a workaround. Nonetheless, the Proxy Operator should work with other operators, so I think it's still valuable to figure out what's not working here.

I was unable to reproduce this using operator 0.5.0 with the simple example configuration. I tried these three ways of deploying the example:

Writing a helm chart from my laptop to deploy the simple example AuthProxyWorkload and deployment
Deploying the simple example through plain k8s YAML files in a git repo using ArgoCD
Deploying the helm chart using ArgoCD.

In all three cases, the operator was able to add the sidecar proxy container to the deployment and connect to the database.
Thus, we haven't yet found the root cause of this issue. I will work on improving status reporting (#50) in coming versions of the operator so that hopefully we can narrow down the problem if this happens again.
I'm going to close this for now. If you have more information about your workloads, please comment on this issue.

I was able to reproduce the part of this issue where pods are created without proxy containers. I am tracking it in #337.


fix: moved JX_VERSION env var to release-jx script

Signed-off-by: Cai Cooper<EMAIL_ADDRESS>It seems that pipeline environment variables do not execute commands in $(), as a result the JX_VERSION environment variable has been moved into jx/scripts/release-jx.sh script.

ah, yeah, that makes sense - the env var is resolved before the container is created, etc.

/lgtm

cheers @abayer , it's probably a feature that it doesn't anyway

/retest

/retest

/retest

/retest


RCMDcheck fails for windows

When building the 1B vignette in windows we get the following error:
Invalid: Cannot locate timezone 'UTC': Timezone database not found at "C:\Users\runneradmin\Downloads\tzdata"
see: https://github.com/Permian-Global-Research/chewie/actions/runs/10909431486/job/30277630809#step:6:52
This issue looks to be related to this:
https://github.com/apache/arrow/issues/35600
something about the datetime database not being found.
Need to add some tests for this rather than just the vignette...

Okay so I had to add a custom download stolen from pyarrow and edit the "northamerica file" values of "April" to "Apr"
R/internal-helpers.R
see here for the "April" - "Apr" solution:
https://github.com/HowardHinnant/date/issues/836#issuecomment-2332581333


Move all instances out of gistCore into individual files

E.g., move all units into a gistUnits file, mime types into gistMimeTypes, etc. Users will have to import the files they need.

Relates tangentially to #463.

IRelates directly (by subsumption?) to #305 . We might want to introduce a gistx namespace.

Will not fix. There are classes referring to the instances, so they should not be moved out into a separate file - would create a circular import.