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

[3006.x] Fix env #65017

Merged
merged 38 commits into from
Sep 6, 2023
Merged

[3006.x] Fix env #65017

merged 38 commits into from
Sep 6, 2023

Conversation

cmcmarrow
Copy link
Contributor

@cmcmarrow cmcmarrow commented Aug 21, 2023

What does this PR do?

fix __env__

Changes:

  • Place remotes branch/tag in its own folder ../salt/../hash/branch
    • This includes locks and links
  • Clear gitfs cache on salt version change
    • This is so people don't need to manually clear salt cache when upgrading
  • Add salt working dir ../salt/../work/hash/branch
    • This is so we decrease the chances of stepping on git
  • add fetch_on_fail checkout(self, fetch_on_fail=True)
    • This is so gitpillar does not need worry if a fetch is required when working with dynamic branches
  • Fix clean_old_remotes
  • Fix fetch for __env__
    • add fetch_request - when Gitbase.fetch_remotes is called the current dynamic branch will fetch and all its sister branches will have a fetch_request file placed in its salt working dir. When sister branch inits or goes to checkout it will see the fetch_request and run fetch
  • Tests

^ fixs
salt-call pillar.data pillarenv=foo
salt-run git_pillar.update

TODO later PR:

  • remove old remotes branch's/tags
    • Make a timestamp file every time a gitprovier object is made in remote branch
    • clear_old_remotes() will remove any remote branch that has out lived its time to live.
  • Move repo locks to salt working dir

What issues does this PR fix or reference?

Fixes: #65002
Fixes: #64999

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@cmcmarrow cmcmarrow requested review from s0undt3ch and a team as code owners August 21, 2023 04:36
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title [WIP] Fix env [master][WIP] Fix env Aug 21, 2023
@cmcmarrow cmcmarrow changed the base branch from master to 3006.x August 21, 2023 04:37
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title [master][WIP] Fix env [3006.x][WIP] Fix env Aug 21, 2023
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 14:18 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 14:18 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 14:18 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 14:18 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 14:34 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 14:41 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 15:47 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 15:47 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 15:47 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 15:47 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 15:47 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 15:47 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 16:26 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 16:26 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 16:26 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 16:26 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 16:27 — with GitHub Actions Inactive
@s0undt3ch s0undt3ch temporarily deployed to ci August 21, 2023 16:27 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci August 22, 2023 02:19 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci August 22, 2023 02:19 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 5, 2023 21:33 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 5, 2023 21:33 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 5, 2023 21:33 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 5, 2023 21:33 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 5, 2023 21:53 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 5, 2023 21:54 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 6, 2023 00:39 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 6, 2023 00:39 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 6, 2023 00:39 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 6, 2023 00:39 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 6, 2023 00:39 — with GitHub Actions Inactive
@cmcmarrow cmcmarrow temporarily deployed to ci September 6, 2023 00:39 — with GitHub Actions Inactive
@garethgreenaway garethgreenaway merged commit 63547a8 into saltstack:3006.x Sep 6, 2023
375 checks passed
@tysonnorris
Copy link

A question on this - is it safe to use multiple gitfs branches/envs on same salt-master BEFORE this change if we set gitfs_global_lock: False?

I assume it is safe AFTER this change, especially if the locks move to salt working dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sulfur v3006.3 test:full Run the full test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] After upgrading to 3006.2 gitfs states 'remote ref does not exist' for ext_pillar
8 participants