v4: remapProps use of Map is not working in some cases

Describe the bug
I see some strange behaviour around remapProps where not all styles are applied. In my example the font size works but the color doesn't.
Additional context
I think the problem lies in the use of WeakMap when calculating the styles

https://github.com/marklawlor/nativewind/blob/main/packages/react-native-css-interop/src/runtime/css-interop.native.ts#L122-L127
https://github.com/marklawlor/nativewind/blob/main/packages/react-native-css-interop/src/runtime/native/misc.ts#L13-L17

Maybe it gets garbage collected too early?
Expected behavior
Styles are correctly applied
To Reproduce
My actual code is this
import DropDownPicker from 'react-native-dropdown-picker';

remapProps(DropDownPicker, {
  className: 'style',
  containerClass: 'containerStyle',
  disabledClass: 'disabledStyle',
  textClass: 'textStyle',
  labelClass: 'labelStyle',
  placeholderClass: 'placeholderStyle',
});

export const App = () => {
// Snip dropdown picker setup
  return (
    <DropDownPicker
      placeholder="Set your currency"
      placeholderClass="text-3xl text-red-0"
      // snip irrelevant props
    />
  );
};

But I've created a reproduction without nativewind entirely using weakmap
import React from 'react';
import {
  Text,
  TextProps,
  View,
} from 'react-native';

const opaqueStyles = new WeakMap();
const styleMetaMap = new WeakMap();

const App = () => {
  // const styles = [{ color: 'red' }, { fontSize: 30 }];
  const styles = [{ fontSize: 30 }, { color: 'red' }];

  const rawStyles: TextProps['style'] = [];
  styles.forEach((style) => {
    const opaqueStyle = {};
    opaqueStyles.set(opaqueStyle, style);
    styleMetaMap.set(opaqueStyle, {});
    rawStyles.push(opaqueStyle);
  });

  console.debug('styles', styles);
  console.debug('rawStyles', rawStyles);

  return (
    <View>
      <Text style={styles}>Nrmal Styles</Text>
      <Text style={rawStyles}>Weak Map</Text>
    </View>
  );
}

I tried using a map but that doesn't seem to make any difference so maybe RN just doesn't like maps?
FYI: The maps do weird things in dev tools since the console.log to {} instead of the contents.

Actually I just looked at the code again and I think that I over complicated I think the code is just wrong
const opaqueStyle = {};
opaqueStyles.set(opaqueStyle, style);
styleMetaMap.set(opaqueStyle, {});
rawStyles.push(opaqueStyle);

Should the last line just be pushing style?

style may not be a "style" object as React Native developers know it and because these objects can be accessed in people's components it may cause their code to break
To prevent breaking people's code, remapProps uses a placeholder empty style (this is why its called opaqueStyle) which is swapped back with the proper style later on.

This is a duplicate of #596. Your styles are being calculated correctly but are being applied in the wrong order (its picking the default #000 over your text color.

@marklawlor Ahh OK sorry for wasting time on this one, I should have remembered that bug as it was only yesterday I filed it!


Hackathon Guide

yessss

@azharichenko Could we add a section on Code for Good? Or should that be a separate thing

We could, id just need to make a section for other hackathons

We could, id just need to make a section for other hackathons

What if we include Code for Good in the 'shhh secret stuff' repo because I kinda only want Pitt kids knowing about it lol

Lol
On Tue, May 26, 2020 at 2:32 PM Ming Wang<EMAIL_ADDRESS>wrote:

We could, id just need to make a section for other hackathons
What if we include Code for Good in the 'shhh secret stuff' repo because I
kinda only want Pitt kids knowing about it lol
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/PittCSWiki/pittcswiki.github.io/pull/110#issuecomment-634200900,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKKYL6EXTELA6USRZS3V5DRTQDM3ANCNFSM4NJ2CKPA
.

this is a public repo @Zmwang622 now our trade secret is gone

what trade secret?

Yo is this PR gonna get merged or are we still reviewing

Should we delete the branch?

Yes
On Tue, May 26, 2020 at 4:46 PM Ming Wang<EMAIL_ADDRESS>wrote:

Should we delete the branch?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/PittCSWiki/pittcswiki.github.io/pull/110#issuecomment-634269976,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKKYL3QJA2HY6U6JIZJ6MLRTQTEHANCNFSM4NJ2CKPA
.


Help with error

Hi,
please help me with the following error:
Python 3.11.3 (main, Apr  5 2023, 15:52:25) [GCC 12.2.1 20230201] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctc_score import SummarizationScorer
>>> scorer = SummarizationScorer(align="D-cnndm", device="cpu")
>>> scorer.score(doc="document", refs=["reference"], hypo="summary", aspect="relevance")

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/.../.local/lib/python3.11/site-packages/ctc_score/summarization_scorer.py", line 18, in score
    return self.score_relevance(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.../.local/lib/python3.11/site-packages/ctc_score/summarization_scorer.py", line 37, in score_relevance
    aligner_summ_ref = self._get_aligner('summ_to_ref')
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.../.local/lib/python3.11/site-packages/ctc_score/scorer.py", line 55, in _get_aligner
    aligner.load_state_dict(torch.load(ckpt_path, map_location=torch.device(self._device)))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.../.local/lib/python3.11/site-packages/torch/serialization.py", line 797, in load
    with _open_zipfile_reader(opened_file) as opened_zipfile:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.../.local/lib/python3.11/site-packages/torch/serialization.py", line 283, in __init__
    super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

kind regards
P.S. thanks for sharing this metric!

Thanks a lot for noticing our work!!
We don't see the error by running your code. Looks your error is from checkpoint loading. Could you try to delete your cache_dir ($HOME/.cache/ctc_score_models) and rerun? Please let us know if it's still not working:)

Thanks for the follow-up!
The xsum scorers don't support aspect='relevance' for now, because there is nowhere to verify its performance (see Fig.3 and Fig.4 in our paper). Sorry for not declaring this in README.

I see. Thank you!


Get Player SteamId from Player GameObject

Is there any way to find out the Players SteamID from its PlayerObject?
I want to display the Playername of every Player above their names.
I don't want the Players to send their Name to the other Clients because they could fake their name.
The Host should already have the associated SteamID right? How do I get there from the Server? So the Server can send everyone which Name everyone has.

I got it working. There is a bug in the newest released Version of Facepunch Steamworks. See here: Facepunch/Facepunch.Steamworks#455
By using the newest Version from Github Actions it worked.


Goneovim launches two nvim instances (and sometimes they use the CPU a lot)

This is above all a question. In macOS Catalina, when I launch Goneovim I see two running instances of nvim on the Activity Monitor. Of course I checked and double checked that they appear only when I use Goneovim. Is this intended?
Normally, when I close Goneovim both nvim process are closed too, but in some occasions one of them keeps running using a 99% of my CPU and I have to "Force quit" it. In one occasion I had two super hungry nvim process.
I thought this my be related to one of my plugins, but the double nvim happens even if I pass -u NONE to Neovim. I haven't isolated the 99% of CPU thing, but it my be related to my workflow: I think I trigger it while developing a plug-in, open and closing Goneovim several times.

Hi
Thank you for this report.
Yes, launching two nvim processes is the intended behavior, one of which is for displaying the minimap.
I have confirmed that there is a bug that one process remains for some reason. However, I have not been able to investigate enough at this time.
I plan to fix it in the next release.

It would be cool to disable the minimap from ~/.goneovim/settings.toml so the second instance is not launched, but it's a minor detail.
I'll try to investigate why sometimes the second process is not properly closed and I'll let you know if I can replicate it

OK, apparently it occurs if I open Goneovim and almost immediately close it, which is something I do a lot 😅 It also causes the 99% CPU thing

Hi, thanks for your investigate.

it occurs if I open Goneovim and almost immediately close it,

I see. Currently, the minimap nvim process starts after 1.5 seconds and may be relevant.

Aha, yes, I can see nvim process starting a bit after I closed Goneovim. What I don't understand is the 99% CPU part 😅

Is it due to the death of the parent process🤔
Either way, I will improve this problem in the next release.


Language Translation App

Problem
The idea for people who can't understand language while travelling to different places.
Solution
With this idea you can make an app to translate between language,phrases and sentence to other language instantly.Because of this simple app,A spanish speaker can understand English and vice versa.
Level
Advance

Assign it to me!!

Can we work on this please?

sure!! lets do this

So how do we go about starting it?

What language are we writing in?
On Sun, Nov 20, 2022, 11:49 PM Olasupo Sodiq @.***>
wrote:

So how do we go about starting it?
—
Reply to this email directly, view it on GitHub
https://github.com/florinpop17/app-ideas/issues/572#issuecomment-1321264601,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3DW72QTJDOLWNYHV5Z2AG3WJKTGDANCNFSM6AAAAAAQ73ECZU
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Still waiting on @akashakara

Oh ok
On Mon, Nov 21, 2022, 9:45 AM Olasupo Sodiq @.***>
wrote:

Still waiting on @akashakara https://github.com/akashakara
—
Reply to this email directly, view it on GitHub
https://github.com/florinpop17/app-ideas/issues/572#issuecomment-1321703746,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3DW72XGMRDQIVXRYKWNTXDWJMZC3ANCNFSM6AAAAAAQ73ECZU
.
You are receiving this because you commented.Message ID:
@.***>

Hello everyone 👋
I hope this message finds you well. As you may know, the original repository for app ideas has not been updated in a while and is no longer actively maintained. However, I'm excited to let you know that a new repository has been created to continue this project (https://github.com/vincent0426/app-ideas).
The new repository aims to provide a comprehensive list of practical and achievable app ideas that developers of all levels can work on to improve their skills and build their portfolios. We welcome contributions from anyone who wants to add their own app ideas or improve the existing ones, and we are also looking for volunteers who can help maintain the repository and keep it up to date.
If you are interested in contributing or maintaining this project, please head over to the new repository (https://github.com/vincent0426/app-ideas) ⭐ and take a look at the existing issues and pull requests. Feel free to open a new issue if you have an app idea to suggest or if you have any questions about the project.
Thank you for your attention, and I hope to see you in the new repository soon! 💖

⚠ This message was generated by a robot 🤖, if this message reached you, consider leaving a star for this robot, repository link
⭐ https://github.com/aldairandre/github-bot ⭐

Hello everyone 👋
I hope this message finds you well. As you may know, the original repository for app ideas has not been updated in a while and is no longer actively maintained. However, I'm excited to let you know that a new repository has been created to continue this project (https://github.com/vincent0426/app-ideas).
The new repository aims to provide a comprehensive list of practical and achievable app ideas that developers of all levels can work on to improve their skills and build their portfolios. We welcome contributions from anyone who wants to add their own app ideas or improve the existing ones, and we are also looking for volunteers who can help maintain the repository and keep it up to date.
If you are interested in contributing or maintaining this project, please head over to the new repository (https://github.com/vincent0426/app-ideas) ⭐ and take a look at the existing issues and pull requests. Feel free to open a new issue if you have an app idea to suggest or if you have any questions about the project.
Thank you for your attention, and I hope to see you in the new repository soon! 💖

⚠ This message was generated by a robot 🤖, if this message reached you, consider leaving a star for this robot, repository link
⭐ https://github.com/aldairandre/github-bot ⭐


Flutter Shortcuts - Removing from one portion of my app

I have set up shortcuts for my app which apply to all the widgets.  However I have a few text fields in the widget tree that I want to exclude the Shortcuts from.  Is there any way I can do this?
While my app is a lot more complicated, the following code demonstrates what I want to do.  I have a shortcut of a, ctrl+a, Left/Right arrows set up which will print a message to the console (when the button has focus).  However when I am in the text fields and try and type 'a' it calls the shortcut rather than adding the 'a' to the text in the widget.    I tried using the following:

wrapping the text field DefaultTextEditingShortcuts (the arrows work but not the a)
Adding a new shortcut round the text field
Adding a new shortcut round the text field with a new shortcut manager

How would I exclude the TextBoxes from the shortcuts above without applying the shortcuts to just the button - in my actual app this would mean wrapping lots of widgets in the same shortcuts which seems an overhead I wanted to avoid.

class TestIntent extends Intent {
  final String message;
  const TestIntent(this.message);
}

class MyApp extends StatelessWidget {
  const MyApp({key});

  static const String title = 'Shortcuts Issue';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: title,
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: Scaffold(
          appBar: AppBar(
            title: const Text("Test Overriding Shortcut"),
          ),
          body: Shortcuts(
              //manager: LoggingShortcutManager(),
              shortcuts: <LogicalKeySet, Intent>{
                LogicalKeySet(LogicalKeyboardKey.keyA):
                    const TestIntent("a Pressed"),
                LogicalKeySet(
                        LogicalKeyboardKey.keyA, LogicalKeyboardKey.control):
                    const TestIntent("ctrl + a Pressed"),
                LogicalKeySet(LogicalKeyboardKey.arrowLeft):
                    const TestIntent("left arrow Pressed"),
                LogicalKeySet(LogicalKeyboardKey.arrowRight):
                    const TestIntent("right arrow Pressed"),
              },
              child: Actions(
                  actions: {
                    TestIntent: CallbackAction<TestIntent>(
                        onInvoke: (intent) =>
                            print("Called Intent ${intent.message}"))
                  },
                  child: Column(
                    children: [
                      ElevatedButton(
                          onPressed: () => print("clicked"),
                          child: const Text("Representing lots of widgets")),
                      const Text(
                          "Plain Field - typing a doesn't add the text, and using left or right arrow doesn't move cursor"),
                      const TextField(),
                      const Text(
                          "Field with DefaultTextEditingShortcuts - left/right arrows now work but a doesn't"),
                      DefaultTextEditingShortcuts(child: const TextField()),
                      const Text(
                          "Field with new shortcut - inherits from previous"),
                      const Shortcuts(
                          child: TextField(),
                          shortcuts: <LogicalKeySet, Intent>{}),
                      const Text(
                          "Field with new shortcut and new manager - still seems to inherits from previous"),
                      Shortcuts(
                          manager: ShortcutManager(),
                          child: const TextField(),
                          shortcuts: const <LogicalKeySet, Intent>{}),
                    ],
                  ))),
        ));
  }
}

void main() => runApp(const MyApp());

Hello @cracklye. You can achieve what you need by the following code. ShortcutManager has a modal field (read more here) that if set to true, will stop the propagation of key presses to ancestor shortcut managers.
Code sample
Shortcuts(
  manager: ShortcutManager(modal: true),
  shortcuts: const <LogicalKeySet, Intent>{},
  child: DefaultTextEditingShortcuts(
    child: const TextField(),
  ),
),

Setting modal to true in my opinion should also catch the arrow key shortcuts. Though in this case it doesn't. Which is why I also wrapped it in a DefaultTextEditingShortcuts widget. Hope this is a suitable solution for you. Closing this issue since this is not a bug or feature request.


Really make the seed stable to YYYY-MM-DD

hashCode is stable for the same inputs of DateTime; those inputs should be to the day only (oops).

Step failed (timeout) (retcode: 1)

Windows build_tests_1_7 appears to be on the edge of timing out: https://ci.chromium.org/ui/p/flutter/builders/prod/Windows build_tests_1_7


I have a mysql docker to build my website, After I change the data volumes, The data all lose!

Expected behavior
Move the mysql data volume from the docker container to local volume
Actual behavior
I losed all my build webiste data.
Information about the Issue
The database was losted. I can't restore my database.
Steps to reproduce the behavior

build a wordpress container and mysql container. I didn't configure the database volume  map to local volume.
After I build my website，And wan't to backup my database. I configure the volume, and map it to the local volume. And the container restart.
The mysql database return to default. and I lost my data.

Is't possible to restore the database.

@zoorz I had just imagined a few days ago what to do if this happened
use docker volume ls to find out with volume is the old one, then mount it to a new mysql container using -v <YOUR VOLUME ID>:/var/lib/mysql
better make a backup before you try this

@Diluka Thanks a lot! That really help me. I have restore the database from the default volume.

@zoorz Please read the docs on managing data with Docker:
https://docs.docker.com/engine/tutorials/dockervolumes/


Screenshots (No. 0 to 15) unavailable

Sorry, another issue with the new videos (but it worked yesterday!), the screenshots are unavailable at least for Dawn Bird. These are crucial for the discussion boards. Could somebody look into that, please?
Error message:
AccessDeniedAccess Denied285C9EC908A96E45Jcz/QuOr7EjOmeTykf5/lsNerWxKtVMGg1zHfqzfSoxaknfiqQWZ/Qtqzi/nl5fwP+mqUDP9GJE=
Thank you!

Could you let me know what URL gave you that error message?
Thanks.

Here an example.
URL: https://static.zooniverse.org/www.chimpandsee.org/subjects/56c1e2e2cf00ff2466008438/previews/56c1e2e2cf00ff2466008438_10.jpg
Error message: "AccessDeniedAccess DeniedC26B811FABC9FDAClmIpEqJK9ewj3/5jg/9SIRaQlKmbMtOZ3oAy29xqsjn6vCaNZOJghlfk1kpkLc4n"

Thanks. It looks like the subject ID in the URL isn't valid -- we had an issue with some of those being generated incorrectly, but I thought I'd corrected them all. Where did you see that one?

It seems to be a problem of DawnBird location videos http://talk.chimpandsee.org/#/subjects/ACP0007hym or http://talk.chimpandsee.org/#/subjects/ACP0007hia
and of LingeringShape videos
http://talk.chimpandsee.org/#/subjects/ACP0007esg
because DryLake screen shots do work for me.

It seems to be a problem of all newly loaded videos. Interestingly, it worked on Monday e.g. for this video (I posted screenshots), but even here it does not work anymore: https://static.zooniverse.org/www.chimpandsee.org/subjects/56c1e266cf00ff2466006dbe/previews/56c1e266cf00ff2466006dbe_12.jpg Message: AccessDeniedAccess Denied85DD944A9E818DD06CpMAoLH3BlNrpK6Dj0Io7leyjE4K3LvxmWdwLGQDDo2rd6EmuQhG6PbLte7pu6wQEDkVgcZ9Po=

