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

sync new changes in zos3 #11

Closed
wants to merge 12 commits into from
Closed

sync new changes in zos3 #11

wants to merge 12 commits into from

Conversation

Omarabdul3ziz
Copy link

Copy link
Member

@muhamadazmy muhamadazmy left a comment

Choose a reason for hiding this comment

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

Is this to bring fixes from zos3 to zos4 ? you probably need to find a better way to do this in the future. From what I see it looks like zos3 is not going anywhere anytime soon.

With careful design, maybe the zos3 code base can be better separated into smaller reusable packages. Which can be used by both zos3 and 4.

Only specific version code can be different.

Of course this is easier said than done.

@@ -146,6 +152,10 @@ func (r *Registrar) register(ctx context.Context, cl zbus.Client, env environmen
if err := r.reActivate(ctx, cl, env); err != nil {
log.Error().Err(err).Msg("failed to reactivate account")
}
case <-time.After(updateLocationInterval):
Copy link
Member

Choose a reason for hiding this comment

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

I thought we going to just call register() here which will also update the locaiton

Copy link
Author

Choose a reason for hiding this comment

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

i did on the zos3 pr threefoldtech@7e0ee7d was waiting for an approve there to cherry-pick the commit here. done now

@Omarabdul3ziz
Copy link
Author

yes, it is not the best way to do it i was discussing with Ashraf about it. a suggestion for the coming changes was to open two PRs from the same branch against the two repos.

but indeed having reusable packages is a cleaner option

@iwanbk
Copy link
Member

iwanbk commented Oct 3, 2024

Is this to bring fixes from zos3 to zos4 ? you probably need to find a better way to do this in the future.

Yes, i do have the same concerns about this double repos to Ashraf & Jan.

yes, it is not the best way to do it i was discussing with Ashraf about it. a suggestion for the coming changes was to open two PRs from the same branch against the two repos.

I argue that it is not "is not the best way to do", but it is a bad way to do it.
DRY or avoid duplicated code is a well known way that we already do almost everyday.

With careful design, maybe the zos3 code base can be better separated into smaller reusable packages. Which can be used by both zos3 and 4.

Only specific version code can be different.

Of course this is easier said than done.

Yes, we should do it.
It is not easy but better we start it sooner than later, before the things going wrong cc @ashraffouda @xmonader

@Omarabdul3ziz
Copy link
Author

@Omarabdul3ziz Omarabdul3ziz deleted the main_zos3_sync branch October 30, 2024 11:11
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