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

Update GitHub actions #7

Closed
wants to merge 16 commits into from
Closed

Update GitHub actions #7

wants to merge 16 commits into from

Conversation

kalensk
Copy link
Owner

@kalensk kalensk commented Jun 1, 2023

testing 123

jimmyyih and others added 16 commits May 23, 2023 14:19
It's very important to make sure the master and standby master are
synchronized before running Initialize and Execute. This is because
Revert will rsync the standby master data directory onto the master
data directory which can cause severe master corruption if the standby
master not up-to-date. We have this check for GPDB 6X+ but it was
seemingly missed for 5X because the catalog view gp_stat_replication
does not exist on 5X. However, we're only checking the master and
standby master replication status so there's no need to use the
cluster-wide gp_stat_replication view; we can simply use
pg_stat_replication which will only report the replication status of
the individual segment (in this case, just the master segment).
We already check that the cluster is synchronized when creating the
source cluster config file at the beginning of Initialize. However,
the state of the source cluster could have changed any time afterwards
between that early Initialize step and upgrading the master segment in
Execute. If the cluster was out-of-sync and we run Revert after
Execute, there is potential for severe catalog corruption. In
particular, this is more likely to happen to the master and standby
master since there's a GPDB-specific mechanism to bypass the
synchronous WAL replication when the standby master is not
responsive. To prevent this, we add a quick sanity check for cluster
synchronization before the Initialize pg_upgrade checks and more
importantly before doing the actual upgrade operation in Execute.
Pass the DUMP_PATH environment variable with the path to the dump file
when making the functional pipeline such as
`make DUMP_PATH=dump/5X/dump.sql.xz functional-pipeline`
Set max_statement_mem to be half of the total memory, and set
statement_mem to be 1/16th of the max_statement_mem.

For an n2-standard-16 instnace with 64GB of memory this sets
max_statement_mem to 32GB and statement_mem to 2GB.
Ensure resource filenames are unique with git branch name to avoid
collisions when multiple pipelines are run.

Specify BranchName and resource filenames during pipeline creation since
the Concourse GCS resource does not guarantee pulling the latest
resource. See issue frodenas/gcs-resource#47
When printing the duration just pass string rather than the timer object
to keep things simple. No need for the function to have access to the
entire object when it's not needed.
Remove AddClusters which is no longer used. Rename add_clusters.go to
for clarity.
To be consistent with the online documentation and internal naming use
--upgrade-id when running `gpupgrade config show --upgrade-id`.
Keep it simple! Since upgrade ID is only ever used as a string there is
no reason not to just have it be that type. It also allows us to
serialize it in config.json as a string rather than a random number
making it easy to correlate and debug on customer systems.
Add yearMonthDay to filename format.
Show coverage in unit and integration output.
The previous version of golangci/golangci-lint-action@v2 was showing the
following warning:

Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
@kalensk kalensk closed this Jun 1, 2023
@kalensk kalensk deleted the updateGithubActions branch June 7, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants