Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: E2E test failure with new namespace #1615

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

aceppaluni
Copy link

@aceppaluni aceppaluni commented Jan 22, 2025

Proposed changes

Removed call to reset and ensured polling to up-to-date. This PR aims to correct issues with e2e failures when adding in namespaces.

Fixes # 1545


Types of changes

  • Bug fix
  • New feature added
  • Documentation Update

Please make sure to follow these points

  • I have read the contributing guidelines.
  • I have performed a self-review of my own code or work.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generates no new warnings.
  • My Pull Request title is in format < issue name > eg Added links in the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • My changes have sufficient code coverage (unit, integration, e2e tests).

Screenshots (If Applicable)


Other Information

Any message for the reviewer or kick off the discussion by explaining why you considered this particular solution, any alternatives etc.

@aceppaluni aceppaluni requested a review from a team as a code owner January 22, 2025 17:15
@EnriqueL8
Copy link
Contributor

Thanks for raising this!

Comment on lines -478 to -485

func Reset() {
config.RootConfigReset(setDefaults)
}
Copy link
Contributor

@EnriqueL8 EnriqueL8 Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to check where this is being used as it is and failing the CI

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do coreconfig.Reset() and Reset() mean the same this. I noticed the difference in syntax and was not certain if this was a separate function?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah they are the same function. The other file is calling the Reset() that you just deleted in the coreconfig pkg

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so I would need to remove them from there also correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that is correct

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed them :). I did remove the additional calls to Reset that were made in additional files as well. I came across internal/events/event_manager_test.go and I noticed there is a line that reads "defer coreconfig.Reset()". I am wondering if the best step is to remove the "defer" keyword? I am still learning GO and from what I understand this word must follow a function or method call. If its not removed would I add this word before "mdi := &databasemocks.Plugin{}" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So defer will run when the function exists. I think we can remove all the places where that old reset API is called and instead rely on the file system reload

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, I will remove the additional lines. Thank you!

Signed-off-by: Angelina <[email protected]>
Signed-off-by: Angelina <[email protected]>
Signed-off-by: Ry Jones <[email protected]>
Signed-off-by: Angelina <[email protected]>
Signed-off-by: Ry Jones <[email protected]>
@aceppaluni aceppaluni reopened this Mar 12, 2025
@EnriqueL8
Copy link
Contributor

@aceppaluni I believe you have some merge conflicts from merging main into your branch, can you resolve those please

@aceppaluni aceppaluni reopened this Mar 13, 2025
@aceppaluni
Copy link
Author

Hi @EnriqueL8 I am attempting to resolve the conflicts however when I do so, I still seem to have changes inside VS code that are not corrected. Is there a way to correct this?

@EnriqueL8
Copy link
Contributor

You should be able to use the resolve editor in VSCode to help you walk through the merge conflicts

@EnriqueL8
Copy link
Contributor

If that is too painful as a lot has gone in, you could recreate a new branch at the tip of main and then cherry-pick your commits on top

@aceppaluni
Copy link
Author

aceppaluni commented Mar 13, 2025

I can resolve them

Signed-off-by: Angelina <[email protected]>
@aceppaluni
Copy link
Author

I resolved them and my Github UI is saying the branch is 19 commits ahead.

@EnriqueL8
Copy link
Contributor

Yeah, you need to rebase on top of main-v3 - let's move this to Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants