Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Keenan Brock
@kbrock
lol - stupid covid
Jason Frey
@Fryguy
haha
eternal March
Joe Rafaniello
@jrafanie
what's the error?
Keenan Brock
@kbrock
the ides or march?
    7:       def keep_events
    8:         ::Settings.event_streams.history.keep_events
    9:       end
   10:
   11:       def purge_date
=> 12:         keep = keep_events.to_i_with_method.seconds
   13:         keep = 6.months if keep == 0
   14:         keep.ago.utc
   15:       end
       expected 2021-02-01 09:41:28.197186000 +0000 to be within 172800 of 2021-02-03 17:08:46.200341000 +0000
it is when you upgraded ruby and showed that 3.months.ago is probably 92 days ago
I’m guessing?
Keenan Brock
@kbrock
changing to within 3 days of works
think the issue is we have a short february, a 31 day and a 30 day
Jason Frey
@Fryguy
Oh the test says 3 months?
Keenan Brock
@kbrock
before now, december is 31, jan is 31 and feb is short
Jason Frey
@Fryguy
(I can't figure out where you are getting feburary from)
Keenan Brock
@kbrock
but that just squeeks by
Adam Grare
@agrare

I can't figure out where you are getting feburary from

because 3 months ago was February

Keenan Brock
@kbrock
3 months ago pass april 30, march 31, feb 28
Jason Frey
@Fryguy
yeah but where did 3 months come from
is that in the spec?
Adam Grare
@agrare
stub_settings(:event_streams => {:history => {:keep_events => "3.months"}})
Joe Rafaniello
@jrafanie
this is the test, right?
      it "using '3.month' syntax" do
        stub_settings(:event_streams => {:history => {:keep_events => "3.months"}})

        # Exposes 3.months.seconds.ago.utc != 3.months.ago.utc
        expect(described_class.purge_date).to be_within(2.days).of(3.months.ago.utc)
      end
Jason Frey
@Fryguy
thanks
Joe Rafaniello
@jrafanie
I just want to confirm we're all talking about the same test
Keenan Brock
@kbrock
sorry - hard to know how much context is out there
think changing to 3 days so this works for the 3 of the 4 mays
Joe Rafaniello
@jrafanie
well, how about we lay out a few examples and say what it should do...
Keenan Brock
@kbrock
this will only fail in may - on non leap years
Joe Rafaniello
@jrafanie
beginning of may or end of may too?
Keenan Brock
@kbrock
pretty sure. 3 months ago
Jason Frey
@Fryguy
so will it go green tomorrow?
Keenan Brock
@kbrock
it will go green June 1
Joe Rafaniello
@jrafanie
so we can just wait :laughing:
Jason Frey
@Fryguy
haha
Keenan Brock
@kbrock
last year it will have been green all year 2020
I’m sorry, we do not merge code in May since the tests are always red.
except leap years - then we can merge it
ok, I’m changing to within 3 days and calling it a night
either that or deleting this code :)
Jason Frey
@Fryguy
:+1: 3 days is good
wonder why the test says 2 days to begin with
Keenan Brock
@kbrock
it is basically good enough - last year for sure
Joe Rafaniello
@jrafanie
off by one errors
Keenan Brock
@kbrock
lol - maybe we could cache those values - only invalidate them on leap year - and then what would we call that thought?
(gotta hit all 3 of the tough things)
jpurca
@jpurca
Hi, can someone explain to me what is the reason for these errors?
Captura de Pantalla 2021-05-03 a la(s) 17.36.06.png
Joe Rafaniello
@jrafanie
Is that access denial coming from custom automate code? I don't see any of those keywords when searching the manageiq codebase @jpurca
Jason Frey
@Fryguy
Those look like Azure errors (sepcifically saying that the there are auth errors to azure)
Joe Rafaniello
@jrafanie
thanks, I missed the 403 forbidden, yeah... you're right, those denials are happening when talking to azure