@astopy I think there are some subjects that still have ID issues. I just came across this subject while trying to debug some other issues that is getting access denied errors on Talk as well as some 403 errors in the console for the classifier itself:
GET https://static.zooniverse.org/www.chimpandsee.org/subjects/56b211548f75320001932005/previews/56b211548f75320001932005_8.jpg 403 (Forbidden)
GET https://static.zooniverse.org/www.chimpandsee.org/subjects/56b211548f75320001932005/previews/56b211548f75320001932005_6.jpg 403 (Forbidden)
GET https://static.zooniverse.org/www.chimpandsee.org/subjects/56b211548f75320001932005/previews/56b211548f75320001932005_10.jpg 403 (Forbidden)
GET https://static.zooniverse.org/www.chimpandsee.org/subjects/56b211548f75320001932005/previews/56b211548f75320001932005_14.jpg 403 (Forbidden)
GET https://static.zooniverse.org/www.chimpandsee.org/subjects/56b211548f75320001932005/previews/56b211548f75320001932005_12.jpg 403 (Forbidden)
GET https://static.zooniverse.org/www.chimpandsee.org/subjects/56b211548f75320001932005/previews/56b211548f75320001932005_15.jpg 403 (Forbidden)

Talk subject page: http://talk.chimpandsee.org/#/subjects/ACP00084qp
preview images 4-15 get access denied errors

Another that fails with its previews and video: http://talk.chimpandsee.org/#/subjects/ACP0007gg1
403 errors in the classifier and these on Talk:
Failed to load resource: the server responded with a status of 403 (Forbidden)
for https://static.zooniverse.org/www.chimpandsee.org/subjects/56b1efa18f7532000190381c/previews/56b1efa18f7532000190381c_0.jpg
Failed to load resource: the server responded with a status of 416 (Requested Range Not Satisfiable) for the video: https://static.zooniverse.org/www.chimpandsee.org/subjects/56b1efa18f7532000190381c/56b1efa18f7532000190381c.mp4

@srallen For ACP00084qp those aren't the right preview links... which page did those URLs come from? (The talk page seems to have the right ones.)
Not sure what's happened with ACP0007gg1. Looking into that now.

@astopy, for ACP00084qp I grabbed those errors from the console when the classifier got stuck loading the subject in the classifier itself. When I saw that happen, I checked its talk page and was getting access  denied errors there too, but checking today it looks like they're working now.

I found another subject with broken previews:
http://talk.chimpandsee.org/#/subjects/ACP000ck02
Images 9-15 get access denied errors.

@srallen But the video is only 8 seconds long here. The other screenshots cannot be available.

@AnLand good catch. The videos should be 15s long, so that means something went wrong with the encoding of this one?

Don't think so, the field team might have changed the SD card and "interrupted" the recording with this. (My interpretation.)

Ok, the front end client is expecting at least 9 images to use for the previews, so we may want to either fix the subject so that there's at least 9 or I could modify the front end to show a placeholder if 9 images are not available. I'd rather do the former than the latter if possible.

Yeah, in this case the original video must have been shorter than normal. If the encoding had failed there’d be no previews at all I think. (Though saying that there are almost certainly others which are broken that we haven’t found yet; I’m still working on a fix for that.)
I’m not sure if generating more images for short videos is really viable — assuming it’s not just this one, we’d have to somehow find all the others first which might not be easy.

On 8 Mar 2016, at 20:40, srallen<EMAIL_ADDRESS>wrote:
Ok, the front end client is expecting at least 9 images to use for the previews, so we may want to either fix the subject so that there's at least 9 or I could modify the front end to show a placeholder if 9 images are not available. I'd rather do the former than the latter if possible.
—
Reply to this email directly or view it on GitHub https://github.com/zooniverse/Chimp-Zoo/issues/96#issuecomment-193958314.

@astopy and @srallen: occasionally videos are shorter than 15 seconds, mostly - as far as I can see while classifying - when the field team is maintaining the camera and stops recording. I do not know whether one can see in the video structure in which videos that might be the case and filter them out. But yes, there are several of them.

@AnLand Ok, I'll think I can at least add in checking the length of the array of previews and making sure there is at least 9 and if not, adding in a placeholder. The interface gets stuck on the loading spinner with this particular subject since there were only 8 previews.
Would a placeholder like this be ok?:

@srallen Yes, that would be great. (I talked to the science team, they agree, too.)

The subject ACP0007gg1 seems to have been created from a video which ffmpeg can't decode, so I assume the original file was just corrupt somehow. I've updated the scripts so database entries won't be created to corrupt files next time
I've run a script against every subject in the database to find any other similar subjects. There were twelve in total (including ACP0007gg1, so three original videos), and I've paused them now.

@astopy Just curious about the errors you were getting with the corrupted videos. I'll be processing videos for Mammoth Bats soon and have used ffprobe with them and had a few videos with some unusual log messages. What kind of errors did these have so I know what to look for?

Sure, this is the error:
ffmpeg version N-53570-gc411e90-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Debian 5.3.1-11) 20160307
  configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --cc=gcc
ffmpeg version N-53570-gc411e90-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Debian 5.3.1-11) 20160307
  configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --cc=gcc
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 28.103 / 57. 28.103
  libavformat    57. 28.102 / 57. 28.102
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 39.102 /  6. 39.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 28.103 / 57. 28.103
  libavformat    57. 28.102 / 57. 28.102
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 39.102 /  6. 39.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mjpeg @ 0x50c7f60] bits 255 is invalid
bits 255 is invalid     Last message repeated 8 times
    Last message repeated 112 times
[avi @ 0x43740a0] decoding for stream 0 failed
[avi @ 0x43740a0] Could not find codec parameters for stream 0 (Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown), 720x480, lossless): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, avi, from '/processing/zooniverse-data/chimps/Liberia_Sapo/Sapo_E4/Lib_C_vid33_E4_20120523/PICT0002.AVI':
  Duration: 00:01:00.83, start: 0.000000, bitrate: 9169 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown), 720x480, lossless, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 44100 Hz, 1 channels, s16, 352 kb/s
[buffer @ 0x4373fa0] Unable to parse option value "-1" as pixel format
    Last message repeated 1 times
[buffer @ 0x4373fa0] Error setting option pix_fmt to value -1.
[graph 0 input from stream 0:0 @ 0x43772c0] Error applying options to the filter.
Error opening filters!
consumer.rb:104:in `system': can't convert Enumerator into String (TypeError)
        from consumer.rb:104:in `block (3 levels) in <main>'
    Last message repeated 73 times
[avi @ 0x50c70a0] decoding for stream 0 failed
[avi @ 0x50c70a0] Could not find codec parameters for stream 0 (Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown), 720x480, lossless): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, avi, from '/processing/zooniverse-data/chimps/Liberia_Sapo/Sapo_A2/Lib_C_vid32_A2_20120526/PICT0002.AVI':
  Duration: 00:01:00.70, start: 0.000000, bitrate: 4742 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown), 720x480, lossless, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 44100 Hz, 1 channels, s16, 352 kb/s
[buffer @ 0x50c6fa0] Unable to parse option value "-1" as pixel format

@astopy Please delete file name from error message. Thanks!

@AnLand Oops, sorry, I've edited it now.


Fixes #293, making the resulting node collection from .Add() sorted in document order

And this applies to all other .Add{...} functions that call .AddNodes().

The CI job #189.1 against Go 1.1 errored, all other CI tests passed. Is this an CI configuration issue?
The errored job logs:
The command "eval go get -v -t ./... " failed. Retrying, 3 of 3.
flag provided but not defined: -t
usage: get [-d] [-fix] [-u] [build flags] [packages]

Hey Jian Li,
Thanks for the nice PR, first of all I want to say I appreciate the time and effort you put into this - I have rarely seen PRs with good documentation and tests right from the start. I would have a few comments, but nothing big regarding the code itself.
That being said, there's a major problem that I consider a blocker: the performance cost of the feature is huge, and as it stands I don't think the feature is important enough to impact all users of the package this way. Here are the before/after relevant bencharks:
goos: linux
goarch: amd64
pkg: github.com/PuerkitoBio/goquery
BenchmarkAdd-4                    200000             10153 ns/op             208 B/op          9 allocs/op
BenchmarkAddSelection-4         10000000               124 ns/op              48 B/op          1 allocs/op
BenchmarkAddNodes-4             10000000               121 ns/op              48 B/op          1 allocs/op
BenchmarkAddNodesBig-4             20000             80606 ns/op           21494 B/op         30 allocs/op

goos: linux
goarch: amd64
pkg: github.com/PuerkitoBio/goquery
BenchmarkAdd-4                      5000            286675 ns/op           93781 B/op       4118 allocs/op
BenchmarkAddSelection-4             5000            273518 ns/op           93620 B/op       4110 allocs/op
BenchmarkAddNodes-4                 5000            272309 ns/op           93620 B/op       4110 allocs/op
BenchmarkAddNodesBig-4<PHONE_NUMBER>6 ns/op         5947528 B/op     148080 allocs/op

Except for the last AddNodesBig benchmark, that's not even on big documents. As it stands, I'm sorry but I can't merge this. I'll try to take a look in the coming weeks if I can improve this or find another way to respect document order.
Thanks,
Martin

Thank you Martin.
I'm developing a web service extracting main content from any website, which relies on this feature. From your benchmarks, I can see the huge performance drawbacks. So I will use my own fork for this feature and close the PR.


Add batch norm option to LSTM.

Implements "Recurrent Batch Normalization" by Cooijmans et al. https://arxiv.org/abs/1603.09025
Some key details and outstanding issues:

Recommended initialization for (gamma, beta) parameters is provided. Gamma needs to be < 1 for batch norm to really work in the recurrent regime. See the paper for details
(Gamma, beta) are shared through time but each time step requires independent running avg and var estimates. This implementation uses a fixed max number of batch norm layers and reuses the last one if needed for long sequences. This can also be made adaptive during training, but I'm not sure how safe it is to add layers mid-training in autograd.
nn.BatchNormalization layers maintain avg and var estimates as separate state that can't easily be passed to an autograd function with optimize=true. Just trying to capture layers as an upvalue doesn't seem to work with optimize=true.

Tests failing, looks like module isn't importing correctly

LGTM!


fix: make supabase.auth.onAuthStateChange work across browser windows

What kind of change does this PR introduce?
Bug fix: ensure onAuthStateChange works across multiple browser windows
What is the current behavior?
Addresses #2739  - "onAuthStateChange does not catch auth state changes across multiple windows"
What is the new behavior?

Note that it might not work if a custom localStorage is provided. So I wonder if this shouldn't listen on a separate key and not on the one responsible for storing the token. That way you could still preserve the token in a different type of storage (like cookies) while being able to broadcast the notification using the localStorage "channel"

@Andarist I think for that to work the other storage provider would need to implement some sort of pub/sub functionality?
I can't think of a way that this could work with cookies - do you have some code that you can share which would clarify how it might function?

Thanks for this @i-pip ! I added your code here : https://github.com/supabase/gotrue-js/pull/184
Made a new PR so I could tidy it up a bit. If you get a chance would love you to test out that PR and make sure it's good !


Switching from optional to required when the value still is not completetly chosen does not close default value menu

Describe the bug
If firstly the optional annotation is chosen but suddelny the required one afterwards, the value selection menu still is active
To Reproduce
See the other text fields and screenshots
Expected behavior
Closing of value selection menu after required is selected
Screenshots (optional)

Additional Context (optional)
No response

Alternative idea: Disable annotation dropdown while an annotation form is open.


Icons page -> icons sets list bug

Gray background is missing (compare vuestic.epicmax.co with local build - local build differs)

Monitor issue >.>


unpkg.com vue-mapbox-map.umd.js link changed

The link to vue-mapbox-map.umd.js on unpkg.com has changed and now the live demo stopped working.
Old link:
<EMAIL_ADDRESS>New link<EMAIL_ADDRESS>

Thanks.
A few changes underway to vuepress docs and some bundling refinements.
New URLS per updated docs.


ArrayWrapper.remove

Changes from Thursday afternoon, 2023-09-28
A classmate entered in their implementation of ArrayWrapper.remove at the podium, and I need to find them to attribute correctly in git.

I think that was me.

Changes merged via a new branch.


Request for documentation: Loop implementation

I am trying to understand the implementation of tf.while_loop and everything that is built on top of it, because I am implementing a custom tf.Graph subclass, and finding that the way tf.while_loop is handled during gradient computation is important for what I am doing.
However, I cannot find any documentation on the ops that comprise tf.while_loop – is there any internal documentation on this implementation?
I am finding myself confused about some of the following concepts:

WhileContext, and, in general, the stack of contexts
Flows vs tensors
Frames

So far I've gotten quite a bit by just reading the source code, but it's pretty hard to build yourself a good mental model by going completely bottom up without having any high level picture of how the entire thing is organized.
If there is no intention to document these things (which would be completely understandable) please feel free to close this issue (although I would definitely appreciate some help or pointers as to where I can figure out the high-level overview of looping implementation).

@yuanbyu might be able to fill in some context here.

I have been working on a doc which we hope to turn into a technical paper. I will give you a copy when it is ready.  In the meantime, feel free to send any specific questions to me.
WhileContext is at this point a python front-end concept to represent a while_loop. It can be nested to represent nested loops. Internally, a loop is a cyclic graph using five primitive ops: Enter, Exit, Switch, Merge, and NextIteration. A loop can be partitioned onto multiple machines/devices, which is done in core/graph/graph_partition.cc. Frame is a concept used in core/common_runtime/executor.cc, which manages the execution of a partition assigned to a device.  Most of the complexity in the python front-end is on backprop of while_loop.

@yuanbyu Thanks, good to hear that a doc is being prepared.
So, here's what I understand so far. Perhaps you can correct any misunderstandings and also this will serve as a useful resource for the time being for anyone else who runs into this.

tf.while_loop accepts a list of loop variables, a function mapping loop variables to a boolean, and a function mapping loop variables to a new set of loop variables.
Internally, this is represented using the special nodes Enter, Exit, NextIteration, Switch, and Merge. Enter, Exit, NextIteration are all semantically equivalent to identity ops (they just forward their input to their output, potentially as a reference), but the fact that they have type Enter, Exit, NextIteration is used by the executor to handle them in a special way. The graph is constructed as follows:

The loop variables are sent through "Enter" nodes.
The Enter node results are then given to "Merge"  nodes. During the graph construction, the inputs to the "Merge"  nodes are two copies of each enter node; when the NextIteration nodes are constructed, the Merge nodes are fixed by replacing one of the Enter inputs with a NextIteration input. In this way, every Merge node (one per variable) gets an input from its respective variable's Enter and NextIteration nodes.
The output of the Merge nodes is passed to the condition function, which takes them and outputs a boolean. This boolean is passed to a LoopCond node. This boolean, as well as the output of the Merge nodes, is passed to Switch nodes, again one per variable. The Switch nodes output a dead tensor to one of their outputs and a live tensor (the merge node output) to the other one, depending on the boolean.
The output of the Switch node is sent to an Exit node (one per variable) or to an Identity op (one per variable), depending on whether the loop condition is false.
The identity op output is given to the loop body, and the outputs of the loop body are fed to NextIteration ops; these ops are the ones patched back in as inputs to the Merge nodes.

The executor has special support for these five primitive ops which make this structure into a loop:

The executor has a concept of a Frame, which is essentially the current iteration of the innermost loop. A frame has state, where all the input and output tensors are stored in a flat vector; each op writes its outputs to a subset of the output vector and gets inputs from a subset of the input vectors; thus, the inputs and outputs of an op can be obtained by just going to the right offset in this vector of Entry values.
A new frame is created when the executor sees an Enter node. A frame is removed when it sees an Exit node. The next iteration of the frame is progressed to when it sees a NextIteration node.
When it sees a NextIteration node, it finds the child of that node (namely the Merge op) and calls ActivateNode on it, in order to continue the loop. Since nodes are not marked ready until all their inputs are non-dead, the nodes that get dead inputs from Switch (e.g. the loop is done) will not get run again.

For every loop during forward propagation, a few things have to happen to create the backprop gradient graph:

First of all, a loop is added to the forward propagation which counts the number of iterations. More accurately, the original loop is added to; this works because of the way the primitive ops are designed. This loop starts with a f_count Enter node and is created in control_flow_ops.py AddForwardLoopCounter.
A history_map is maintained of tensors produced during forward prop, and whenever the backprop needs a tensor from the forward prop, a stack is introduced, and the forward prop has a StackPush added to it, while the backprop has a StackPop added to it that pops from the same stack. In that manner, the forward prop pushes anything the backprop will need onto a stack, and the backprop slowly consumes that stack.

The description above is not quite complete but I think I probably understand enough for what I want to do.
Questions:

Why is there a LoopCond node? Why not pass the output of the condition directly to Switch?
What was the motivation for such a seemingly complicated set of primitive ops? It seems like it's possible to build other control structures on top of them – is that the goal? Were these primitive ops chosen because they make it possible to implement the fairly complex gradient loop generation?
What is an example usecase for parallel_iterations? (This is a simple question which might make sense to add to the tf.while_loop docs)

Also, given that you are already working on documentation for this, feel free to close this issue if so desired – it is not very actionable.

Thank you putting in the time to write that documentation above @gibiansky. Maybe something like that is more appropriate for a pull request? You've signed our CLA and have contributed to the documentation in the past. What would you recommend for him @yuanbyu?

I have written a doc and would be happy to share it with you.
For your questions:

LoopCond is just used as a unique marker so we could understand the graph structure in later stages of graph rewriting.  For example, rewriting the graph to support distributed execution of a loop.

Yes, that was one of the main design considerations. If you are familiar with the dataflow machines invented in the 70s, you would not be surprised by the choice of the primitives. :-) The other main considerations are non-strictness, automatic differentiation, and parallel and distributed execution of both forward and backprop.

A simple example is tf.map.  And it is one of the main reasons that the performance of dynamic_rnn can be as good as static unrolling. For example it allows the dynamic unrolling logic runs on CPU and the actual computation runs on GPU, completely in parallel.

@yuanbyu was the technical doc finally posted somewhere online? Thanks!

@yuanbyu I'm also interested by this technical doc that you are referring too.

@yuanbyu I'm also interested in this technical doc. How can I get the doc or somewhere to see that technical doc?

@skye I remember seeing some docs at some point, but can no longer find them.  Do you have any links?

We have an internal design doc. There's nothing proprietary in it though, so lemme look into sharing it publicly.

Just a heads up that we're working on this! Stay tuned. cc @wolffg

Here is the doc: http://download.tensorflow.org/paper/white_paper_tf_control_flow_implementation_2017_11_1.pdf

It has been 14 days with no activity and this issue has an assignee.Please update the label and/or status accordingly.

Thanks @skye!  Closing this out, since the doc is available.


docker-compose up fails with docker-ce

Installed docker per the Debian instructions, the following two components were installed:
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
<usual apt-get noise>
Setting up docker-ce-cli (5:19.03.3~3-0~debian-stretch) ...
Setting up docker-ce (5:19.03.3~3-0~debian-stretch) ...
...
$ docker-compose --version
docker-compose version 1.9.0, build 2585387
$ docker --version
Docker version 19.03.3, build a872fc2f86
$

Ran docker-compose up command, received the following error:
$ docker-compose up
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
$

I'm pretty new to Docker, so I don't know what I should be looking at to resolve this.

According to the docker-compose release history here, you're using a version from 2016. You will need a newer version that supports format version 3.

Well, that's interesting. I directly followed the installation instructions from https://docs.docker.com/install/linux/docker-ce/debian/.

You forgot to setup the Docker respository (https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-repository). Because of that you pulled Docker from the Debian repository (which usually lags a bit behind).


[auto-merge] branch-0.2 to branch-0.3 [skip ci] [bot]

auto-merge triggered by github actions on branch-0.2 to create a PR keeping branch-0.3 up-to-date. If this PR is unable to be merged due to conflicts, it will remain open until manually fix.

FAILURE - Unable to auto-merge due to conflicts. Manual operation is required.
To maintainers, please use the following steps to fix the merge conflicts manually:
This is a example to fix conflict from branch-0.2 to branch-0.3
git fetch <spark-rapids_remote>
git checkout -b branch-0.3-merge-branch-0.2 <spark-rapids_remote>/branch-0.3
git merge <spark-rapids_remote>/branch-0.2
# fix the merge conflict, then
git commit -am "merge branch-0.2 to branch-0.3"
git push <your forked remote> branch-0.3-merge-branch-0.2

When this is done, create a PR targets the base branch (branch-0.3 in this example).
Once the PR get merged, close the auto-merge PR.


Added getActionUpdateThread to all actions

Checklist

[x] I have filed an issue about this change and discussed potential changes with the maintainers.
[x] I have received the approval from the maintainers to make this change.
[x] This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.
Discussion thread for this change
Issue number: #5993
Description of this change
I tired to check every action if EDT is required or BGT is fine. I found no action were as far as I understand BGT would not be fine. I still have limited understanding of this code base and if there is any action where this is unlikely I am happy to check it again more thoroughly.

FYI a similar change was made in the google branch but not all actions are moved to BGT: https://github.com/bazelbuild/intellij/commit/e3b3fa30b3a705ea8f5ae5d1f337ee1a61f70ceb

FYI a similar change was made in the google branch but not all actions are moved to BGT: e3b3fa3

As I see e3b3fa3 might be more correct compared to what we have done. @LeFrosch could you please consider backporting it?  I see that just a cherry-pick breaks some tests though.


Optional three-layer passive tracers + faster default snapshot interval

This PR allows us to omit passive tracers from a three layer flux calculation (to save memory).
It also decreases snapshot_time_interval = 2minutes from 10minutes. Because I think we want more frequent snapshots both for calibration and for pretty movies.

I guess this script also belongs in examples/, not sure why we put it in idealized...


Remove duplicate code

We have a bunch of code for getting a file-name from the FCB, etc, and we should unify it all.

Closing with no action; turns out there was less duplication than I remembered.


C++ checker: Set default gcc flags to use C++11

GCC has had support for C++11 for a long time now, so it's the appropriate default version of C++ coming from the upstream syntastic repo. Note that C++11 is for all intents and purposes backward-compatible to older C++ versions. Also, I'm assuming that a lot of people have local settings that make C++11 (or even 14) the default, so I suggest upstreaming C++11 as the default.

This is not needed, the same effect can be achieved without a patch, by setting g:syntastic_cpp_compiler_options.
Changes to the defaults are accepted only if they fix major problems (f.i. security).
Your patch is wrong because option -std=gnu++11 can't be overridden by the user.
If C++11 should be the default dialect for GCC then perhaps this should be fixed on GCC's side, not in syntastic.

Sorry, but no.


feat: trace class id and instance

Please read contributing guidelines and remove this line.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#8897  👈
#8840
#8535
#8884
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @IlyasRidhuan and the rest of your teammates on  Graphite


Importing txt from local storage results as links only

Maybe it's my fault, but i have no idea how to solve it atm.
System setup is linux + docker + local storage.
Label studio version 1.5.0
Configuration looks alright.
I'm using directories /mydata for  /label-studio/data and /mydata/pranesimai for /label-studio/files
Docker started more or less OK, the only problem is updates from pypi (so, doesn't matter)
In directory /pranesimai i have a lot of txt files i need to label.
So i setup it as in this picture

After syncing i got a list of files, but instead of content i can see only links and no text.

Similar behaviour i get when i'm trying to import txt file manually.
Import -> drag and drop txt file -> Treat CSV/TSV as TimeSeries -> Import
What i find strange, when importing txt files is why i'm forced to choose that Treat CSV/TSV option? It's plain text file!
Any ideas how to solve it?

Add valueType="url" to your Text tag in the Labeling config.


Allow CA issuer secret rotation

Is your feature request related to a problem? Please describe.
The CA issuer will automatically rotate secrets for the secrets it generates, but what about rotating its own secret and certificate? What happens when its certificate expires? Anything trusting the secrets it generates will break. And if you give it a new secret? Well now either you have to instantly renew all certificates and make everything pick up those certificates at the same time. There has to be a better way.
Describe the solution you'd like
Provide the ability to configure multiple secrets (or at least, one secret, and additional certs). The additional certs are configured in k8s secrets as additional certs that a consumer should trust. Consumers can pick up these additional certs, and them to the list of root cas they trust. Now, it is possible to rotate ca certificates, without ever having something not trusting a certificate that should be trusted, with the following procedure:

Generate the new private key/cert for the ca cert, and create a new secret for it.
Add the secret to the ca issuers list of additional secrets. The ca should update all secrets it's generated to include this additional CA.
Wait for long enough for all consumers to pick the additional CA up, so now everything trusts two different root CA certificates.
Update the CA issuer to use the new secret as its primary secret, and move the old secret to its list of additional secrets.
Wait for all existing issued certificates to expire/be rotated.
Remove the old root CA certificate from the list of additional ca certificates in the issuer.

Describe alternatives you've considered
I don't know if there are any alternatives - as discussed above, there's no other way to rotate root certificates without risking an outage.
/kind feature

/remove-lifecycle stale

/area ca
/priority important-longterm

We suffer the same issue, we are using kiam and have setup an issuer with a self signed CA cert, but if the CA cert renews, the old server and agent certs are no longer valid, often resulting in an outage forcing us to remove the agent and server cert secrets to let it generate new ones.
Would be greate if there could be a dependency chain or something where we could link the agent/server certs to the CA cert and have them renew when the CA cert does.

This is something we've been planning to do for a while but isn't easy to execute properly. It is on our longer term roadmap, however PRs are always welcome

I think the solution here requires preserving both the old and new CA key for some overlapping period during the renewal.  This also means publishing a "caBundle" rather than just a single CA in secret/ca.crt, etc.
For cert-manager, I think this means we need a way to keep both keys around, and this implies we need a "secret selector" rather than just a single "secretName".  It's possible we should do that for all Certificate->Secrets anyway(??).  Alternatively, I think we only need the old CA public key, so we could just special case preserving CA tls.crt somewhere in the ca Issuer itself...

t=0: We have only the original CA. Life is simple.
t=$renewBefore: Original CA key reaches renewBefore
Generate new CA key.  We now have two CA keys (old and new), and both are valid.  Clients should validate that remote key satisfies either CA.
All new cert signatures should be performed with the newest key (or key with longest remaining valid time?)
Publish both CA keys to all clients.  In cert-manager, I think this means including both CA certs in Secret.data ca.crt.
All (valid) certificates signed by original CA key need to be signed by new CA key.  I think this is best handled by making the CA rotation time longer than the leaf cert renewal time and let natural cert rotation do its thing - but it could be handled by explicitly re-signing everything earlier than expected.
t=$duration: Original CA key has expired and can be deleted.  Remove from ca.crt caBundle.  Clients should ignore it anyway, since expiry time is embedded in the cert.
Goto 1.

We have an issue where we have these:
NAME                                                    READY   SECRET                     AGE
certificate.cert-manager.io/app1-auth-cert      True    app1-auth-tls      7d21h
certificate.cert-manager.io/namespace-root-ca-cert     True    namespace-root-ca-cert    7d21h

NAME                                               READY   AGE
issuer.cert-manager.io/namespace-issuer           True    7d21h
issuer.cert-manager.io/namespace-root-ca-issuer   True    7d21h

Details on the resources:
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: namespace-root-ca-issuer
spec:
  selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: namespace-root-ca-cert
spec:
  commonName: namespace-root-ca
  isCA: true
  issuerRef:
    name: namespace-root-ca-issuer
  secretName: namespace-root-ca-cert
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: namespace-issuer
spec:
  ca:
    secretName: namespace-root-ca-cert
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: app1-auth-cert
spec:
  commonName: app1.namespace.svc.cluster.local
  dnsNames:
  - app1
  issuerRef:
    kind: Issuer
    name: namespace-issuer
  secretName: app1-auth-tls

The problem is, if namespace-root-ca-cert expires, app-auth-cert still contains the old, expired ca.crt. Our workaround is to delete the app1-auth-tls secret, which forces it to be regenerated (probably reissued). (the certificate in app-auth-cert is valid, but its CA in the ca.crt is not anymore (expired). (We had this with cert-manager 0.9.1 and still have it with 1.3.1 (I haven't tried newer versions yet))
Automatically reissuing the certificates issued by a CA if its certificate change seems like the most obvious solution. (I'm not exactly sure how our app validates the cert - the microservices might be using the ca.crt from its own certificate secret (I only left 1 app cert in the examples above to keep it shorter)
/remove-lifecycle rotten

So ... I understand the issue, and how it has not yet been resolved.. quick question though. If we need to rely on making sure that our applications mount in the actual certificate authority ca.crt file, rather than the bundled copy that comes in our application-tls-secret, how are we supposed to get that data safely without granting access to the CA's Secret resource that technically includes the CA private key information?

@diranged They discuss this here and suggest you have to manually distribute the ca cert out to clients.  Probably not what you're hoping for.
They provide CA Injector but it only applies to webhooks and api services, not other secrets.  Perhaps CAInjector could be extended to inject into pods or similar.
However, when a CA cert is rotated and clients are referencing the "original" cert rather than the one used to issue the cert they are checking, you need clients to accept both the old and the new CA during the transition.  That makes it trickier to automate.
I could see that cert-manager could in theory support this scenario with some very clever logic to keep the old CA certs around for some grace period and so on.  But I'm not sure they'll be applying the man power to do that.

@dobesv This is because of the dates on the cert, I presume. Not the notAfter date, but the notBefore date? So in this case, what it seems to me this means is that even in an environment where we can dynamically rotate these CA certs frequently, we actually don't want to do that. We want to have fairly long lived CA certs and replace them fairly early. Eg.
Take a scenario where we use 3-month certs for our applications (which are renewed 15D before expiration). In that case, we might want a 1-year CA cert that is renewed 6 months before it expires. For this timeline:
T+0: CA is created, expires at T+356D version ca-0
T+1D: Client Cert is created, expires at T0+91D, version client-0 (includes ca-0)
T+76D: Client Cert is renewed, expires at T0+166D, version client-1 (includes ca-0)
T+166D: Client Cert is renewed, expires at T0+256D, version client-2 (includes ca-0)
T+180D: CA is renewed, expires at T+547D version ca-1
T+346D: Client Cert is renewed, expires at T0+436D, version client-3 (includes ca-1)
..
Does that look right?

@diranged I don't think I really understand what you are asking here.
But maybe it will help if I just expand on why you need two CA certs to be valid at the same time.
When you rotate the CA cert, there will be a period of time where the CA cert is new but the existing clients (and possibly servers) will not be updated yet.
In this case, if there's a mismatch between the CA used by the client and server, the connection will fail.
The way to gracefully transition CA certs is to:

Issue a new cert
Tell everyone to accept certs signed by old and new CA cert
Issue new certs using the new CA
Tell everyone to stop accepting certs signed by the old CA

I suppose it's possible that you aren't worried about failed connections during the transition period.  If that's the case then nevermind, you can just roll out the new CA and accept the downtime when clients and servers are out of sync about which CA cert is in use.

What am I missing?

I don't know.
Can you show what the issuing certificate information was for matt-tls.pem to see what CA it was signed by?
What you use some totally unrelated CAfile, will openssl actually report an error in that case or is that command not really checking that the certificate is related to the CAfile you provide?

ca-v0.pem
-----BEGIN CERTIFICATE-----
MIIDBTCCAe2gAwIBAgIQdaZftupJhkcz5EUw/a+8kDANBgkqhkiG9w0BAQsFADAS
MRAwDgYDVQQDEwdtYXR0LWNhMB4XDTIyMDEyNDE1NDMzMFoXDTIyMDEyNDE2NDMz
MFowEjEQMA4GA1UEAxMHbWF0dC1jYTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAM4slYHJ62fXtClSr3Dv0SsuDPr7V9zpnXn0p35vvdvUwABeW0Fo7nVc
ltvQTYldmwVH6/2gdKbIiWpm0yf1dwKrJI6KE/y+LrkKR+0wIY4qqJ9a5Ut65rxD
8+mJqNyJr0DZmWszJdJlx9Th8GYEE95Zuxt7Ld6mBoDuQczZ/mGR6GS8pqM+tJEb
m0Kh2Z+U+aIbQZWHsA0dsptc18WolK89h2bZeUUTMGdQuEtQqQQa2lxec5nMNTIv
oDMOUvi3UNnOL6tgy/aduPy74U1of8r4wZKZLdpBqWlKWLgW4cRNWxZ7zJu7HqmR
8jfdFB2lk9SasM0Cqd9b1XYVpXSfvP0CAwEAAaNXMFUwDgYDVR0PAQH/BAQDAgKk
MA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFM5jHXZLtVIPKGdpUO3a4c7PGy4S
MBMGA1UdEQQMMAqCCG1hdHQuc3ZjMA0GCSqGSIb3DQEBCwUAA4IBAQDIyoWHIs1c
dQbR67HVDJ7d/8UpkaAC3KP+GHOVOK3CB0pr+WybTPnon5FeL3WDUrE3pVU2USVp
erJrzZkEszyHAiciMGNS26REGPfN9aWGzjUH56rTSLKOw4h9NQKIR4WR8mRXHCks
1GKzUjFpyrwegj2Xq8JYSM4roy1jv3Fu/8fa2g+LvqCyL5/4Uh5GTqgLyF3xbyrH
Sf0hGExGVrxrq0g6caF1OaZck4spkBPVe1Mk4hxrBO6veRfFUHdNHb5Il3GklaIL
YZfqN87qsM1p8G/0hj5E1J5h940IAPmjTcSuRDyDnbwLjXkq8kMuKSkbY0r96UjX
sCf4tnDnC3N0
-----END CERTIFICATE-----

ca-v1.pem
-----BEGIN CERTIFICATE-----
MIIDBjCCAe6gAwIBAgIRAILjHvMho7s01eywyXlvb5IwDQYJKoZIhvcNAQELBQAw
EjEQMA4GA1UEAxMHbWF0dC1jYTAeFw0yMjAxMjQxNTQ4MzBaFw0yMjAxMjQxNjQ4
MzBaMBIxEDAOBgNVBAMTB21hdHQtY2EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDOLJWByetn17QpUq9w79ErLgz6+1fc6Z159Kd+b73b1MAAXltBaO51
XJbb0E2JXZsFR+v9oHSmyIlqZtMn9XcCqySOihP8vi65CkftMCGOKqifWuVLeua8
Q/Ppiajcia9A2ZlrMyXSZcfU4fBmBBPeWbsbey3epgaA7kHM2f5hkehkvKajPrSR
G5tCodmflPmiG0GVh7ANHbKbXNfFqJSvPYdm2XlFEzBnULhLUKkEGtpcXnOZzDUy
L6AzDlL4t1DZzi+rYMv2nbj8u+FNaH/K+MGSmS3aQalpSli4FuHETVsWe8ybux6p
kfI33RQdpZPUmrDNAqnfW9V2FaV0n7z9AgMBAAGjVzBVMA4GA1UdDwEB/wQEAwIC
pDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTOYx12S7VSDyhnaVDt2uHOzxsu
EjATBgNVHREEDDAKgghtYXR0LnN2YzANBgkqhkiG9w0BAQsFAAOCAQEAP8sswfFV
H+D/EbQOIEaD0QsFGCj3bgVDQd4lV5aWGUKuFbrUJzO2laNvvW2xKZIxCXCG2ldt
obFUpUh/A8/7IOwotMLShjdrJqCQqyQiAOEljM7FbdZuyYCSnUP/tpTaw9hKm5Ii
2qfuf4CtFuaTnWUhABiOiwJCUg2hQos+w0uBqBASvUALZgt3LFp+HHxhNtPEFje5
78j0rSU3+lYp4jQNWnx8xisWbqlK25TWpGXAG16KAOVqEDTYuSGab1r7fpOWdhfr
eKRTBkvMoxdgfr4wWpBiFcMPAIEpJ5z34e8Dqc4HM2X5RixIZ3rJ3v6a2ITbPkPf
YeQ9l9MSyFMAuQ==
-----END CERTIFICATE-----

matt-tls.pem
-----BEGIN CERTIFICATE-----
MIIC/zCCAeegAwIBAgIQTYgk8fMUunZMAH0E1H4GGTANBgkqhkiG9w0BAQsFADAS
MRAwDgYDVQQDEwdtYXR0LWNhMB4XDTIyMDEyNDE1NDcxNVoXDTIyMDQyNDE1NDcx
NVowEzERMA8GA1UEAxMIbWF0dC10bHMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQD50T8d0i+ZCkELBA4O3Oe4NEKLNjmScLGjlycCvbmqUHkifDobaZvZ
CTzpZSskQTa9l63aRTsuSpDT4WPyiK3xFBieG5nEMX1BpYPVhdWBuKwboOAUliSD
BA8P92EScC14+1SGHrFqbpP17ARy/pwoF6/04AsMuHpRC+Xbd2v2PkQYSRc2V5Yu
8lWL8lwGk/0B1UOZDaLx5RAEPqPXpmKBm3Kzj+0sTO0DNcxyJlQPNpWIzJoMsKLa
Mqwcx+KUvyEdgN8JPsvBezPQhL4FUqlGJ1pzTRcqrIuXH0ewsRh85JRuqgiaHk/e
SjpmZFsWpVGMQiIiOanaJnM5WnWck9LBAgMBAAGjUDBOMB0GA1UdJQQWMBQGCCsG
AQUFBwMCBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFM5jHXZL
tVIPKGdpUO3a4c7PGy4SMA0GCSqGSIb3DQEBCwUAA4IBAQCefrdUcB62DTfC71BC
3Gu2Seh5EpuhYvvhiWbrfaNgwj1axUs5IWuVnY/RNoLOXl4AqBwLWl6h6ufzVfOO
t7SbVfRr0W2Yx75w8aqd5rnhvudgZ/XJC5xfG9UOLPpL0iipYkh802zT1XisYJeF
+t/lO8HexnG3JfOJpYSfjSZaZbWIhdt6UYD7WeHaZDpcYOXIbKfBxjFJgOn06yHa
uJRFl96IrL3fdresh7cDroDiialXAxn3ysDt0ZpZl0k2yIexRBhqqKCFBqVzGGyM
GB/ZNRqmoC0ZRrH6zEkeVYeLsRV4ZNW+f9ThB9j4+NpmbTVExBCb4V8u70zrL8fo
VoR8
-----END CERTIFICATE-----

ca-v-xx.pem
Here's a cert that was created a few hours later after the renewal process has happend a ton of times:
-----BEGIN CERTIFICATE-----
MIIDBTCCAe2gAwIBAgIQOS3eOUWYDeNmLZKWqcNqgzANBgkqhkiG9w0BAQsFADAS
MRAwDgYDVQQDEwdtYXR0LWNhMB4XDTIyMDEyNDE3NDMzMFoXDTIyMDEyNDE4NDMz
MFowEjEQMA4GA1UEAxMHbWF0dC1jYTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAM4slYHJ62fXtClSr3Dv0SsuDPr7V9zpnXn0p35vvdvUwABeW0Fo7nVc
ltvQTYldmwVH6/2gdKbIiWpm0yf1dwKrJI6KE/y+LrkKR+0wIY4qqJ9a5Ut65rxD
8+mJqNyJr0DZmWszJdJlx9Th8GYEE95Zuxt7Ld6mBoDuQczZ/mGR6GS8pqM+tJEb
m0Kh2Z+U+aIbQZWHsA0dsptc18WolK89h2bZeUUTMGdQuEtQqQQa2lxec5nMNTIv
oDMOUvi3UNnOL6tgy/aduPy74U1of8r4wZKZLdpBqWlKWLgW4cRNWxZ7zJu7HqmR
8jfdFB2lk9SasM0Cqd9b1XYVpXSfvP0CAwEAAaNXMFUwDgYDVR0PAQH/BAQDAgKk
MA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFM5jHXZLtVIPKGdpUO3a4c7PGy4S
MBMGA1UdEQQMMAqCCG1hdHQuc3ZjMA0GCSqGSIb3DQEBCwUAA4IBAQC9dasTiSyk
iVeCH+/ya+F84jyyw2T+OehfW2cst1am+LLlnE4p2Ia6bl1xwvWy27IlT27XYO11
4PloCkDZISmCqXO0URlGeH7ZHKcisLujmvpNfBIK56UuHmYNfYYeb2OFL9x8YJ6a
fFP7dNQPBrczaazi8N5Yr4Gsl0MjUH41RaYMBqhNQyOofYgQ2eaf7vYOiDDBPBSO
9AmwNe4W18uTVmC7bTcx2TSTy9miGHvZWDVP9El/u/XSTpSzsRKvbsWAg0wIHIz5
7mW603yCQL0n1rvLRtbowjTR3kSNWVKPmLdcKZ3Y1XmVKT+F/2Wl1Vc24VBHMa1s
XwWFWhyGCRMO
-----END CERTIFICATE-----

I tested the matt-tls.pem against the ca-0.pem and ca-1.pem files a few hours after they expired, and as expected they fail to verify. However, testing against the most recent ca-v-XX.pem file, they work:
$ openssl verify -verbose -CAfile ca-v-XX.pem matt-tls.pem
matt-tls.pem: OK
$ openssl verify -verbose -CAfile ca-v0.pem matt-tls.pem
matt-tls.pem: CN = matt-ca
error 10 at 1 depth lookup:certificate has expired
CN = matt-ca
error 10 at 1 depth lookup:certificate has expired
OK
$ openssl verify -verbose -CAfile ca-v1.pem matt-tls.pem
matt-tls.pem: CN = matt-ca
error 10 at 1 depth lookup:certificate has expired
CN = matt-ca
error 10 at 1 depth lookup:certificate has expired
OK

Hmm well TBH I'm not an expert on the matter so maybe someone who knows more will chime in.  Maybe my assumption that trust does not transfer from one CA to another is incorrect.

@diranged
I think the reason it is working for you is that you are issuing a new CA certificate using the same private / public key values as before.  All that has changed is the dates and the signature.
My assumption was that rotating the key means that the private & public key are changed in the process.  That's the source of my confusion here.
The original issue description clearly specifies that for them at least rotating the keys starts with "Generate the new private key/cert for the ca cert"

@dobesv Fair - You are right, that confusion makes sense... so my particular issue here is that even in a normal renewal without a private key replacement, the downstream "server/client certificate" secrets should be updated automatically with the latest copy of the ca.crt bundle.

@diranged It sounds like as long as your certs renew often enough, you shouldn't have any issue.  Maybe just setting a more frequent renewal time would be good enough.

While  there are ways for me to work around this, I think honestly it makes sense for the controller to update the Secret's when the Issuer has its ca.crt bundle updated. Especially in a situation where you have a ClusterIssuer and you don't have access (nor do you want it!) to the Secret bundle for the CA certificate (because it keeps the private key contents).

Consider a software package like Apache NiFi that uses certificates to mutually authenticate distributed processes, mapped one each to Pods in a StatefulSet.  Using a wildcard secret is strongly discouraged by the NiFi developers.  So let's use cert-manager, creating an self-signed CA Issuer for all those certificates consumed by the Pods.
A naïve attempt to add cert-manager support to a NiFi Helm chart would create a self-signed CA certificate and Issuer, and then individual certificates for each Pod.  A simple sidecar script would import the CA certificate into the NiFi truststore and the Pod secret into the keystore.  Works great!  And a few weeks later, it's easy to scale up the StatefulSet from 2-wide to 3-wide, with cert-manager obligingly creating the new NiFi Pod certificate.
So here's what we have:

nifi-ca certificate, created on (say) 2 January, expires on 2 April
nifi-0 certificate, created on 2 January, expires on 2 April
nifi-1 certificate, created on 2 January, expires on 2 April
nifi-2 certificate, created on (say) 5 March, expires on 5 May

From 5 March to 2 April all is good.  But on 2 April it all falls to pieces.  cert-manager happily renews the nifi-ca, nifi-0, and nifi-1 certificates.  The simple sidecar script updates the truststore on nifi-0, nifi-1, and nifi-2 with the new nifi-ca certificate.  But now nifi-2 is out in the cold, because its certificate was signed by the 2 January version of nifi-ca, not the 2 April version.  But nifi-0 and nifi-1 no longer have the 2 January version nifi-ca certificate in their truststores, so they no longer trust nifi-2's certificate.  nifi-2 falls out of the NiFi collective, data stops flowing, pagers go off, etc.
What to do?  Today's options include:

Kick the can down the road by making the nifi-ca certificate valid for 10 years, like Kubernetes does.  (Not really solving the problem, just making life miserable for the poor soul whose NiFi breaks in a decade for no apparent reason, because doesn't cert-manager handle all that certificate rotation transparently?)
Extend the sidecar script to iterate over all the client certificate Secrets, adding all their ca.crt fields into the truststore.  (Sort of defeats the purpose of having a trusted certificate authority.)

And no, keeping the 2 January version of nifi-ca in a persistent volume claim (PVC) in the nifi-0, nifi-1, and nifi-2 Pods doesn't completely solve the problem.  Because if we scale up the StatefulSet to 4-wide on (say) 15 April, all nifi-3's PVCs are brand new and empty.  There's no cert-manager API that will supply all the prior versions of nifi-ca to populate nifi-3's truststore with both the 2 January and 2 April versions of the nifi-ca certificate.  So once again,  nifi-2 won't be trusted by the new nifi-3 truststore.
So @dobesv would you please either give us an option to (A) limit the lifetime of a certificate to that of its Issuer's CA, or (B) an option to automatically renew the certificates signed by an Issuer when its own certificate is renewed?

So @dobesv would you please either give us an option to (A) limit the lifetime of a certificate to that of its Issuer's CA, or (B) an option to automatically renew the certificates signed by an Issuer when its own certificate is renewed?

I'm not actually a maintainer or contributor to this project, just a user.  I tried to be helpful replying on this issue with some possible workarounds for some use cases, but I'm not an authority on the project or anything.

Extend the sidecar script to iterate over all the client certificate Secrets, adding all their ca.crt fields into the truststore. (Sort of defeats the purpose of having a trusted certificate authority.)

The purpose of public key infrastructure (PKI) is to allow untrusted parties to communicate.  If you control all the nodes in question, there's only one party so maybe trust can be assumed? If so, the trusted CA has no purpose, so it doesn't matter if you have defeated it.
That said, I do think cert-manager should address this issue so that the certs cannot outlive the CA cert, it seems like a bug to me.

@dobesv thanks for your polite response, given my mistaken understanding.
Maybe I should have tagged @meyskens instead?

They have already given their response here: https://github.com/cert-manager/cert-manager/issues/2478#issuecomment-734886778
If you want to move this issue forward the next step is to open a PR.

Non expert suggestion: Could the CA Issuer curtail notAfter and/or renewalTime to the timing of the CA to prevent them from getting mutually out of sync? It seems strange for it to happily issue certificates doomed to be invalid after the CA's expired but to in and of themselves claim otherwise.

Non expert suggestion: Could the CA Issuer curtail notAfter and/or renewalTime to the timing of the CA to prevent them from getting mutually out of sync?

That would definitely help with part of the problem.
However, the CA will eventually be renewed prior to its actual expiry date and at that point you will want multiple CA certs to be trusted between the time you issue the new CA cert and the the time the prior CA cert expires or is revoked.

Im curious if this issue happens if the renewing CA certificate is re-using the same private key, which I think is still the default behaviour rotationPolicy: Never?
I didn't encounter this issue when reusing the private CA key with mTLS authentication setup for kiam as the leaf certs continued to be valid, but I'm not sure if I'm missing something here that might bite me later

if the renewing CA certificate is re-using the same private key

I guess you're not really rotating the CA key here, though, you're just issuing a new certificate with new expiry dates.

That said, I do think cert-manager should address this issue so that the certs cannot outlive the CA cert, it seems like a bug to me.
chiming in to say that exactly this happened to me 3 months after setting up the documented self-signed > CA Issuer > certificate chain, and the solution to this problem is absolutely not obvious

/remove-lifecycle stale

/remove-lifecycle stale

I feel like these are related:

https://github.com/cert-manager/cert-manager/issues/4344
https://github.com/cert-manager/trust-manager/

Although the suggestion there is to manually copy issued CA certs into the bundle. I feel that an automated solution to maintain previous CA certs would still be valuable, maybe a new CRD called RotatingIssuer or something.

We hit this on a webhook today.

Just think out load on the implementation, would it be possible to add a new field in the Issuer and ClusterIssuer to have an optional field called "autoRotateLeaf: true"
In which case if the spec.ca.secretName get changed somehow, it automatically deletes all the cert it issued and re-issue new ones?
The implementation could be a reconciler watch the secrets and delete secrets that issued by this issuer.

/remove-lifecycle stale

Any updates on this issue? Are there any plans to get such feature as autoRotateLeaf: true? Would be awesome to have it, since we are facing exactly that issue in our project.
Our current solution is so watch the CA for rotation in our operator and then manually delete the corresponding leaf certs.

Hey JeremyHarisch,
I'm watching this issue because I also really want the autoRotateLeaf option but wanted to say while we wait you don't need to manually delete the leaf certs
Borrowing from anguslees' comment
https://github.com/cert-manager/cert-manager/issues/2478#issuecomment-751946946
have your CA last at least twice as long as the child cert.
Then the renewbefore kicks in 2/3s of the CA's lifetime but is still valid for the lifetime of the child cert
For example
CA lasts 1 year
cert lasts 6months
day 1 new CA new cert everything is working
month 6 cert rotates with old CA, everything works
month 9 CA renews, but that's fine, the current CA is still valid for another 3 months so everything works
month 12 cert renews and takes the new CA, CA is only 3 months old at this point so does nothing

We ran into this today. Our go-forward solution probably includes no longer creating ClusterIssuers. IIUC we can get the same effect without this problem by leveraging trust manager to make a CA bundle available for any local namespace level Issuer.

/remove-lifecycle stale

/remove-lifecycle stale

/remove-lifecycle stale

thats why I am changing of company every year ^_^

/remove-lifecycle stale


error on windows

ImportError: No module named 'aiohttp'

Just do the following
pip install -r requirements.txt
Btw, it won't work on windows, read the description.
I'm closing the issue, if you have any questions feel free to reopen the issue or create a new one.


Filter the AddressBook sorted entries before displaying them

What it solves
Resolves #2965
How this PR fixes it
On searching for an existing AB entry we compare now the addresses checksum.
Before updating the Redux store we filter out AB entries with same address and chainId
How to test it
On any conditions, exporting and importing your address book should not generate any duplicated entries in the "Address Book"
Screenshots

I'm not proud of this PR. The bug seems to occur if the user had old data (don't know how old) in the Address Book and on exporting and importing it would create duplicated entries.
I was not able to reproduce it locally but open the PR to validate my solution and to share the deployments with the QA to see if it resolves the problem.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 5 (20.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.002%) to 31.581%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/logic/addressBook/utils/index.ts
1
3
33.33%

src/routes/safe/components/AddressBook/index.tsx
0
2
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.002%

Covered Lines:
2975

Relevant Lines:
8375

💛  - Coveralls

IMO it's not worth it fixing it like this. We should fix the import.

IMO it's not worth it fixing it like this. We should fix the import.

Fair enough. The import is working as expected, as it also overrides the duplicated entries https://github.com/gnosis/safe-react/blob/434fa9f45dd586403866cd3096b1280f387621ae/src/logic/addressBook/store/reducer/index.ts#L19-L30
It is very inefficient trying to fix this bug without actually being able to reproduce the faulty behavior.
Is there a more specific suggestion on how to fix the import? Maybe we could pair or should other dev (that can mimic the bug) pick it?

@liliya-soroka can you share the content of your LS with the dupes?

Does @liliya-soroka's csv file have duplicates in it, or is it a purely visual based bug?

Does @liliya-soroka's csv file have duplicates in it, or is it a purely visual based bug?

The .csv we used to reproduce it had no duplicates.

I was able to reproduce the bug by making getEntryIndex return false
https://github.com/gnosis/safe-react/blob/1566910b222b49a65e49502fac84d565e1f4ba5f/src/logic/addressBook/utils/index.ts#L60-L72
Used that data with duplicates to implement a filter before we return the reducer state so old duplicates are filtered out.

So I didn't have issues by importing csv with repeated entries, but I also didn't had issues back in prod when this issue was reported.
I can say that the importing is fine, and when you export it seems that all the repeated entries are removed (I import 110 entries in my file and you export 93 cuz the duplicated ones were not added to the LS), so that's good
@liliya-soroka You describe a way to reproduce it by using the mobile app. I'd like to see if that can be tried in this PR and verify if this works.

@francovenica you could test by lowercasing all the addresses in your CSV.

Ok, tried by having a csv with the same entry 3 times, one checksummed, and the other 2 with upper and lower case characters.
After importing the address book still shows only 1 entry.
Looks good to me